In mathematical analysis, and in particular in the analysis of algorithms, to classify the growth of functions one has recourse to asymptotic notations. Knuth advocated the following notations (other notations hold in various contexts, e.g., Landau and Hardy notations):
- O-notation (big-oh)
- o-notation (little-oh)
- Ω-notation
- ω-notation
- Θ-notation
The minute details of a function for arbitrary big values of its argument seldom matter. Often it is enough to compare its overall behaviour to standard sets of mathematical function so as qualify the function at hand along a restricted set of significant behaviours, such as bounded, oscillating, divergent, etc..., and to indicate the speed with which it reach this asymptotic behaviour.
For instance if a function tends to zero faster than a square integrable function, it is known that it has a well-defined Fourier transform, no matter what the function actually looks like.
The notation is an equality between the function at hand, and the known function it behaves like or is compared to in the asymptotic limit. For example, means that the function behaves asymptotically like the function (see below for the meaning of each notation).
The notation is highly conventional and must not be assigned any mathematical significance. For example, if and it does not mean that . A better notation would be as (and others) can be regarded as the set of functions sharing a common asymptotic behavior.
Definitions
The O-notation means that the function is bounded from above by a function which varies like , i.e.,
So that means that is eventually bounded and means that does not grow faster than linear (sub-linear growth). It corresponds for functions in asymptotic limit to the relation between numbers.
The o-notation restricts the O-notation to mean that the function is bounded from above but that the bound is not tight, i.e., the function does not tend towards its o-reference. Formally:
so that for instance but is not . Also, if while it is O if . It corresponds for functions in asymptotic limit to the relation > between numbers.
The Ω-notation is the counterpart of O-notation for functions bounded from below:
Likewise ω-notation is the counterpart of o-notation for functions bounded from below without converging towards their reference:
Finally, Θ-notation means there is an asymptotically tight-bound, i.e., that the function really behaves like its reference function:
The function can sandwiched by two representatives of its Θ-reference. For instance . This means that for high enough values of , the function behaves like only and its linear part has became irrelevant or negligible. It corresponds for functions in asymptotic limit to the relation between numbers.
In layman's terms, one would say that
- means that f has order at most g,
- means that f has order at least g, and
- means that f has order g.
Properties
- If and , then .
- If and , then .
- If , then .
- If , then .
These notations are widely used in algorithmics to estimate the complexity of an algorithm. In mathematics it is current to use the O-notation with the meaning of the Θ-notation.
Reference
[1] D. E. Knuth. Fundamental Algorithms, vol. 1 of The Art of Computer Programming.