The GATE Grind

GATE 2011 CS (CS1) – Question 47

Algorithms · Asymptotic Analysis and Time/Space Complexity · 2 marks · Multiple choice

Find increasing asymptotic growth order for $f_1(n)=2^n$, $f_2(n)=n^{3/2}$, $f_3(n)=n\log_2n$, $f_4(n)=n^{\log_2n}$.

  1. f₃,f₂,f₄,f₁
  2. f₃,f₂,f₁,f₄
  3. f₂,f₃,f₁,f₄
  4. f₂,f₃,f₄,f₁

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: (A) f₃,f₂,f₄,f₁

Explanation

log n grows slower than n¹ᐟ², so f₃<f₂ asymptotically. The exponent log₂n eventually exceeds every fixed constant, making f₄ superpolynomial. But $\log_2 f_4=(\log_2n)^2=o(n)=\log_2 f_1$, so f₄ remains below the exponential f₁. Thus A.

More Asymptotic Analysis and Time/Space Complexity questions

All Asymptotic Analysis and Time/Space Complexity questions →