Sunday, November 16, 2014

Week 10: Mr. Calculus :(

Firstly, a short note on a proof.

Prove n^3 is not in O(3n^2): Why n = B + ceil(c3) + 1?
(/forall c in R+, /forall B in N, /exists n in N, n >= B implies n^3>c3n^2.)

- For the antecedent, we set n = B + something.

- For the consequent, we need n^3 STRICTLY greater than c3n^2.
   Well, then you need:  n > c3...
   So you need to set n = ceil(c3) + something.
   Now B isn't enough because B can equal 0. (set N).
   So then you just 'cheat' it by adding 1! n > ceil(c3) + 1.

- Combine the two requirements to get n = B + ceil(c3) + 1.
 

And....now mr. calculus strikes! (do not cry T_T)

Things to remember when c^n is involved: (example: 2^n)
#f compared to some bound of g
  • Put f / g. 
  • Now take the limit of it. Use L'Hopital's rule.
  • You get either infinity OR some limit!
    #(for simplicity, the questions we deal with is either infinity or 0.)
  • Now if it is infinity, then it is greater than any number we throw at it to compare.
    #Call this number c (in R+): f / g > c.
    If it is 0, then it is smaller than any number we throw at it to compare.
    #f / g < c.
  • But we're dealing with limits....which means we are comparing f/g to c at a big enough input n. #AKA n >= B.
    #In some cases, you need to pick n. Just make sure it makes the antecedent true!

No comments:

Post a Comment