Question

Consider the following recurrence relations:

For all n>1n > 1,

T1(n)=4T1(n2)+T2(n)T_1(n) = 4T_1\left(\frac{n}{2}\right) + T_2(n)
T2(n)=5T2(n4)+Θ(log⁡2n)T_2(n) = 5T_2\left(\frac{n}{4}\right) + \Theta(\log_2 n)

Assume that for all n≤1n \le 1, T1(n)=1T_1(n) = 1 and T2(n)=1T_2(n) = 1.

Which one of the following options is correct?

Choose one option
Official answer and solution
Official answer
A
From
Official GATE 2026 answer key

Solution

Solve T2(n)T_2(n) first using the Master Theorem, then substitute the asymptotic bound for T2(n)T_2(n) into the recurrence for T1(n)T_1(n).

  1. Solve T2(n)=5T2(n/4)+Θ(log⁡2n)T_2(n) = 5T_2(n/4) + \Theta(\log_2 n):
    • Here a=5,b=4a = 5, b = 4, so nlog⁡ba=nlog⁡45≈n1.161n^{\log_b a} = n^{\log_4 5} \approx n^{1.161}.
    • Since f(n)=Θ(log⁡2n)=O(nlog⁡45−ϵ)f(n) = \Theta(\log_2 n) = O(n^{\log_4 5 - \epsilon}) for ϵ=0.1\epsilon = 0.1, Case 1 of the Master Theorem gives:
      T2(n)=Θ(nlog⁡45)T_2(n) = \Theta\left(n^{\log_4 5}\right)
  2. Solve T1(n)=4T1(n/2)+T2(n)T_1(n) = 4T_1(n/2) + T_2(n):
    • Here a=4,b=2a = 4, b = 2, so nlog⁡ba=nlog⁡24=n2n^{\log_b a} = n^{\log_2 4} = n^2.
    • Since T2(n)=Θ(nlog⁡45)T_2(n) = \Theta(n^{\log_4 5}) and log⁡45=log⁡252<42=2\log_4 5 = \frac{\log_2 5}{2} < \frac{4}{2} = 2, we have T2(n)=O(n2−ϵ)T_2(n) = O(n^{2 - \epsilon}) for ϵ=2−log⁡45>0\epsilon = 2 - \log_4 5 > 0.
    • By Case 1 of the Master Theorem, T1(n)=Θ(n2)T_1(n) = \Theta(n^2).
Final answer

Option (A)

Common trap

Assuming T2(n)T_2(n) dominates n2n^2 without checking that log⁡45≈1.161<2\log_4 5 \approx 1.161 < 2.

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2026 Computer Science and Information Technology - Session 1 (CS1)
Question
17 of 65
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.