GATE / CS ARCHIVE

GATE CSE 2001 / QUESTION 1.16

Comparing polynomial and polylogarithmic factors

Algorithms · Asymptotic Analysis & Recurrences · Full GATE CSE 2001 paper

GATE 2001, Q1.16 1 mark · MCQ
Report issue

Asymptotic Analysis & Recurrences

Question 1.16, GATE 2001: Compare f(n)=n² lg n and g(n)=n(lg n)^10. Which asymptotic relationship holds: only f=O(g), only g=O(f), neither, or both?
Question 1.16, GATE 2001: Compare f(n)=n² lg n and g(n)=n(lg n)^10. Which asymptotic relationship holds: only f=O(g), only g=O(f), neither, or both?
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

Step 1: Divide f(n)=n² lg n by g(n)=n(lg n)10. The ratio is n/(lg n)9.

Step 2: Put t=lg n, so the ratio becomes 2t/t9, which tends to infinity because an exponential dominates every fixed power of t.

Therefore g=O(f), while f is not O(g), giving B. The logarithmic factor with exponent 10 cannot compensate asymptotically for the additional factor n in f.

Original paper, page 2