The master theorem for divide-and-conquer recurrences provides an asymptotic analysis for many recurrence relations that occur in the analysis of divide-and-conquer algorithms.
Consider a problem that can be solved using a recursive algorithm such as the following:
If each dividing and combining process of size takes a time of , the runtime of the algorithm can be expressed by the recurrence relation
The master theorem indicates that, for constants and with asymptotically positive, the following statements are true:
- Case 1. If for sone , Then
- Case 2. If , then
- Case 3. If for some (and for some for all sufficiently large), then
Furthermore, if we are in Case 1 when and , then
where and