Master Theorem
For master recurrence in form of
If there exists a constant , or :
Master Theorem
- , then .
- , then .
- , and satisfies the regularity condition for some constant and all sufficiently large , then .
- is a driving function, is the watershed function.
Explanation
- Watershed function characterizes the number of leaves asymptotically.
- Case 1: Watershed function grows polynomially faster than driving function. Cost per level grows at least geometrically from root to leaves, the total cost of leaves dominates that of the internal nodes.
- Case 2: Driving function grows faster than watershed function by a factor of . Each level costs roughly the same. Most of the time .
- Case 3: Driving function grows polynomially faster. Regularity condition is satisfied most of the time. Cost of root dominates.
Proof
- Lemma 1: Cost of leaves and internal nodes.
- Lemma 2: Bound of the summation