PracticeProblems

PracticeProblems - UML CS 91.404 Practice Problems and...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: UML CS 91.404 Practice Problems and Solutions 1. (20 points) What can you conclude? Given: a) (10 points) Can we conclude from statements (1)-(4) that Why or why not? Either prove or provide a counterexample. SOLUTION: The statement is FALSE. Counterexample: n n f n n f lg lg ) ( ) ( 3 2 = = 1 of 6 3 2 1 ) ( ) 2 n n f ) 7 lg lg 3 ( ) ( ) 3 3- n O n f ? )) ( ( ) ( 3 2 n f O n f n n f 4 log 1 16 1 ) ( ) 1 ) 7 lg lg 3 ( ) ( ) 4 4- n n f 3 1 n 7 lg lg 3- n n 4 log 16 1 f 2 (n) f 4 (n) f 3 (n) f 1 (n) UML CS 91.404 b) (10 points) Can we conclude from statements (1)-(4) that Why or why not? Either prove or provide a counterexample. SOLUTION: The statement is TRUE. Proof: First, observe that: Now, and n n 4 log 16 1 7 lg lg 3 - transitivity of yields: n n f 4 log 4 16 1 ) ( Applying the definition of and using transpose symmetry yields: Applying transitivity of again yields: )) ( ( ) ( 1 4 n f n f 2 of 6 ? )) ( ( ) ( 1 4 n f n f )) ( ( 16 1 16 1 ) ( 16 1 ) ( 1 log log 1 log 1 4 4 4 n f O n f n f n n n ) 7 lg lg 3 ( ) ( 4- n n f 2 log log 2 log 2 log 1 4 1 4 1 4 1 16 1 2 4 4 4 4 n n n n n = = = = UML CS 91.404 2. (20 points) Recurrence In this problem, you will find a tight upper bound on the closed-form solution for the following recurrence: = + = 1 1 1 log 7 5 ) ( 7 n n n n T n T That is, find the smallest function ) ( n f that you can, such that )) ( ( ) ( n f O n T . You may assume that n is a power of 7....
View Full Document

Page1 / 6

PracticeProblems - UML CS 91.404 Practice Problems and...

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

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