Which of the following can be recurrence relation(s) corresponding to an algorithm with time complexity ?
- (A)
- (B)
- (C)
- (D)
Which of the following can be recurrence relation(s) corresponding to an algorithm with time complexity ?
ANSWER
Only options A and B give an algorithm with time complexity .
Official answer: A, BSource: Official answer key, GATE 2026 CS2 (IIT Guwahati)
Option A: , . Unrolling: . So — qualifies.
Option B: . Master theorem with : . Since for , this is Case 1, so — qualifies.
Option C: . Master theorem with : , and , so this is Case 2, giving — this is not , so it does not qualify.
Option D: . Unrolling: (sum of an arithmetic series) — this is not , so it does not qualify.
Only A and B evaluate to ; C is and D is .
KEY IDEA
Solve each recurrence (by unrolling or the Master theorem) and check which reduce to .
WATCH OUT FOR
Applying the Master theorem's Case 1 condition loosely and forgetting that a constant is for any (e.g. ), or confusing Case 1 (branching term dominates) with Case 2 (equal growth, giving an extra factor) — this is exactly what makes option C a distractor for .
From the GATE 2026 CS2 paper. Every question of this paper · Download the full paper · All 14 Complexity questions, with notes