[npl] / trunk / NationalProblemLibrary / ASU-topics / set119MatrixAlgebra / p33.pg Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

# View of /trunk/NationalProblemLibrary/ASU-topics/set119MatrixAlgebra/p33.pg

Thu Jul 19 21:11:19 2007 UTC (5 years, 10 months ago) by jjholt
File size: 2890 byte(s)
Updated/Consolidated tags.


    1 ## DESCRIPTION
2 ## Matrix Algebra
3 ## ENDDESCRIPTION
4
5 ## KEYWORDS('Algebra' 'Matrix' 'Matrices' 'True' 'False')
6 ## Tagged by tda2d
7
8 ## DBsubject('Algebra')
9 ## DBchapter('Systems of Equations and Inequalities')
10 ## DBsection('The Algebra of Matrices')
11 ## Date('')
12 ## Author('')
13 ## Institution('ASU')
14 ## TitleText1('')
15 ## EditionText1('')
16 ## AuthorText1('')
17 ## Section1('')
18 ## Problem1('')
19
20 DOCUMENT();        # This should be the first executable line in the problem.
21
23 "PGasu.pl",
24 "PG.pl",
25 "PGbasicmacros.pl",
26 "PGchoicemacros.pl",
28 "PGauxiliaryFunctions.pl",
29 "PGmatrixmacros.pl"
30 );
31
32 TEXT(beginproblem());
33 $showPartialCorrectAnswers = 1; 34 35$microA1 = random(30,60);
36 $fridgeA1 = random(10,30); 37$stoveA1 = random(20,50);
38 $microA2 = random(25,55); 39$fridgeA2 = random(12,40);
40 $stoveA2 = random(15,45); 41 42$microX1 = random(30,60);
43 $fridgeX1 = random(10,30); 44$stoveX1 = random(20,50);
45 $microX2 = random(25,55); 46$fridgeX2 = random(12,40);
47 $stoveX2 = random(15,45); 48 49 50 BEGIN_TEXT 51 During the month of January, "ABC Appliances" sold$microA1 microwaves,
52 $fridgeA1 refrigerators and$stoveA1 stoves, while
53 "XYZ Appliances" sold $microX1 microwaves, 54$fridgeX1 refrigerators and $stoveX1 stoves. 55$BR
56 During the month of February, "ABC Appliances" sold $microA2 microwaves, 57$fridgeA2 refrigerators and $stoveA2 stoves, while 58 "XYZ Appliances" sold$microX2 microwaves,
59 $fridgeX2 refrigerators and$stoveX2 stoves.
60 $BR 61 a) Write a $$2 \times 3$$ matrix summarizing the sales for the month of January. (Keep the 62 order of information). 63 64$BCENTER
65 \{display_matrix([[ans_rule(5),ans_rule(5),ans_rule(5)],
66 [ans_rule(5),ans_rule(5),ans_rule(5)]], 'align'=>"ccc")
67 \}
68 $ECENTER 69 70 b) Write a $$2 \times 3$$ matrix summarizing the sales for the month of February. 71 (Keep the order of information). 72 73$BCENTER
74 \{display_matrix([[ans_rule(5),ans_rule(5),ans_rule(5)],
75 [ans_rule(5),ans_rule(5),ans_rule(5)]], 'align'=>"ccc")
76 \}
77 $ECENTER 78 79 c) Use matrix addition to find a $$2 \times 3$$ matrix summarizing the total sales for the months of January and February. 80 81$BCENTER
82 \{display_matrix([[ans_rule(5),ans_rule(5),ans_rule(5)],
83 [ans_rule(5),ans_rule(5),ans_rule(5)]], 'align'=>"ccc")
84 \}
85 $ECENTER 86 87 END_TEXT 88 89 90 ANS(num_cmp($microA1));  ANS(num_cmp($fridgeA1)); ANS(num_cmp($stoveA1));
91 ANS(num_cmp($microX1)); ANS(num_cmp($fridgeX1));  ANS(num_cmp($stoveX1)); 92 93 ANS(num_cmp($microA2));  ANS(num_cmp($fridgeA2)); ANS(num_cmp($stoveA2));
94 ANS(num_cmp($microX2)); ANS(num_cmp($fridgeX2));  ANS(num_cmp($stoveX2)); 95$a11 = $microA1 +$microA2;
96 $a12 =$fridgeA1+$fridgeA2; 97$a13 = $stoveA1+$stoveA2;
98 $a21 =$microX1 +$microX2; 99$a22 = $fridgeX1 +$fridgeX2;
100 $a23 =$stoveX1+ $stoveX2; 101 102 ANS(num_cmp($a11));  ANS(num_cmp($a12)); ANS(num_cmp($a13));
103 ANS(num_cmp($a21)); ANS(num_cmp($a22));  ANS(num_cmp(\$a23));
104
105 ENDDOCUMENT();       # This should be the last executable line in the problem.