[rochester] / trunk / rochester_problib / setDiscrete4Functions / ur_dis_4_9.pg Repository:
ViewVC logotype

Annotation of /trunk/rochester_problib/setDiscrete4Functions/ur_dis_4_9.pg

Parent Directory Parent Directory | Revision Log Revision Log


Revision 284 - (view) (download)

1 : lr003k 244 ##DESCRIPTION
2 : ad001h 266 ##KEYWORDS('Standard Example')
3 : lr003k 244 ##ENDDESCRIPTION
4 :    
5 :     DOCUMENT(); # This should be the first executable line in the problem.
6 :    
7 :     loadMacros(
8 :     "PG.pl",
9 :     "PGbasicmacros.pl",
10 :     "PGchoicemacros.pl",
11 :     "PGanswermacros.pl",
12 :     "PGauxiliaryFunctions.pl"
13 :     );
14 :    
15 :     TEXT(&beginproblem);
16 : ad001h 266 $showPartialCorrectAnswers=0;
17 : lr003k 244
18 : ad001h 266 #Numerical Answer
19 : lr003k 244
20 : ad001h 266 $a = random(2,9,1);
21 :     $b = random(3,9,1);
22 : lr003k 244
23 :     BEGIN_TEXT
24 : ad001h 266 In this problem it will be useful to recall the following properties
25 : ad001h 284 of logarithms: \( \log(xy)=\log(x) + \log(y) \) and \( \log(x^a)=a\log(x) \).
26 : ad001h 266 $BR
27 :     Find the least integer k such that f(n) is \( O(n^k) \)
28 :     for each of the following functions: $BR
29 : ad001h 284 (a) \( f(n) = n\log(4^n) \) \{ ans_rule(10) \}
30 : lr003k 244 $PAR
31 : ad001h 266 (b) \( f(n) = 1^{$a} + 2^{$a} + \dots + n^{$a} \) \{ ans_rule(10) \}
32 :     $PAR
33 : ad001h 284 (c) \( f(n) = \log(n!) \) \{ ans_rule(10) \}
34 : ad001h 266 $PAR
35 : ad001h 284 (d) \( f(n) = \frac {\log(n^n)}{n^{$b}+1} \) \{ ans_rule(10) \}
36 : ad001h 266 $PAR
37 : lr003k 244 END_TEXT
38 :    
39 : ad001h 266 $c = $a + 1;
40 :     $d = 2 - $b;
41 : lr003k 244
42 : ad001h 266 ANS( num_cmp( 2 ) );
43 :     ANS( num_cmp( $c ) );
44 :     ANS( num_cmp( 2 ) );
45 :     ANS( num_cmp( $d ) );
46 :    
47 : lr003k 244 ENDDOCUMENT(); # This should be the last executable line in the problem.;

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9