Big Oh Notation
Goals :
- ignore details that do not impact comparisons of algorithms
- ignore constant factors
f(n) = O(g(n)) <=> cg(n) is upper bound on f(n)
<=> There exist c, N s.t. for n>=N, f(n) <= cg(n)
f(n) = W(g(n)) <=> cg(n) is lower bound on f(n)
<=> There exist c, N s.t. for n>=N, f(n) >= cg(n)
f(n) = Q(g(n)) <=> f(n) = O(g(n)) and f(n) = W(g(n))
<=> There exist c1, c2, N s.t. for n>=N,
c1 g(n) <= f(n) <= c2g(n)