

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!


Exercise 3.1-4 (page 50)
lim n →∞ 2 n +1^ / 2 n^ = lim n →∞ 2 = 2, so 2 n +1^ = O(2 n ).
lim n →∞ 2 2 n^ / 2 n^ = lim n →∞ 2 n^ = ∞, so 2 2 n^ ≠ O(2 n ).
Exercise 3.2-6 (page 57)
Now assume i ≥ 2, and that the result holds for all k with k < i. Recall ϕ and ϕ∧^ are the roots of x^2 − x − 1 = 0. Thus ϕ^2 = ϕ + 1 and ϕ∧^2 = ϕ∧^ + 1. Multiplying by ϕ i −^2 gives ϕ i^ = ϕ i −^1 + ϕ i −^2 and ϕ∧^ i^ = ϕ∧^ i −^1 + ϕ i −^2 for all i ≥ 2.
So the result holds for i.
Exercise 3-2 (pages 57-58)
A B O o Ω ω Θ Notes lg k ( n ) nε^ yes yes no no no Polynomials dominate logarithms. n k^ c n^ yes yes no no no Exponentials dominate polynomials.
sqrt( n ) n sin( n )^ no no no no no
n sin( n )^ oscillates in (1/ n , n ). There are arbitrarily large values for n for which n sin( n )^ < 1, and arbitrarily large n for which n sin( n )^ > n 0.75^. For any positive constants c 1 and c 2 , there exist arbitrarily large values of n with sqrt( n ) / n sin( n )^ < c 1 , and arbitrarily large n with sqrt( n ) / n sin( n )^ > c 2. 2 n^ 2 n /2^ no no yes yes no lim^ n →∞ 2 n^ / 2 n /2^ = lim^ n →∞ 2 n /2^ =^ ∞. n lg( c )^ c lg( n )^ yes^ no^ yes^ no^ yes^ We showed in class that^ n lg( c )^ =^ c lg( n )^. lg( n !) lg( n n ) yes no yes no yes lg( n^ n ) = n lg( n ), and lg( n !) ≈ n lg( n ) – 1.44 n by Stirling’s formula.
Exercise 3-3 (pages 57-58), part (a) 2 2 n + 2 2 n ( n +1)! n! Note n! ≈ ( n / e ) n^ sqrt(2π n ) grows more rapidly than α n , α fixed. en n ⋅ 2 n 2 n (3/2) n n lg lg( n ), (lg( n ))lg( n )^ Note (lg( n )) lg( n )^ = 2 lg lg( n ) lg( n )^ = 2 lg( n ) lg lg( n )^ = n lg lg( n )^. (lg( n ))! Note (lg( n ))! ≈ (lg( n )/ e ) lg( n )^ sqrt(2πlg( n )) = n lg lg( n )^ / n lg( e )^ Θ(sqrt(lg( n )) = n lg lg( n )−1.44Θ(sqrt(lg( n )). n^3 n^2 , 4 lg( n )^ Note 4 lg( n )^ = n lg(4)^ = n^2 by the general rule a log b ( c )= c log b ( a ). n lg( n ), lg( n !) Note lg(n!) ≈ n lg( n ) − 1.44 n n , 2 lg( n ) (sqrt(2))lg( n )^ Note (sqrt(2))lg( n )^ = n lg(sqrt(2))^ = n 0. 2 sqrt(2 lg(n)) (lg( n ))^2 ln( n ) sqrt(lg( n )) ln ln n
Exercise C
a) Recall that lim (^) n →∞ f ( n ) = lim (^) n →∞ g ( n ) = ∞. Note lim (^) n →∞ g ( n ) = ∞ implies ln( g ( n )) ≥ 1 for all n sufficently large. Note also f ( n ) = O( g ( n )) means that there exists a constant c such that f ( n ) ≤ c g ( n )) for all n sufficiently large. Increasing c if necessary, we may assume c ≥ 1 and hence ln( c ) > 0. Thus for all n sufficiently large, f ( n ) ≤ c g ( n )) ⇒ ln( f ( n )) ≤ ln( cg ( n )) Since ln ( x ) in an increasing function. ⇒ ln( f ( n )) ≤ ln( c ) + ln( g ( n )) ⇒ ln( f ( n )) ≤ ln( c )ln( g ( n )) + ln( g ( n )) Since ln (c) > 0 and ln ( g ( n ) ) ≥ 1. ⇒ ln( f ( n )) ≤ ( ln( c ) + 1) ln ( g ( n )) Since ln( c )+1 is constant, ln( f ( n )) = O( ln( g ( n ))).