How the Master Theorem cases work
For T(n)=aT(n/b)+f(n), calculate c=log_b(a) and compare f(n) with n^c. The comparison describes whether work is concentrated near the recursion-tree leaves, balanced across levels, or concentrated near the root.
Case 1: leaves dominate
f(n) = O(n^(c−ε))
For some ε > 0, the additive work grows polynomially slower. Result: Θ(n^c).
Case 2: levels balance
f(n) = Θ(n^c)
In the classic boundary case, each level contributes the same order. Result: Θ(n^c log n).
Case 3: root dominates
f(n) = Ω(n^(c+ε))
If the regularity condition also holds, the additive work wins. Result: Θ(f(n)).
When f(n)=Θ(n^k(log n)^p) and k=c, the logarithm exponent refines the boundary: p>−1 gives Θ(n^c(log n)^(p+1)), p=−1 gives Θ(n^c log log n), and p<−1 gives Θ(n^c).
