Skip to content
Mad4Study

Engineering & Science

GATE Computer Science

  • GATE CS
  • 2026–27 pattern practice
  • Algorithms
  • Master theorem
  • Easy

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

Asymptotic Analysis

Pick an option to check your answer.

Here a=9a = 9, b=3b = 3, so nlog⁡ba=nlog⁡39=n2n^{\log_b a} = n^{\log_3 9} = n^2.

  1. f(n)=n=O(n2−ϵ)f(n) = n = O(n^{2 - \epsilon}) with ϵ=1\epsilon = 1.
  2. This is Case 1 of the master theorem: the leaves dominate.
  3. T(n)=Θ(n2)T(n) = \Theta(n^2).

Why not the others

  • Θ(nlog⁡n)\Theta(n \log n) applies when f(n)=Θ(nlog⁡ba)f(n) = \Theta(n^{\log_b a}); here f(n)=nf(n) = n is polynomially smaller than n2n^2.
  • Θ(n2log⁡n)\Theta(n^2 \log n) would need f(n)=Θ(n2)f(n) = \Theta(n^2).
  • Θ(n3)\Theta(n^3) overestimates: the leaves contribute nlog⁡39=n2n^{\log_3 9} = n^2, not n3n^3.

Report an error

GATE CS · Algorithms · Asymptotic Analysis