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)?
- A. Θ(n / log n)
- B. Θ(n log n)
- C. Θ(n)
- 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
- A flow network has directed edges (capacity): s→a 4, s→b 3, a→b 2, a→c 2, b→c 2, b→d 3, c→t 4, d→t 2, c→d 1. Let F be the maximum s–t flow…
- For the Petersen graph (10 vertices, 15 edges, 3-regular, independence number 4), let VC be the size of a minimum vertex cover and MM the…
- Binary insertion sort sorts 10 distinct elements. It inserts the k-th element into the sorted prefix of k − 1 elements by binary search…
- A sorted array holds 1000 distinct elements and binary search (one three-way comparison per probe) is applied. What is the worst-case…
- What is the asymptotic solution of T(n) = 3T(n/2) + n² with T(1) = 1?
- Selection sort (find the minimum of the unsorted part and exchange it with the first unsorted position, skipping the exchange when the…