# Asymptotic notation

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 notation):

• 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, [itex]g(x)=\Theta (x^2)[itex] means that the function [itex]g(x)[itex] behaves asymptotically like the function [itex]x^2[itex] (see below for the meaning of each notation).

The notation is highly conventional and must not be assigned any mathematical significance. For example, if [itex]g=\Theta(f)[itex] and [itex]h=\Theta(f)[itex] it does not mean that [itex]g=h[itex]. A better notation would be [itex]g \in \Theta (f)[itex] as [itex]\Theta(f)[itex] (and others) can be regarded as the set of functions sharing a common asymptotic behavior.

## Definitions

(In all that follows, the asymptotic relations are considered with respect to x→+∞. Often another limit point is of interest (e.g. x→0 or xaR). Then of course the definitions below must be modified adequately. To avoid misunderstandings, the limit point should be made precise, e.g. by writing (a) below the "=" sign or (xa) behind the equation, as in [itex]x\begin{matrix}=\\[-2ex]{}_{(\infty)}\end{matrix}o(x^2)~;~x^2=o(x)~~(x\to0)[itex].)

The O-notation means that the function is bounded from above (aka dominated) by a function which varies like [itex]f[itex], i.e.,

[itex]g = O(f) \iff g\in O(f) \iff (\exists\alpha > 0)(\exists x_0)(\forall x>x_0)~ |g(x)|\le\alpha |f(x)|.[itex]

Thus, [itex]f = O(1)[itex] means that [itex]f[itex] is bounded and [itex]f = O(x)[itex] means that [itex]f[itex] does not grow faster than linear (sub-linear growth). It corresponds for functions in asymptotic limit to the relation [itex]\le[itex] between numbers.

The o-notation restricts the O-notation to mean that the function is bounded from above but that the bound must not be tight, i.e., the function must grow strictly slower than its o-reference. Formally:

[itex]g = o(f)\iff g\in o(f)\iff (\forall\alpha>0)(\exists x_\alpha)(\forall x>x_\alpha)~ |g(x)|<\alpha |f(x)|[itex]

so that for instance [itex]2x^n = O(x^n)[itex] but is not [itex]o(x^n)[itex]. (This relation is also pronounced g is negligible w.r.t. f.) Also, [itex]x^n = o(x^m)[itex] if [itex]n < m[itex] while it is O if [itex]n \le m[itex]. 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:

[itex]g = \Omega(f)\iff g\in \Omega(f)\iff (\exists\alpha > 0)(\exists x_0)(\forall x>x_0)~ \alpha |f(x)|\le |g(x)|.[itex]

Likewise ω-notation is the counterpart of o-notation for functions bounded from below without converging towards their reference:

[itex]g = \omega(f) \iff g\in \omega(f) \iff (\forall\alpha>0)(\exists x_\alpha)(\forall x>x_\alpha)~ \alpha |f(x)| < |g(x)|.[itex]

Finally, Θ-notation means there is an asymptotically tight-bound, i.e., that the function really behaves like its reference function:

[itex]g = \Theta(f) \iff g\in \Theta(f) \iff (\exists\alpha>0)(\exists\beta>0)(\exists x_0)(\forall x>x_0)~ \alpha f(x)\le g(x)\le\beta f(x).[itex]

The function can sandwiched by two representatives of its Θ-reference. For instance [itex]x^2 + x = \Theta (x^2)[itex]. This means that for high enough values of [itex]x[itex], the function [itex]x^2 + x[itex] behaves like [itex]x^2[itex] only and its linear part has became irrelevant or negligible. It corresponds for functions in asymptotic limit to the relation [itex]=[itex] between numbers.

Note that the "=" sign used in the definition above does not mean equality. Although the use of "∈" is more logical and becomes frequent especially in computer science, the use of "=" is still the most current and well-established notation found in the literature.

In layman's terms, one would say that

• [itex]f\in O(g)[itex] means that f has order at most g,
• [itex]f\in \Omega(g)[itex] means that f has order at least g, and
• [itex]f\in \Theta(g)[itex] means that f has order g.

## Properties

If [itex]f\in O(g)[itex] and [itex]g\in O(h)[itex], then [itex]f\in O(h)[itex], and the same holds for o, ω, Ω and Θ.
[itex]f\in\Theta(g) \iff g\in\Theta(f)[itex].

The following implications hold:

• If [itex]f\in o(g)[itex], then [itex]f\in O(g)[itex].
• If [itex]f\in O(g)[itex], then [itex]g\in\Theta(f)[itex].

These notations are widely used in algorithmics to estimate the complexity of an algorithm. Sometimes, in mathematics, the O-notation is used with the meaning of the Θ-notation.

## References

[1] D. E. Knuth. Fundamental Algorithms, vol. 1 of The Art of Computer Programming.

• Art and Cultures
• Countries of the World (http://www.academickids.com/encyclopedia/index.php/Countries)
• Space and Astronomy