[npl] / branches / UGA / 9.4.1.pg Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

# View of /branches/UGA/9.4.1.pg

Sat Jul 24 17:11:33 2010 UTC (2 years, 10 months ago) by ted shifrin
File size: 2391 byte(s)
Log message

    1 ## DESCRIPTION
2 ## Linear Algebra
3 ## ENDDESCRIPTION
4
5 ## KEYWORDS ('linear algebra','eigenvalues', 'diagonalizability')
6
7 ## DBsubject('Multivariable Mathematics')
8 ## DBchapter('Linear Transformations')
9 ## DBsection('Eigenvalues and Eigenvectors, Diagonalizability')
10 ## Date('March 13, 2010')
11 ## Author('Shifrin')
12 ## Institution('UGA')
13 ## TitleText1('')
14 ## EditionText1('')
15 ## AuthorText1('')
16 ## Section1('')
17 ## Problem1('')
18
19 DOCUMENT();        # This should be the first executable line in the problem.
20
22            "PGbasicmacros.pl",
23            "PGchoicemacros.pl",
25            "PGauxiliaryFunctions.pl",
26            "PGmatrixmacros.pl",
27            "PGmorematrixmacros.pl",
28            "Parser.pl",
30            );
31
32
33 TEXT(beginproblem());
34 $showPartialCorrectAnswers = 0; 35 36 install_weighted_grader(); 37 38 Context("Matrix"); 39 40$a=random(-3,3);
41 $b=non_zero_random(-3,3); 42 do{$c=random(-3,3)} until ($c!=$a);
43 do{$d=random(-3,3)} until ($d!=$a &&$d!=$c); 44 do{$e=random(-3,3)} until ($e!=$a && $e!=$c && $e!=$d);
45 $r1=random(-5,5); 46$r2=random(-5,5);
47 $r3=random(-5,5); 48$r4=non_zero_random(-5,5);
49 $r5=random(-5,5); 50$r6=random(-5,5);
51
52
53 $M1 = Matrix("[[$a,$b,$r1,$r2],[0,$a,$r3,$r4],[0,0,$c,$r5],[0,0,0,$d]]"); 54$M2 = Matrix("[[$a,0,0,0],[$r1,$c,0,0],[$r2,$r3,$d,0],[$r4,$r5,$r2,$e]]");
55 $M3 = Matrix("[[$a,$r1,0,$r2],[0,$c,0,0],[0,$r4,$a,$r5],[0,0,0,$c]]"); 56$M4 = Matrix("[[$a,$r3,$r2,$r1],[$r3,$a,$r5,$r4],[$r2,$r5,$c,$r6],
57 [$r1,$r4,$r6,$d]]");
58
59
60 @Ms = ($M1,$M2,$M3,$M4);
61 @diags=('not diagonalizable','diagonalizable','diagonalizable','diagonalizable');
62
63 @choice=NchooseK(4,4);
64 @A=@Ms[@choice];
65 @diag=@diags[@choice];
66
67 $ans1=str_cmp($diag[0]);
68 $ans2=str_cmp($diag[1]);
69 $ans3=str_cmp($diag[2]);
70 $ans4=str_cmp($diag[3]);
71
72
73
74 Context()->texStrings;
75 BEGIN_TEXT
76
77 Consider the matrices
78 $A = A[0], \quad B = A[1],$
79 $BR 80 $C = A[2], \quad D = A[3] .$ 81 82$PAR
83 The matrix $$A$$ is \{pop_up_list(['?','diagonalizable','not diagonalizable'])\}.
84 $PAR 85 The matrix $$B$$ is \{pop_up_list(['?','diagonalizable','not diagonalizable'])\}. 86$PAR
87 The matrix $$C$$ is \{pop_up_list(['?','diagonalizable','not diagonalizable'])\}.
88 $PAR 89 The matrix $$D$$ is \{pop_up_list(['?','diagonalizable','not diagonalizable'])\}. 90$PAR
91
92 END_TEXT
93
94 ANS($ans1,$ans2,$ans3,$ans4);
95
96 ENDDOCUMENT();       # This should be the last executable line in the problem.
97
98


 aubreyja at gmail dot com ViewVC Help Powered by ViewVC 1.0.9