GATE / CS ARCHIVE

GATE CSE 2005 / QUESTION 37

False bound for a divide-and-conquer recurrence

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

GATE 2005, Q37 2 marks · MCQ
Report issue

Asymptotic Analysis & Recurrences

Question 37, GATE 2005: T(n)=2T(n/2)+n, with T(0)=T(1)=1. Which claim is false? A O(n²); B Θ(n log n); C Ω(n²); D O(n log n).
Tap to enlarge
Your answer
Answer & solution

Answer: C (no official key was published)

For n=2k, dividing by n gives T(n)/n=T(n/2)/(n/2)+1, so T(n)=n(1+log2 n). Standard rounding of subproblem sizes preserves Θ(n log n). Therefore O(n²), Θ(n log n), and O(n log n) hold, but Ω(n²) does not, C, since(n log n)/n²→0.

For powers of two, each recursion level contributes n and there are log₂n nontrivial levels plus linear total base cost. Thus T(n)=n(1+log₂n), giving Θ(n log n). This is bounded above by n² but not below by a positive constant times n², since log n/n tends to zero. Hence the false bound is C. A loose upper bound can still be true even when it is not tight.

Original paper, page 5