Akra-Bazzi method
Encyclopedia
In computer science
Computer science
Computer science or computing science is the study of the theoretical foundations of information and computation and of practical techniques for their implementation and application in computer systems...

, the Akra–Bazzi method, or Akra–Bazzi theorem, is used to analyze the asymptotic behavior of the mathematical recurrence
Recurrence
Recurrence and recurrent may refer to:*Recurrence relation, an equation which defines a sequence recursively*Poincaré recurrence theorem, Henri Poincaré's theorem on dynamical systems...

s that appear in the analysis of divide and conquer
Divide and conquer algorithm
In computer science, divide and conquer is an important algorithm design paradigm based on multi-branched recursion. A divide and conquer algorithm works by recursively breaking down a problem into two or more sub-problems of the same type, until these become simple enough to be solved directly...

 algorithm
Algorithm
In mathematics and computer science, an algorithm is an effective method expressed as a finite list of well-defined instructions for calculating a function. Algorithms are used for calculation, data processing, and automated reasoning...

s where the sub-problems have substantially different sizes. It is a generalization of the well-known master theorem
Master theorem
In the analysis of algorithms, the master theorem provides a cookbook solution in asymptotic terms for recurrence relations of types that occur in the analysis of many divide and conquer algorithms...

, which assumes that the sub-problems have equal size.

The formula

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 i
  • for all i
  • for all i
  • , where c is a constant and O notates Big O notation
    Big O notation
    In mathematics, big O notation is used to describe the limiting behavior of a function when the argument tends towards a particular value or infinity, usually in terms of simpler functions. It is a member of a larger family of notations that is called Landau notation, Bachmann-Landau notation, or...

  • for all i
  • is a constant


The asymptotic behavior of T(x) is found by determining the value of p for which and plugging that value into the equation


(see Θ
Big O notation
In mathematics, big O notation is used to describe the limiting behavior of a function when the argument tends towards a particular value or infinity, usually in terms of simpler functions. It is a member of a larger family of notations that is called Landau notation, Bachmann-Landau notation, or...

). Intuitively, represents a small perturbation in the index of T. By noting that and that is always between 0 and 1, can be used to ignore the floor function
Floor function
In mathematics and computer science, the floor and ceiling functions map a real number to the largest previous or the smallest following integer, respectively...

 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.

An example

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 p for which . In this example, p = 2. Then, using the formula, the asymptotic behavior can be determined as follows:

Significance

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
Merge sort
Merge sort is an O comparison-based sorting algorithm. Most implementations produce a stable sort, meaning that the implementation preserves the input order of equal elements in the sorted output. It is a divide and conquer algorithm...

, 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 .
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK