[npl] / branches / UGA / 1.4.1.pg Repository:
ViewVC logotype

Annotation of /branches/UGA/1.4.1.pg

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1457 - (view) (download)

1 : ted shifri 1457 ## DESCRIPTION
2 :     ## Linear Algebra
3 :     ## ENDDESCRIPTION
4 :    
5 :     ## KEYWORDS ('linear algebra','matrix','skew-symmetric')
6 :     ## Tagged by cmd6a 5/3/06
7 :    
8 :     ## DBsubject('Linear Algebra')
9 :     ## DBchapter('Matrices')
10 :     ## DBsection('Diagonalization')
11 :     ## Date('')
12 :     ## Author('')
13 :     ## Institution('Rochester')
14 :     ## TitleText1('')
15 :     ## EditionText1('')
16 :     ## AuthorText1('')
17 :     ## Section1('')
18 :     ## Problem1('')
19 :    
20 :     DOCUMENT(); # This should be the first executable line in the problem.
21 :    
22 :     loadMacros(
23 :     "PG.pl",
24 :     "PGbasicmacros.pl",
25 :     "PGchoicemacros.pl",
26 :     "PGanswermacros.pl",
27 :     "PGgraphmacros.pl",
28 :     "PGmatrixmacros.pl",
29 :     "PGnumericalmacros.pl",
30 :     "PGauxiliaryFunctions.pl",
31 :     "PGmorematrixmacros.pl"
32 :     );
33 :    
34 :     TEXT(beginproblem());
35 :     $showPartialCorrectAnswers = 1;
36 :    
37 :     @a = NchooseK(6,6);
38 :     $i1 = random(1,2,1);
39 :     $j1 = 3 - $i1;
40 :     $i2 = random(1,3,2);
41 :     $j2 = 4 - $i2;
42 :     $i3 = random(2,3,1);
43 :     $j3 = 5 - $i3;
44 :     $a[1] = non_zero_random(-5,5,1);
45 :     $a[2] = $a[1]+non_zero_random(-3,3,2);
46 :     $a[3] = $a[1]+non_zero_random(-4,4,2);
47 :    
48 :    
49 :     BEGIN_TEXT
50 :    
51 :     Enter a \( 3 \times 3 \) skew-symmetric matrix \(A\) that has entries
52 :     $BR \(a_{$i1 $j1}=$a[1]\), \(a_{$i2 $j2}=$a[2]\), \(a_{$i3 $j3}=$a[3]\).
53 :     $BR
54 :     \{ mbox( '\(A=\)', answer_matrix(3,3,5), '.' ) \}
55 :    
56 :     END_TEXT
57 :    
58 :     if ($i1==1) {
59 :     $a[12] = $a[1];
60 :     $a[21] = - $a[1];
61 :     } else {
62 :     $a[12] = - $a[1];
63 :     $a[21] = $a[1];
64 :     }
65 :    
66 :     if ($i2==1) {
67 :     $a[13] = $a[2];
68 :     $a[31] = - $a[2];
69 :     } else {
70 :     $a[13] = - $a[2];
71 :     $a[31] = $a[2];
72 :     }
73 :    
74 :     if ($i3==2) {
75 :     $a[23] = $a[3];
76 :     $a[32] = - $a[3];
77 :     } else {
78 :     $a[23] = - $a[3];
79 :     $a[32] = $a[3];
80 :     }
81 :    
82 :     ANS(num_cmp(0)); ANS(num_cmp($a[12])); ANS(num_cmp($a[13]));
83 :     ANS(num_cmp($a[21])); ANS(num_cmp(0)); ANS(num_cmp($a[23]));
84 :     ANS(num_cmp($a[31])); ANS(num_cmp($a[32])); ANS(num_cmp(0));
85 :    
86 :     ENDDOCUMENT(); # This should be the last executable line in the problem.
87 :    

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9