GATE / CS ARCHIVE

GATE CSE 2008 / QUESTION 39

Factorial versus exponential and quasipolynomial

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

GATE 2008, Q39 2 marks · MCQ
Report issue

Asymptotic Analysis & Recurrences

Question 39, GATE 2008: Let f(n)=2^n, g(n)=n!, h(n)=n^(log n). Which asymptotic statement is true?

(A) f=O(g); g=O(h)
(B) f=Ω(g); g=O(h)
(C) g=O(f); h=O(f)
(D) h=O(f); g=Ω(f)
Tap to enlarge
Your answer
Answer & solution

Answer: D (no official key was published)

1. Compare logarithms, which preserve growth order for positive functions. log h=(log n)² up to base constants; log f=Θ(n). Since (log n)²=o(n), h grows slower than f.
2. Stirling gives log(n!)=n log n−n+O(log n), which grows faster than n. Thus f grows slower than g.
3. Therefore h=O(f) and g=Ω(f), D.

Original paper, page 7