next up previous
Next: Up: Previous:

Master Theorem

For the recurrence relation T(n) = aT(n/b) + f(n) with a $\geq$ 1, b > 1 and T(n) on non-negative integers, T(n) can be asymptotically bounded as follows:

1.
If f(n) = O( \(n^{log_b a \; - \; \epsilon}\)) for some constant $\epsilon>0$, then T(n) = \(\Theta(n^{log_b a})\).



2.
If f(n) = \(\Theta(n^{log_b a})\), then T(n) = \(\Theta(n^{log_b a} lg n)\).



3.
If f(n) = \(\Omega(n^{log_b a \;+\; \epsilon})\) for some constant \(\epsilon > 0\), and if af(n/b) $\leq$ cf(n) for some constant c < 1 and large n, then T(n) = $\Theta(f(n))$.

Which is larger, f(n) or nlogb a?

By a factor of $n^\epsilon$, or polynomially larger...


next up previous
Next: Up: Previous: