cse220sol1

cse220sol1 - Solutions for Homework 1 f(n) log k n n k p n...

This preview shows pages 1–3. Sign up to view the full content.

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Solutions for Homework 1 f(n) log k n n k p n log( n !) g(n) n c n n sinn log( n n ) Is f ( n ) O ( g ( n ))? Yes Yes No Yes Is f ( n ) ( g ( n ))? No No No Yes Is f ( n ) ( g ( n ))? No No No Yes Is f ( n ) o ( g ( n ))? Yes Yes No No Table 1: Problem 1: (Grade 16 pts): In Table 1, k 1 ; > ; c > 1 : Please answer yes or no, and also justify your answer in each case. Column1: We will prove that log k n = o( n ). We want to show that for any constant c > 0, there exists a constant n > 0 : log k n < cn : Take the log of both sides log log k n < log cn k log log n < log c + log n This is true for large enough n (it can be proven using L'Hopital's rule). So, log k n = o( n ). (1) From (1), we conclude that: log k n = O ( n ) : (2) log k n 6 = ( n ) : (3) log k n 6 = ( n ) : (4) Column2: We will prove that n k = o ( c n ). We want to show that for any constant a > 0, there exists a constant n > 0 : n k < ac n log n k < log ac n k log n < log a + log cn This is true for large enough n (it can be proven using L'Hopital's rule). So, n k = o ( c n ). (5) 1 From (5), we conclude that: n k = O ( c n ) : (6) n k 6 = ( c n ) : (7) n k 6 = ( c n ) : (8) Column3: Observe the function n sinn : The value of the exponent is oscillating between 1 and -1, taking all values in between.The value of the exponent is oscillating between 1 and -1, taking all values in between....
View Full Document

This document was uploaded on 10/29/2011.

Page1 / 4

cse220sol1 - Solutions for Homework 1 f(n) log k n n k p n...

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

View Full Document
Ask a homework question - tutors are online