Skip to content
Mad4Study

Engineering & Science

GATE Computer Science

  • GATE CS
  • 2026–27 pattern practice
  • Algorithms
  • Recurrences
  • Easy

What is the solution of T(n)=3T(n/2)+nT(n) = 3T(n/2) + n?

Asymptotic Analysis

Pick an option to check your answer.

Master theorem: a=3a = 3, b=2b = 2, so nlog⁡ba=nlog⁡23≈n1.585n^{\log_b a} = n^{\log_2 3} \approx n^{1.585}. Since f(n)=n=O(nlog⁡23−ϵ)f(n) = n = O(n^{\log_2 3 - \epsilon}), this is case 1: T(n)=Θ(nlog⁡23)T(n) = \Theta(n^{\log_2 3}) — the Karatsuba multiplication recurrence.

Why not the others

  • Θ(nlog⁡n)\Theta(n\log n) fits a=b=2a = b = 2 (case 2).
  • Θ(n2)\Theta(n^2) fits T(n)=4T(n/2)+nT(n) = 4T(n/2) + n.
  • Θ(n)\Theta(n) would need f(n)f(n) to dominate (case 3), which it does not.

Report an error

GATE CS · Algorithms · Asymptotic Analysis