GATE / CS ARCHIVE

GATE CSE 2000 / QUESTION 2.17

Asymptotic comparison using logarithmic identities

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

GATE 2000, Q2.17 2 marks · MCQ
Report issue

Asymptotic Analysis & Recurrences

Question 2.17, GATE 2000: Let f(n)=3n^(√n),g(n)=2^(√n log2 n),h(n)=n!. Which is true: h=O(f),h=O(g),g is not O(f),or f=O(g)?
Tap to enlarge
Your answer
Answer & solution

Answer: D (no official key was published)

Step 1: Use 2log2 n=n to simplify g(n)=n√n. Hence f(n)=3g(n), so f and g are Θ-equivalent. This proves D and refutes the claim that g is not O(f).

Step 2: Factorial grows faster: n!≥(n/2)n/2, whose logarithm is(n/2)log(n/2), while log g=√n log n. Their ratio of logarithmic scales tends to infinity.

Thus h is neither O(f) nor O(g), leaving D.

Original paper, page 5