Asymptotic Analysis
Asymptotic Analysis
Asymptotic Notations
Execution time of an algorithm depends on the instruction set, processor
speed, disk I/O speed, etc. Hence, we estimate the efficiency of an algorithm
asymptotically.
O − Big Oh Notation
Ω − Big omega Notation
θ − Big theta Notation
o − Little Oh Notation
ω − Little omega Notation
A function f(n) can be represented is the order of g(n) that is O(g(n)), if there
exists a value of positive integer n as n0 and a positive constant c such that
−
Example
Considering g(n)=n3g(n)=n3,
Example
Example
constant − O(1)
logarithmic − O(log n)
quadratic − O(n2)
cubic − O(n3)
polynomial − nO(1)
exponential − 2O(n)