This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Now take c 3 = max( c 1 ,c 2 ). Therefore c 1 h ( n ) + c 2 k ( n ) ≤ c 3 h ( n ) + c 3 k ( n ) = c 3 ( h ( n ) + k ( n )) so f ( n ) + g ( n ) ≤ c 3 ( h ( n ) + k ( n )). 1 Moreover, to be sure that both f ( n ) ≤ c 1 h ( n ) and g ( n ) ≤ c 2 k ( n ) we have to have both n ≥ N 1 n ≥ N 2 . A simple way to ensure this is to have n ≥ max( N 1 ,N 2 ). To recap, we have shown that there exist c 3 = max( c 1 ,c 2 ) and N 3 = max( N 1 ,N 2 ) such that for n ≥ N 3 we have f ( n ) g ( n ) ≤ c 3 h ( n ) k ( n ). Sample Problem 3 In this problem you are NOT allowed to use the theorems about BigOh stated in the lecture notes. Your proof should follow just from the definition of BigOh. Let f ( n ) = 1 10 n √ n and g ( n ) = 100 n + 1000 Prove that f ( n ) is not O ( g ( n )). Answer Proof by contradiction. Suppose that f ( n ) is O ( g ( n )), i.e., ∃ N,c > 0 such that ∀ n ≥ N we have 1 10 n √ n ≤ c (100 n + 1000) First we transform a bit the last inequality into an equivalent one: 1 10 n √ n ≤ c (100 n + 1000) iff n √ n ≤ 1000 cn + 10000 c iff n ( √ n 1000 c ) ≤ 10000 c This last inequality is contradicted if n > 1 and √ n 1000 c > 10000 c , that is n > 11000 2 c 2...
View
Full Document
 Spring '09
 TANNEN
 Algorithms, Data Structures, Analysis of algorithms, Negative and nonnegative numbers, Existential quantification

Click to edit the document details