In
computer science
Computer science is the study of computation, automation, and information. Computer science spans theoretical disciplines (such as algorithms, theory of computation, information theory, and automation) to Applied science, practical discipli ...
, 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
Divide and rule policy ( la, divide et impera), or divide and conquer, in politics and sociology is gaining and maintaining power divisively. Historically, this strategy was used in many different ways by empires seeking to expand their terr ...
algorithm
In mathematics and computer science, an algorithm () is a finite sequence of rigorous instructions, typically used to solve a class of specific Computational problem, problems or to perform a computation. Algorithms are used as specificat ...
s where the sub-problems have substantially different sizes. It is a generalization of the
master theorem for divide-and-conquer recurrences, which assumes that the sub-problems have equal size. It is named after mathematicians
Mohamad Akra
Muhammad ( ar, مُحَمَّد; 570 – 8 June 632 CE) was an Arab religious, social, and political leader and the founder of Islam. According to Islamic doctrine, he was a prophet divinely inspired to preach and confirm the monothe ...
and
Louay Bazzi
Luay, Luayy or Louay (Arabic: لُؤَيّ ''lū’ayy'', ), also spelled Loai, Loay or Luai, is an Arabic male given name from the noun ''la’y'' (لَأْي), meaning "Strong, Patient, a Sheild and/or Protector".
Notable people with the name inc ...
.
Formulation
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
Big ''O'' notation is a mathematical notation that describes the limiting behavior of a function when the argument tends towards a particular value or infinity. Big O is a member of a family of notations invented by Paul Bachmann, Edmund Lan ...
*
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 the absolute value of
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.
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
for which
. In this example,
. 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 running time 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
.
See also
*
Master theorem (analysis of algorithms)
*
Asymptotic complexity
References
External links
O Método de Akra-Bazzi na Resolução de Equações de Recorrência
{{DEFAULTSORT:Akra-Bazzi Method
Asymptotic analysis
Theorems in discrete mathematics
Recurrence relations
Bazzi family