Skip to content
Official PYQ · 2001

GATE CS 2001 Q1.16 — Asymptotic Worst Case Time and Space Complexity

Explain with AI

Let f(n)=n2log⁡nf(n) = n^2 \log n and g(n)=n(log⁡n)10g(n) = n(\log n)^{10} be two positive functions of nn. Which of the following statements is correct?

Choose one option
View worked solution

Answer: B

To compare the asymptotic growth rates of the two functions f(n)=n2log⁡nf(n) = n^2 \log n and g(n)=n(log⁡n)10g(n) = n(\log n)^{10}, we can analyze their ratio as n→∞n \to \infty:

f(n)g(n)=n2log⁡nn(log⁡n)10=n(log⁡n)9\frac{f(n)}{g(n)} = \frac{n^2 \log n}{n (\log n)^{10}} = \frac{n}{(\log n)^9}

We know that any positive polynomial power of nn grows strictly faster than any polylogarithmic power of nn as n→∞n \to \infty. That is, for any constant k>0k > 0:

lim⁡n→∞n(log⁡n)k=∞\lim_{n \to \infty} \frac{n}{(\log n)^k} = \infty

Applying this with k=9k = 9:

lim⁡n→∞f(n)g(n)=∞\lim_{n \to \infty} \frac{f(n)}{g(n)} = \infty

This indicates that f(n)f(n) grows strictly faster than g(n)g(n). Consequently:

  • g(n)=O(f(n))g(n) = O(f(n)) (since g(n)g(n) is asymptotically bounded above by f(n)f(n))
  • f(n)≠O(g(n))f(n) \neq O(g(n)) (since f(n)f(n) grows strictly faster than g(n)g(n))

Thus, the correct statement is B.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Asymptotic Worst Case Time and Space Complexity questions