

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


1
Explain why the statement “The running time of algorithm A is at least O ( n^2 )” is meaningless.
and justify your answers.
A B O o (^) Ω ω Θ a. (1 Point) (^) lg kn n^ ε b. (1 Point) (^) n k cn c. (1 Point) (^) n n sin n d. (1 Point) 2 n 2 n /^2 e. (1 Point) (^) n lg^ c c lg n f. (1 Point) lg( n! ) lg( nn )
2
c. (1 Point) Assume lg( g ( n ))≥ 1 and f ( n )≥ 1 for all sufficiently large n. Then f ( n )= O ( g ( n )) implies lg( f ( n ))= O (lg( g ( n ))). d. (1 Point) f ( n )= O ( g ( n ))implies 2 f^ (^ n )= O ( 2 g ( n )). e. (1 Point) f ( n )= O (( f ( n ))^2 ). h. (1 Point) f ( n )+ o ( f ( n ))=Θ( f ( n )).
Let f ( n )= Θ( n ). Prove that ( ) (^2 ) 1
f i n
n
i
=
. (See the hint at bottom of p.4 of the handout on
asymptotic growth rates.)