In the analysis of algorithms, the master theorem, which is a specific case of the Akra-Bazzi theorem, provides a cookbook solution in asymptotic terms for recurrence relations of types that occur in practice. Suppose given such a relation of the form
where
and
are taken as constants and
is interpreted as either
(the floor function)
or as
(the ceiling function)
of the ratio
Then we may bound the relation
according to one of the following three cases:
Case 1: If
(the big-O notation)
for some constant
then
Case 2: If
then
Case 3: If
for some constant
and if
for some constant
- c < 1
and for some sufficiently large n, then
See also MacMahon's master theorem .