GATE Computer ScienceModerateGATE CS (PYQ pattern)

Which is the tight solution of T(n) = 3T(n/4) + n^(log₄3)·log₂ n?

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

Correct answer: A. Θ(n^(log₄3)·log² n)

Here f(n) = n^(log_b a)·log n, the extended case 2 of the master theorem with k = 1, so T(n) = Θ(n^(log₄3)·log^(k+1) n) = Θ(n^(log₄3) log² n). Every one of the log₄ n levels costs about n^(log₄3)·(log n − 2i), which sums to a log² factor.

More Algorithms questions

Exams that ask this topic