IAE Academy

GATE 2026 CS2 Q.25: solution and answer

GATE 2026 · CS2Q.25 · 1 mark · MSQ

Which of the following can be recurrence relation(s) corresponding to an algorithm with time complexity ?

  1. (A)

  2. (B)

  3. (C)

  4. (D)

See the question in the paper

Answer and solution

ANSWER

Only options A and B give an algorithm with time complexity .

Official answer: A, BSource: Official answer key, GATE 2026 CS2 (IIT Guwahati)

  1. Option A: , . Unrolling: . So — qualifies.

  2. Option B: . Master theorem with : . Since for , this is Case 1, so — qualifies.

  3. Option C: . Master theorem with : , and , so this is Case 2, giving — this is not , so it does not qualify.

  4. Option D: . Unrolling: (sum of an arithmetic series) — this is not , so it does not qualify.

  5. 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

More Complexity questions