GATE Computer ScienceVery hardGATE CS

Which is the tight asymptotic solution of T(n) = T(n/3) + T(2n/3) + n/log₂ n (with T(1) = 1)?

  1. A. Θ(n / log n)
  2. B. Θ(n log n)
  3. C. Θ(n)
  4. D. Θ(n log log n)

Correct answer: D. Θ(n log log n)

Akra–Bazzi: (1/3)ᵖ + (2/3)ᵖ = 1 gives p = 1. Then T(n) = Θ(n(1 + ∫ g(u)/u² du)) = Θ(n(1 + ∫ du/(u log u))) = Θ(n log log n). The recursion tree has log n levels each costing about n/log n at the top, but the level costs do not decay geometrically.

More Algorithms questions

Exams that ask this topic