GATE Computer ScienceModerateGATE CSE

What is the asymptotic solution of T(n) = 3T(n/2) + n² with T(1) = 1?

  1. A. Θ(n^1.585)
  2. B. Θ(n² log n)
  3. C. Θ(n³)
  4. D. Θ(n²)

Correct answer: D. Θ(n²)

Here a = 3, b = 2 and n^(log₂3) ≈ n^1.585 is polynomially smaller than f(n) = n². Case 3 of the master theorem holds (regularity 3(n/2)² = 0.75n² ≤ cn²), so T(n) = Θ(n²).

More Algorithms questions

Exams that ask this topic