GATE / CS ARCHIVE

GATE CSE 2021 SET 2 / QUESTION 39

GATE CSE 2021 Set 2 Q39

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

GATE 2021 Set 2, Q39 2 marks · MCQ
Report issue

Asymptotic Analysis & Recurrences

Question 39, GATE 2021: T(n)=aT(n/b)+f(n), a>1,b>1. Let d=log_b a. A f=n log₂n implies T=Θ(n log₂n); B f=n/log₂n implies T=Θ(log₂n); C f=O(n^(d−ε)), ε>0 implies T=Θ(n^d); D f=Θ(n^d) implies T=Θ(n^d). Choose correct statement under usual running-time recurrence conventions.
Tap to enlarge
Your answer
Answer & solution

Official answer: C

For the standard running-time recurrence with positive constant base cost, nonnegative work, and terminating integer-size conventions, write d=logb a. If f(n)=O(nd−ε) for ε>0, work per level increases geometrically toward the leaves and total cost is Θ(nd), Master Theorem case1, C. Equal-order work in D adds a logarithmic factor. A lacks a condition on a, b, and B is already smaller than its own n/log n root work.

At recursion depth j, there are aj nodes of size n/bj, and height logb n. Leaves number alogb n=nd. For polynomially smaller f, the sum is bounded by a geometric series of that order. At equal order every level instead costs Θ(nd), so D misses Θ(log n) levels. Taking a=b and f=n log n also refutes A, giving Θ(n log²n).

Original paper, page 77 · Answer key