Similar questions 6 more →
Asymptotic Analysis & Recurrences

Answer & solution
Official answer: A
Our answer: Theta(n^2)
Givens and goal
For n>1, T1(n)=4T1(n/2)+T2(n), and T2(n)=5T2(n/4)+Θ(log₂n). Both equal 1 for n≤1. Determine T1’s asymptotic order among n², n²log₂n, nlog₄5, and nlog₄5log₂n.
Approach
Solve T2 first, then use its growth rate as the nonrecursive term in the recurrence for T1.
Step-by-step solution
1. In T2, the branching parameters are a=5 and b=4. The critical power is nlog₄5. Set α=log₄5≈1.161.
2. A logarithm is polynomially smaller than n^α: for example log₂n=O(nα/2). The first case of the Master theorem therefore gives T2(n)=Θ(n^α).
3. Substitute into T1: T1(n)=4T1(n/2)+Θ(n^α). Its critical power is nlog₂4=n². Because α<2, the additive term is again polynomially smaller than the critical power.
4. Applying the same Master-theorem case yields T1(n)=Θ(n²), option A. There is no extra logarithmic factor because the additive term is not Θ(n²), which would be the balanced case.
5. A recursion-tree check explains the dominance. At depth j, the T2 work totals Θ(4j(n/2j)^α)=Θ(n^α(4/2^α)j). The ratio exceeds 1, so lower levels dominate. With depth log₂n, the leaf scale is 4log₂n=n². Standard floor/ceiling handling of non-power inputs does not change this asymptotic result.