GATE / CS ARCHIVE

GATE CSE 2021 SET 1 / QUESTION 3

GATE CSE 2021 Set 1 Q3

Algorithms · Asymptotic Analysis & Recurrences · Full GATE CSE 2021 Set 1 paper

GATE 2021 Set 1, Q3 1 mark · MCQ
Report issue

Asymptotic Analysis & Recurrences

Question 3, GATE 2021: Let f1=10^n, f2=n^(log n), and f3=n^(√n). Arrange by increasing asymptotic growth. A f3,f2,f1; B f2,f1,f3; C f1,f2,f3; D f2,f3,f1.
Tap to enlarge
Your answer
Answer & solution

Official answer: D

Taking logarithms gives log f2=Θ((log n)²), log f3=√n log n, and log f1=n log10. Since (log n)²=o(√n log n) and √n log n=o(n), the increasing order is f2, f3, f1, D.

Logarithms are strictly increasing on positive values, so their comparison preserves the order. Ratios of logarithms settle both gaps: (log n)²/(√n log n)=(log n)/√n→0 and (√n log n)/n=(log n)/√n→0. Consequently f2/f3 and f3/f1 tend to zero. The phrase 'n raised to log n' is not n log n; misreading the exponent would change the classification.

Original paper, page 13 · Answer key