asymptotic tight bound for quadratic functions

后端 未结 6 766
-上瘾入骨i
-上瘾入骨i 2021-01-31 11:41

In CLRS (Introduction to Algorithms by Cormen, Leiserson, Rivest, and Stein), for a function

f(n) = an2 + bn

6条回答
  •  野性不改
    2021-01-31 12:36

    To prove that any polynomial f(n)=a0+a1*n+a2*n^2+a3*n^3+...+am*n^m is theta(n^m), follow two simple steps. step 1. show that f(n) is bigOh(n^m) step 2. show that f(n) is bigOmega(n^m)

    If both the above conditions hold good, then definitely f(n) is bigTheta(n^m).

    This is a generalization. By putting m=2, you get f(n) is bigTheta(n^2) Simple.. isn't it?

提交回复
热议问题