What are basic methodologies on solving questions related to comparison of rate of growth of two different functions?

63 Views Asked by At

How to compare rate of growth for following functions?

In other words, is $f(n)$ = $O( \, g(n) \, )$ or $g(n)$ = $O(\, f(n) \, )$?

$f(n) = n^{\frac{4}{3}}$ and $g(n) = n*(\log(n))^3$

How to solve these kind of questions in general (Basic methodologies on how to approach these questions) ? Are limits always bound to give right answer?

1

There are 1 best solutions below

0
On BEST ANSWER

Yes.

By definition, $$f=O(g) \iff \frac{|f|}{|g|} \text {is bounded}$$

In your case, this translates to considering $$\lim _{n \to \infty} \frac{n^{4/3}}{n(\log n)^3} = \lim _{n \to \infty} \frac {n^{1/3}} {(\log n)^3}$$

Now use L'Hopital's rule three times:

\begin{align} \lim \frac {n^{1/3}} {(\log n)^3} & = \lim \frac{\frac{1}{3}n^{-2/3}} {3 (\log n)^2 (1/n)} \\ & = \lim \frac{n^{1/3}} {9 (\log n)^2} \\ &= \lim \frac{\frac{1}{3}n^{-2/3}}{18 (\log n) (1/n)} \\ &= \lim \frac{n^{1/3}}{54 \log n} \\ &= \lim \frac{\frac{1}{3}n^{-2/3}}{54 (1 / n)} \\ &= \frac{n^{1/3}}{162} \end{align}

which is clearly unbounded i.e. $f$ is not in $O(g)$.

Performing the converse analysis however, we find that $\lim _{n \to \infty} g/f = 0$, and therefore $g = O(f)$.