MidtermSolS04

MidtermSolS04 - UML CS 91.404 Midterm Exam Spring, 2004...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
UML CS 91.404 Midterm Exam Spring, 2004 1 of 5 MIDTERM EXAM & SOLUTIONS 1. (20 points) What can you conclude? Given: ( ) ( ) n n n f lg 2 lg ) ( ) 2 Ω ( ) ) ( ) ( ) 3 lg lg 3 n n n f Θ 2 1 ) ( ) 1 n n f Ω a) (10 points) Can we conclude from statements (1)-(3) that ? )) ( ( ) ( 2 3 n f O n f Why or why not? Either prove or provide a counterexample. ) ( 1 n f 2 n ) ( 2 n f ) ( 3 n f () n n n n lg lg lg lg = SOLUTION : YES. First, observe that () . This can be verified by taking lg of both sides. Next, because lglgn > 2 for n > 16. From this we obtain the picture above. n n n n lg lg lg lg = () lg lg lg lg n n n n > = 2 n To show that , we first use the definition of Θ to conclude that . Since )) ( ( ) ( 2 3 n f O n f ) ( ) 3 lg lg n n f n ) ( ( ) ( lg lg 3 n n O n f Θ ( ) n n n n lg lg lg lg = , this implies, transitively, that . Now, () ) lg n n lg ( ) ( 3 O n f ( ) n n n lg 2 ) (lg ) ( Ω f implies, using
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
UML CS 91.404 Midterm Exam Spring, 2004 2 of 5 transpose symmetry, that ( ) ( ) ) ( lg 2 lg n f O n n . Thus, transitively, . )) ( ( ) ( 2 3 n f O n f b) (10 points) Can we conclude from statements (1)-(3) that ? )) ( ( ) ( 3 1 n f O n f Why or why not? Either prove or provide a counterexample. SOLUTION : NO. Counter-example: and . n n = n n n f lg lg 3 ) ( = n f ) ( 1 2. (20 points) Recurrence In this problem, you will find a tight upper and lower bound on the closed- form solution for the following recurrence: = > + + = 1 1 1 3 8 5 6 ) ( 2
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/13/2012 for the course CS 91.404 taught by Professor Dr.karendaniels during the Fall '09 term at UMass Lowell.

Page1 / 5

MidtermSolS04 - UML CS 91.404 Midterm Exam Spring, 2004...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online