You are on page 1of 13

Chapter-2

Algorithmic Efficiency and its


Complexity
Contents
- Time and Space analysis
- Asymptotic notations – Big O, Big Sigma, Theta, Omega
f(n) = O(g(n))
f(n) <= c.g(n)
c>0
Ex: f(n) = 2n2 + n n >= n0
f(n) = O ( ) n0 >= 0
0r, 2n2 + n <= c.n2
or, 2n2 + n <= 3n2
or, n <= n2
or, 1 <= n
or, n >= 1

Worst Case, Upper Bound Value of c should be lowest upper value

You might also like