Sunday, 23 November 2014

Big-oh of polynomials--Week 9

This week we introduce the big-Oh of polynomials. First, we introduce what is big-Oh O(n^2)? It is a polynomial function that  take a natural number and return a positive real number such that
 cR+,  BN, N, n>=B, 3n^2+2n<=c(n^2). This may look hard to understand, so we can give a simple example of big-Oh proof.

Prove 3n^2+2n O(n^2)

 cR+,  BN, nN, n>=B, 3n^2+2n<=c(n^2)

Pick c=5 ,then CR+
pick b=0, then  BN
assume nN,
    assume n>=B
         then 3n^2+2n<= 3n^2+2n^2
                                 =5n^2
                                =cn^2



     then n>=B ⇒ 3n^2+2n<=cn^2
then BN, then n>=B ⇒ 3n^2+2n<=cn^2
then  cR+,  BN, nN, n>=B, 3n^2+2n<=c(n^2)

No comments:

Post a Comment