assignment1 - Jacob Manske 31 August 2007 Exercise 01 Let f...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
31 August 2007 Jacob Manske Com S 511 - Assignment 1 Exercise 01 Let f , g be asymptotically positive functions such that the limit lim n →∞ f ( n ) g ( n ) exists and is finite. Prove that f O ( g ) . Proof. Since lim n →∞ f ( n ) g ( n ) exists and is finite and f and g are asymptotically positive, c R + ∪{ 0 } such that lim n →∞ f ( n ) g ( n ) = c. Then N such that n N , ± ± ± ± f ( n ) g ( n ) - c ± ± ± ± < 1. Then f ( n ) g ( n ) - c < 1, so f ( n ) < ( c + 1) g ( n ) n N . Hence f O ( g ), as desired. Exercise 02 Suppose you have a choice of four algorithms to solve a given problem with the following (approximate) running times as a function of input size n : Algorithm 1: n 4 seconds, Algorithm 2: 30 n 3 seconds, Algorithm 3: 1200 n 2 seconds, Algorithm 4: 60000 n seconds. Specify a range of n for which each of the algorithms is optimal. Solution. To find a range of n for which algorithm i is optimal, we find those n such that the running time for algorithm
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/01/2008 for the course COMS 511 taught by Professor Dick during the Fall '07 term at Iowa State.

Page1 / 2

assignment1 - Jacob Manske 31 August 2007 Exercise 01 Let f...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online