IAE Academy

GATE 2026 CS1 Q.17: solution and answer

GATE 2026 · CS1Q.17 · 1 mark · MCQ

Consider the following recurrence relations:

For all ,

Assume that for all , and .

Which one of the following options is correct?

  1. (A)

  2. (B)

  3. (C)

  4. (D)

See the question in the paper

Answer and solution

ANSWER

T1(n) = Θ(n²), matching option (A)

Official answer: ASource: Official answer key, GATE 2026 CS1 (IIT Guwahati)

  1. Solve the inner recurrence T2(n) = 5T2(n/4) + Θ(log₂n) via the Master theorem: a=5, b=4, so the watershed function is n^{log_4 5} ≈ n^{1.161}.

  2. Since f(n) = Θ(log₂n) = O(n^{log_4 5 - ε}) for ε = 1 > 0, Master theorem Case 1 applies, giving T2(n) = Θ(n^{log_4 5}).

  3. Substitute this closed form into the outer recurrence: T1(n) = 4T1(n/2) + Θ(n^{log_4 5}).

  4. Apply the Master theorem to T1: a=4, b=2, so the watershed function is n^{log_2 4} = n².

  5. Compare f(n) = Θ(n^{log_4 5}) ≈ Θ(n^{1.161}) with n²: since log_4 5 < 2, f(n) = O(n^{2-ε}) for ε = 2 - log_4 5 > 0, so Master theorem Case 1 applies again.

  6. Therefore T1(n) = Θ(n²), which is option (A).

KEY IDEA

Solve the inner recurrence T2 first with the Master theorem, then substitute the resulting Θ-bound into the outer recurrence T1 and apply the Master theorem a second time.

WATCH OUT FOR

Applying the Master theorem to T1 using the printed f(n) = T2(n) symbolically (or assuming T2(n) = Θ(n) / Θ(log n) without first solving it), instead of substituting the actual closed form Θ(n^{log_4 5}) for T2(n) before comparing against n^{log_2 4} = n².

From the GATE 2026 CS1 paper. Every question of this paper · Download the full paper · All 14 Complexity questions, with notes

More Complexity questions