Why This Matters
Divide-and-conquer algorithms produce recurrences. The master theorem gives a fast way to classify many of them without drawing the full recursion tree every time.
Core Idea
For recurrences like:
compare with , the amount of work contributed by the leaves.
Worked example: merge sort has , , and . Since , the work balances across levels, so .
Common Mistakes
- Applying the theorem to recurrences that do not fit the form.
- Forgetting regularity conditions in the larger-combine-work case.
- Memorizing cases without understanding the recursion-tree comparison.
Exercises
- Solve .
- Solve .
- Explain why uneven splits need another method.
Next Topics
References
- Cormen, Leiserson, Rivest, Stein. Introduction to Algorithms (4th ed., 2022). Ch. 4.
- MIT OpenCourseWare. 6.046J Design and Analysis of Algorithms, Spring 2015.