Professional Documents
Culture Documents
functions: O
o-notation: f(n) = o(g(n)) (little-oh of g of n) real numbers:
o(g(n))= {f(n)| for any positive constant c, there
Transitivity, Reflexivity, Symmetry
exists a constant n0 > 0 such that
0 f(n) < cg(n) Any two real numbers can be compared.
for all n n0} (trichotomy) But, not any two functions can be
compared.
2n = o(n2), but 2n2 o(n2).
f(n) = o(g(n)) can also be defined as Example: f(n)=n and g(n)=n1+sin n
f (n )
lim = 0.
n g ( n ) Homework: Problems 3-2, 3-3, 3-4.
3-5
Appendix A: Summation formulas
n n n
(cak bk ) c ak bk
k 1 k 1 k 1
n 1 n
2 n(n 1) (n 2 )
k x k ( x n 1 1) /( x 1)
k 1 k 0
n 1
Hn k log e n O(1) (Harmonic series)
k 1
1 x
x k
1 x
( x 1) kx k (1 x )2
( x 1)
k 0 k 0
n 1 1 n 1 1 1 1
( ) 1
k 1 k ( k 1) k 1 k k 1 n
n n
lg ak lg ak
k 1 k 1