Asymptotic Notations

posted Oct 20, 2013, 10:53 PM by Anupinder Singh   [ updated Mar 3, 2014, 1:59 AM by Anupinder Singh ]
< Previous-Performance Analysis                                                                                                                                                                                            Next - Polynomial vs. Exponential Running Time>

Order of Growth: Whenever we work with algorithms, the most critical factor considered for them is their efficiency. And for this we are interested in analyzing how the running time increases when input size increases. when to algorithms are compared with respect to their behavior for large input size, the measure is know as Order of growth. The order of growth can be estimated by taking into account the dominant term of the running expression. The dominant term overpasses the values of the other terms when the input size is large.

For example:
  1. Let us consider T(n) = an + b where a>0, If the input size 'n' is multiplied by 'k' then the dominant term in T(n) i.e. 'an'  is also multiplied by 'k'. This produces T(kn) = k(an)+b and we can say that T(n) has a linear order of growth.
  2. Let us consider T(n) = an2+ bn + c where a>0, If the input size 'n' is multiplied by 'k' ,this produces T(kn) = (k2a)n2+ (kb)n + c, thus the dominant term is multiplied by k2 and we can say that T(n) has a quadratic order of growth. and so on for cubic, logarithmic etc.
Thus for efficiency with respect to large problems the analysis is made for large values of the input size and dominant terms plays and important role. The analysis that is conducted for large values of input size is called as asymptotic analysis.

In Asymptotic analysis it is considered that an algorithm 'A1' is better than algorithm 'A2' if the order of growth of the running time of the 'A1' is lower than that of 'A2'. Therefore asymptotic efficiency of algorithms are concerned with how the running time of an algorithm increases with the size of the input in the limit, as the size of the input increases without bound.

Asymptotic Notations: For every algorithm corresponding to efficiency analysis, we have three basic cases :
  • Best Case
  • Average Case
  • Worst Case
And there are 5 notations to resemble them:

 S.No Asymptotic Notation Name
Symbol Used
 Efficiency Case Resemblance   Examples
 1     Theta notation
 Θ  Average Case (Tightly Bound)
 Θ(1), Θ(n), Θ(n2), Θ(n3), Θ(nn), Θ(log n), Θ(n log n)
 2     Big oh notation  O  Worst Case (Tightly Bound)
 O(1), O(n), O(n2), O(n3), O(nn), O(log n), O(n log n)
 3     Omega notation  Ω  Best Case (Tightly Bound)
 Ω(1), Ω(n), Ω(n2), Ω(n3), Ω(nn), Ω(log n), Ω(n log n)
 4     Little oh notation  o  Worst Case (Loosely Bound)
 o(1), o(n), o(n2), o(n3), o(nn), o(log n), o(n log n)
 5    Little omega notation  ω  Best Case (Loosely Bound)
 ω(1), ω(n), ω(n2), ω(n3), ω(nn), ω(log n), ω(n log n)

< Previous-Performance Analysis                                                                                                                                                                                            Next - Polynomial vs. Exponential Running Time>