Question #265244

Suppose T(n) and f(n) and two functions. Write asymptotic notations (Ο, Ω, Θ) using these two functions and explain the growth rate of these functions in each notation.


Expert's answer

f(n)=O(T(n))f(n)=O(T(n)) if there exists a positive real number M and a real number n0 such that

f(n)MT(n)f(n)\le MT(n) for all nn0n\ge n_0


f(n)=Ω(T(n))f(n)=\Omega(T(n)) if there exists a positive real number M and a real number n0 such that

f(n)MT(n)f(n)\ge MT(n) for all nn0n\ge n_0


f(n)=θ(T(n))f(n)=\theta(T(n)) if there exists a positive real numbers M1, M2 and a real number n0 such that

M1T(n)f(n)M2T(n)M_1T(n)\le f(n)\le M_2T(n) for all nn0n\ge n_0



LATEST TUTORIALS
APPROVED BY CLIENTS