Consider the following recurrence relation:
Which one of the following options is CORRECT?
- (A)
- (B)
- (C)
- (D)
Consider the following recurrence relation:
Which one of the following options is CORRECT?
ANSWER
T(n) = Θ(n log log n) — option (A).
Official answer: ASource: Official answer key, GATE 2024 CS1 (IISc Bengaluru)
Substitute , so , and , so .
The recurrence becomes .
Divide both sides by : . Let ; then .
This is a Master-theorem case with , , : since matches the degree of , .
So . Since and , this gives .
This matches option (A).
KEY IDEA
A recurrence with a argument is solved by the double substitution (turning into a halving of ), then dividing through by the multiplicative factor so the recurrence becomes a plain additive one in , solvable directly or via the Master theorem.
WATCH OUT FOR
Stopping after finding and forgetting to re-substitute into the -side, so students report (option B) instead of correctly reducing to get .
From the GATE 2024 CS1 paper. Every question of this paper · Download the full paper · All 14 Complexity questions, with notes