Consider the following recurrence relations:
For all ,
Assume that for all and .
Which one of the following options is correct?
GATE CSE 2026Algorithms › Growth of Functions & Complexity AnalysisVerified
(A) T 1 ( n ) = Θ ( n 2 ) T_{1}(n)=\Theta\left(n^{2}\right) T 1 ( n ) = Θ ( n 2 )
The two recurrences are nested: T1 calls T2. First resolve T2 with the Master Theorem to obtain its asymptotic order, then substitute that order into T1 and apply the Master Theorem a second time.
Solving the inner recurrence gives T2(n) = $Θ(n^{log_4 5})$. Feeding this into T1(n) = 4T1(n/2) + T2(n) and applying the Master Theorem with a = 4, b = 2 yields $log_2 4 = 2$ > $log_4 5$, so Case 1 applies and T1(n) = $Θ(n^2)$ — option A.
Reviewed by GateIQ Editorial Team: IIT & IISc Alumni.