||This article includes a list of references, related reading or external links, but its sources remain unclear because it lacks inline citations. (February 2013) (Learn how and when to remove this template message)|
In computer science, the Akra–Bazzi method, or Akra–Bazzi theorem, is used to analyze the asymptotic behavior of the mathematical recurrences that appear in the analysis of divide and conquer algorithms where the sub-problems have substantially different sizes. It is a generalization of the master theorem, which assumes that the sub-problems have equal size. It is named after mathematicians Mohamad Akra and Louay Bazzi.
The Akra–Bazzi method applies to recurrence formulas of the form
The conditions for usage are:
- sufficient base cases are provided
- and are constants for all
- for all
- for all
- , where c is a constant and O notates Big O notation
- for all
- is a constant
The asymptotic behavior of is found by determining the value of for which and plugging that value into the equation
(see Θ). Intuitively, represents a small perturbation in the index of . By noting that and that is always between 0 and 1, can be used to ignore the floor function in the index. Similarly, one can also ignore the ceiling function. For example, and will, as per the Akra–Bazzi theorem, have the same asymptotic behavior.
Suppose is defined as 1 for integers and for integers . In applying the Akra–Bazzi method, the first step is to find the value of for which . In this example, . Then, using the formula, the asymptotic behavior can be determined as follows:
The Akra–Bazzi method is more useful than most other techniques for determining asymptotic behavior because it covers such a wide variety of cases. Its primary application is the approximation of the runtime of many divide-and-conquer algorithms. For example, in the merge sort, the number of comparisons required in the worst case, which is roughly proportional to its runtime, is given recursively as and
for integers , and can thus be computed using the Akra–Bazzi method to be .
- Mohamad Akra, Louay Bazzi: On the solution of linear recurrence equations. Computational Optimization and Applications 10(2):195–210, 1998.
- Tom Leighton: Notes on Better Master Theorems for Divide-and-Conquer Recurrences, Manuscript. Massachusetts Institute of Technology, 1996, 9 pages.
- Proof and application on few examples