This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: ∑ n i =1 ( logi + log 2) = ∑ n i =1 log (2 i ) = log 2 + log 4 + log 6 + ... + log 2 n ≤ nlog (2 n ) = nlog ( n ) + nlog 2 Hence : ∑ n i =1 d log 2 i e = O ( nlogn ) d x e give smallest integer larger than or equal to x . So ∑ n i =1 d log 2 i e is not always same as ∑ n i =1 log 2 i 8. (5 points) Answer: Since: d ( n ) ≤ c * f ( n ) for n ≥ n , c > 0, n ≥ 1 e ( n ) ≤ c * g ( n ) for n ≥ n , c > 0, n ≥ 1 Hence: d ( n ) + e ( n ) ≤ c * f ( n ) + c * g ( n ) for n ≥ max ( n ,n ) Assume: c 00 = max ( c,c ) ,n 00 = max ( n ,n ) Hence: d ( n ) + e ( n ) ≤ c 00 * ( f ( n ) + g ( n )) for n ≥ n 00 , c 00 > 0, n 00 ≥ 1 That is: d ( n ) + e ( n ) = O ( f ( n ) + g ( n )) 2...
View
Full Document
 Spring '08
 Rhee
 Data Structures

Click to edit the document details