GATE / CS ARCHIVE

GATE CSE 2011 / QUESTION 37

Ordering polynomial quasipolynomial exponential growth

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

GATE 2011, Q37 2 marks · MCQ
Report issue

Asymptotic Analysis & Recurrences

Question 37, GATE 2011: Order these functions by increasing asymptotic growth: f1(n)=2^n; f2(n)=n^(3/2); f3(n)=n log2 n; f4(n)=n^(log2 n).

(A) f3,f2,f4,f1
(B) f3,f2,f1,f4
(C) f2,f3,f1,f4
(D) f2,f3,f4,f1
Tap to enlarge
Your answer
Answer & solution

Official answer: A

n log n grows slower than n3/2. The function nlog2 n=2^((log2 n)²) eventually exceeds every fixed power of n, but is smaller than 2n since(log2 n)²=o(n). Hence f3<f2<f4<f1 asymptotically, A.

Pairwise ratios justify the ordering beyond a few sample values. f3/f2=(log2 n)/√n tends to zero. Taking logarithms, log2(f4/f2)=(log2 n)²-(3/2)log2 n tends to infinity. Finally log2(f4/f1)=(log2 n)²-n tends to minus infinity. Thus the quasipolynomial sits above every fixed-degree polynomial but below the exponential. Finite small-n ties or reversals do not affect an asymptotic comparison.

Original paper, page 10 · Answer key