This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Special case?
Was the rst bigOh exercise a special case? What happens to the argument if you add a constant: Prove 3n2 + 2n + 5 P y(n2) See what needs to be modied in the proof to accommodate the constant 5. slide 9 in general, O(g ):
y(
g ) = ff : N U3 R0 j Wc P R+; WB P N; Vn P N; n ! B A f (n) 7n6 5n4 + 2n3 P y(6n8 4n5 + n2) cg n ( )g Prove: slide 10 how to prove n3 TP y(3n2)? slide 12 nonpolynomials
Bigoh statements about polynomials are pretty easy to prove: f P y(g ) exactly when the highestdegree term of g is no smaller than the highestdegree term of f . What about functions such as log(n) or 3n? Logarithmic functions are in bigOh of any polynomial, whereas exponential functions (with a base bigger than 1) are not in bigOh of any polynomial. How do you prove such things? slide 14 the long way
Without the techniques of calculus, you could prove that 2n TP y(n2). The key idea is that you'd have to show that for any given c, you could nd an n so that 2n > cn2. To make this work nicely, it would be nice to have a piece of n to overwhelm any multiplier c that could be thrown at us in the form of cn2. For example, it would be convenient if 2n were greater than n3 = nn2. This certainly isn't true for all n, but is it true \eventually"? Exercise: nd natural number k so that you can prove that for all natural numbers greater than k, 2n > n3. slide 15 ...
View
Full Document
 Fall '10
 DannyHeap
 Computer Science, Derivative, Complex number, special case, rst bigOh exercise

Click to edit the document details