Introduction

The master mwthod provides a 'cookbook' method for solving recurrences of the form

Γ(n)=aΓ(nb)+a^(n)\Gamma(n) = a\Gamma(\frac{n}{b}) + \hat{a}(n)

where a1a\geq1 and b1b\geq1 are constants and a^(n)\hat{a}(n) is an asymptotically positive function. The master method requires memorization of three cases, but then the solution of many recurrences can be determined quite easily, often without pencil and paper

the master theorem

The master theorem method depends on the following theorem.
Theorem 1.1
Let a1a\geq1 and b1b\geq1 be constants, let a^(n)\hat{a}(n) be a function, and let Γ(n)\Gamma(n) be defined on the nonnegative integers ny the recurrence

Γ(n)=aΓ(nb)+a^(n)\Gamma(n) = a\Gamma(\frac{n}{b}) + \hat{a}(n)

where we interpret fracnbfrac{n}{b} to be mean either nb\left \lfloor \frac{n}{b} \right \rfloor or nb\left \lceil \frac{n}{b} \right \rceil. THen Γ(n)\Gamma(n) can be bounded as asymptotically as follow:

  1. if a^(n)=O(nlogbaϵ)\hat{a}(n) = O(n^{log_{b}^{a}-\epsilon}) for some constants ϵ>0\epsilon >0, the Γ(n)=Θ(nlogba)\Gamma(n) = \Theta(n^{log_{b}^{a}})
  2. if a^(n)=Θ(nlogba])\hat{a}(n) = \Theta(n^{log_{b}^{a]}}), the Γ(n)=Θ(nlogbalgn)\Gamma(n) = \Theta(n^{log_{b}{a}} * lgn)
  3. if a^(n)=Ω(nlogba+ϵ)\hat{a}(n) = \Omega(n*log_{b}{a}+\epsilon) for some constant ϵ>0\epsilon > 0, and if aa^(nb)ca^(n)a\hat{a}(\frac{n}{b}) \leq c\hat{a}(n) for some constant c1c \leq 1 and all sufficiently large n, then Γ(n)=Θ(a^(n))\Gamma(n) = \Theta(\hat{a}(n))

Before applying the master theorem to some examples, let's spend a moment trying to understand what is says. In each od the cases, we are comparing the function a^(n)\hat{a}(n) with the function nlogban^{log_{b}{a}}, Intutively, the solution to the recurrence is determined by the larger of two functions. If, as in case 1, the function nlogban^{log_{b}{a}} is the larger, then the solution is Γ(n)=Θ(a^(nlogba))\Gamma(n) = \Theta(\hat{a}(n^{log_{b}{a}})). If, as in case 3, the function a^(n)\hat{a}(n) is larger, then the solution is Γ(n)=Θ(a^(n))\Gamma(n) = \Theta(\hat{a}(n)). If, as in case 2, t he function are the same size, we multiply by alogarithmic factor, and the solution is Γ(n)=Θ(nlogba)=Θ(a^(n)lgn)\Gamma(n) = \Theta(n^{log_{b}{a}}) = \Theta(\hat{a}(n) * lgn).

Beyond this function, there are some technicalities that must be understood. In the first caee, not only must a^(n)\hat{a}(n) be smaller than nlogban^{log_{b}{a}}, it must be polynomially smaller. That is, a^(n)\hat{a}(n) must be asymptotically smaller than nlogban^{log_{b}{a}} by a factor of ϵ\epsilon for some ϵ>0\epsilon > 0. In the third case, not only must a^(n)\hat{a}(n) be larger than nlogban^{log_{b}{a}}, it must be polynomially larger and in addition satisfy the "regularity" condition that aa^(nb)ca^(n)a\hat{a}(\frac{n}{b}) \leq c\hat{a}(n). This condition is satisfied by most of the polynomially bounded functions that we shall encounter.

It is important to realize that the three cases do not cover all the possibilities for a^(n)\hat{a}(n). There is a gap between cases 1 and 2 when a^(n)\hat{a}(n) is smaller than nlogban^{log_{b}{a}} but not polynomially smaller. Similary, there is a gap between case 2 and 3 when a^(n)\hat{a}(n) is larger than nlogban^{log_{b}{a}} but not polynonially larger. If the function a^(n)\hat{a}(n) falls into one of these gaps, or if the regularity condition in case 3 fails to hold, the master theorem cannot used to solve the recurrence.

zero-centered is an important operation for data before using PCA, as it will extract the matric feature vector