[npl] / trunk / NationalProblemLibrary / Rochester / setLinearAlgebra14TransfOfRn / ur_la_14_9.pg Repository:
ViewVC logotype

View of /trunk/NationalProblemLibrary/Rochester/setLinearAlgebra14TransfOfRn/ur_la_14_9.pg

Parent Directory Parent Directory | Revision Log Revision Log


Revision 144 - (download) (annotate)
Sun Mar 26 15:53:04 2006 UTC (7 years, 1 month ago) by jj
File size: 3129 byte(s)
Initial import

    1 ##DESCRIPTION
    2 ##KEYWORDS(linear, transformation)
    3 ##
    4 ##ENDDESCRIPTION
    5 
    6 
    7 DOCUMENT();        # This should be the first executable line in the problem.
    8 
    9 loadMacros(
   10 "PG.pl",
   11 "PGbasicmacros.pl",
   12 "PGchoicemacros.pl",
   13 "PGanswermacros.pl",
   14 "PGgraphmacros.pl",
   15 "PGmatrixmacros.pl",
   16 "PGnumericalmacros.pl",
   17 "PGauxiliaryFunctions.pl"
   18 );
   19 
   20 TEXT(beginproblem());
   21 $showPartialCorrectAnswers = 0;
   22 
   23 @coeff = (2, 3, 4, 5, 6, 7, 8, 9, 10);
   24 @slice = NchooseK(9,9);
   25 @c = @coeff[@slice];
   26 
   27 $NO_SPACE = '@{}';
   28 
   29 @linear = ('\( \left\{ \begin{array}{r${NO_SPACE}r${NO_SPACE}l}
   30                y_1 & = & $c[0] x_1 + x_2 \cr
   31                y_2 & = &    - x_1
   32                \end{array}  \right . \)',
   33             '\( \left\{ \begin{array}{r${NO_SPACE}r${NO_SPACE}l}
   34                y_1 & = & 0         \cr
   35                y_2 & = & $c[1] x_2
   36                \end{array}  \right . \)',
   37             '\( \left\{ \begin{array}{r${NO_SPACE}r${NO_SPACE}l}
   38                y_1 & = &   $c[2] x_2 \cr
   39          y_2 & = & - $c[3] x_3 \cr
   40                y_3 & = & - $c[4] x_1
   41                \end{array}  \right . \)',
   42             '\( \left\{ \begin{array}{r${NO_SPACE}r${NO_SPACE}l}
   43                y_1 & = &   $c[5] x_1  - $c[6] x_2  + $c[7] x_3 \cr
   44                y_2 & = &                $c[8] x_2  - $c[0] x_3 \cr
   45                y_3 & = & - $c[2] x_1  - $c[1] x_2
   46                \end{array}  \right . \)',
   47              '\( \left\{ \begin{array}{r${NO_SPACE}r${NO_SPACE}l}
   48                y_1 & = & - $c[7] x_1 \cr
   49                y_2 & = &   $c[6] x_1 \cr
   50                y_3 & = &   $c[3] x_1
   51                \end{array}  \right . \)');
   52 
   53 @nonlin = ('\( \left\{ \begin{array}{r${NO_SPACE}r${NO_SPACE}l}
   54                y_1 & = & $c[4] x_1 \cr
   55                y_2 & = & $c[5]     \cr
   56                \end{array}  \right . \)',
   57            '\( \left\{ \begin{array}{r${NO_SPACE}r${NO_SPACE}l}
   58                y_1 & = & 0 \cr
   59                y_2 & = & x_1 x_2 \cr
   60                \end{array}  \right . \)',
   61            '\( \left\{ \begin{array}{r${NO_SPACE}r${NO_SPACE}l}
   62                y_1 & = & x_1 + $c[8] \cr
   63          y_2 & = & x_2
   64                \end{array}  \right . \)',
   65            '\( \left\{ \begin{array}{r${NO_SPACE}r${NO_SPACE}l}
   66                y_1 & = & $c[0] \cr
   67                y_2 & = & $c[1] \cr
   68                y_3 & = & $c[2] \cr
   69                \end{array}  \right . \)',
   70            '\( \left\{ \begin{array}{r${NO_SPACE}r${NO_SPACE}l}
   71                y_1 & = & x_2^2 \cr
   72                y_2 & = & x_3 \cr
   73                y_3 & = & x_1 \cr
   74                \end{array}  \right . \)');
   75 
   76 @slice1 = NchooseK(5,3);
   77 @slinear = @linear[@slice1];
   78 
   79 @slice2 = NchooseK(5,3);
   80 @snonlin = @nonlin[@slice2];
   81 
   82 $cmc = new_checkbox_multiple_choice();
   83 $cmc -> qa ("Which of the following transformations are linear?",
   84       $slinear[0], $slinear[1], $slinear[2]);
   85 $cmc -> extra ($snonlin[0], $snonlin[1], $snonlin[2]);
   86 
   87 BEGIN_TEXT
   88 
   89 $BR
   90 \{$cmc -> print_q \}
   91 $BR
   92 \{$cmc -> print_a \}
   93 
   94 END_TEXT
   95 
   96 ANS(checkbox_cmp( $cmc->correct_ans ));
   97 
   98 ENDDOCUMENT();       # This should be the last executable line in the problem.
   99 

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9