Asymptotic notations are used to analyze and determine the running time of an algorithm.
There are three main types of asymptotic notations:
Big-oh
notation: Big-oh is used for upper bound values.Big-Omega
notation: Big-Omega is used for lower bound values.Theta
notation: Theta is used for average bound values.If f(n)
is Big-Oh(g(n))
, then a*f(n)
is Big-Oh(g(n))
If f(n)
is Omega(g(n))
, then a*f(n)
is Omega(g(n))
f(n)
is given, then f(n)
is Big-Oh(f(n))
f(n)
is Big-Oh(g(n))
and g(n)
is Big-Oh(h(n))
, then f(n)=Big-oh(h(n))
then
If f(n)
is theta(g(n))
, then g(n)
is theta(f(n))
Suppose
If f(n) = Big-Oh(g(n))
, then g(n)
is Omega(f(n))
and
Tmhen n
is and is