Master Theorem
Learned in CS341.
The “Master Theorem” provides a formula for the solution for many recurrence relations typically encountered in the analysis of Divide and Conquer algorithms.
Simplified version:
Theorem (Master Theorem)
Suppose that and . Consider the recurrence in a sloppy or exact form. Denote . Then
where and are constants and is a given “driving” function. It characterizes a divide-and-conquer algorithm that creates subproblems, each of which is times the size of the original problem, using time for the divide and combine steps.
Unlike the Recursion-tree method, the master theorem provides bound for recurrences of the form Need to memorize 3 cases, but then you will easily be able to determine asymptotic bounds for many simple recurrences. We will use it to determine the running time of divide-and-conquer algorithms for the maximum-subarray problem and for matrix multiplication.
Textbook Chapter 4.5 explains it fairly well and provides examples:todo