Parent Directory
|
Revision Log
Revision 1457 - (view) (download)
| 1 : | ted shifri | 1457 | ## DESCRIPTION |
| 2 : | ## Testing for Open Sets | ||
| 3 : | ## ENDDESCRIPTION | ||
| 4 : | |||
| 5 : | ## KEYWORDS('Open Set', 'Ball') | ||
| 6 : | ## | ||
| 7 : | |||
| 8 : | ## DBsubject('Calculus') | ||
| 9 : | ## DBchapter('') | ||
| 10 : | ## DBsection('') | ||
| 11 : | ## Date('9/5/2009') | ||
| 12 : | ## Author('Ted Shifrin') | ||
| 13 : | ## Institution('UGA') | ||
| 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("PG.pl", | ||
| 23 : | "PGbasicmacros.pl", | ||
| 24 : | "PGchoicemacros.pl", | ||
| 25 : | "PGanswermacros.pl", | ||
| 26 : | "PGauxiliaryFunctions.pl", | ||
| 27 : | "MathObjects.pl", | ||
| 28 : | ); | ||
| 29 : | |||
| 30 : | TEXT(beginproblem()); | ||
| 31 : | $showPartialCorrectAnswers = 1; | ||
| 32 : | Context("Vector"); | ||
| 33 : | |||
| 34 : | $a1 = non_zero_random(1, 10, 1); | ||
| 35 : | $b1 = non_zero_random(1, 10, 1); | ||
| 36 : | $r = random(1,4,1); | ||
| 37 : | $rr = $r**2; | ||
| 38 : | $a2 = non_zero_random(-5, 5, 1); | ||
| 39 : | $b2 = non_zero_random(-5, 5, 1); | ||
| 40 : | $a3 = random(-10, 10, 1); | ||
| 41 : | $b3 = random($a3+1, $a3+10, 1); | ||
| 42 : | |||
| 43 : | |||
| 44 : | $ans1 = min($a1,$b1); | ||
| 45 : | $ans2 = abs(sqrt($a2**2+$b2**2)-$r); | ||
| 46 : | $ans3 = ($b3-$a3)/sqrt(2); | ||
| 47 : | |||
| 48 : | @points = ("$a1, $b1", "$a2, $b2", "$a3, $b3"); | ||
| 49 : | |||
| 50 : | @sets = ( "xy \gt 0", "x^2+y^2 \ne $rr", "y \gt x" ); | ||
| 51 : | |||
| 52 : | @answers = ("$ans1", "$ans2", "$ans3"); | ||
| 53 : | |||
| 54 : | @choice=NchooseK(3,2); | ||
| 55 : | @subpoints=@points[@choice]; | ||
| 56 : | @subsets=@sets[@choice]; | ||
| 57 : | @subanswers=@answers[@choice]; | ||
| 58 : | |||
| 59 : | $P0 = ColumnVector("<@subpoints[0]>"); | ||
| 60 : | $P1 = ColumnVector("<$subpoints[1]>"); | ||
| 61 : | |||
| 62 : | Context()->texStrings; | ||
| 63 : | BEGIN_TEXT | ||
| 64 : | Given the point \( \mathbf a = $P0 \) in the set | ||
| 65 : | \( S = \left\{"\{"\} \left(\begin{array}{c}x\\y\end{array}\right): $subsets[0] \right\}\), give the radius \( \delta \) of the largest ball \(B(\mathbf a,\delta)\) that is contained in \( S\).$BR | ||
| 66 : | \{ans_rule(10)\} $BR | ||
| 67 : | |||
| 68 : | Given the point \( \mathbf a = $P1 \) in the set | ||
| 69 : | \( S = \left\{"\{"\} \left(\begin{array}{c}x\\y\end{array}\right): $subsets[1] \right\}\), give the radius \(\delta\) of the largest ball \(B(\mathbf a,\delta)\) that is contained in \( S\).$BR | ||
| 70 : | \{ans_rule(10)\} $BR | ||
| 71 : | |||
| 72 : | END_TEXT | ||
| 73 : | |||
| 74 : | ANS(num_cmp([@subanswers])); | ||
| 75 : | ENDDOCUMENT(); # This should be the last executable line in the problem. |
| aubreyja at gmail dot com | ViewVC Help |
| Powered by ViewVC 1.0.9 |