Definitionintro
Asymptotic notation
Also called big O notation, Landau notation, big Theta, big Omega.
The notations O, Ω and Θ compare the growth of two functions for large inputs and ignore constant factors.
Definition
Let and be functions from the natural numbers to the non-negative real numbers.
- when there are constants and with for each . So grows at most as fast as .
- when there are constants and with for each . So grows at least as fast as .
- when and . So and grow at the same rate.
- when , and when .
The sign here means "is in the set". is a set of functions, and means .
Examples and non-examples
- . Take and for the upper bound, and for the lower bound.
- , but .
- . The base of a logarithm changes only a constant factor, so needs no base.
- , but .
- Not an example: is not , and it is not either. Some functions do not compare.
Related definitions
- Cost measures. The time of an algorithm is a function of the size of the input. A claim such as "the worst-case time is " uses the maximum over the inputs of size . The comparison model is one way to fix what one step is.
- Amortized and expected costs use the same notation on an average over a sequence of operations, or over random choices.
References
Where this leads
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof |
| |
| Lean |
| |
| Visual |
| |
| Writing |
|
Tag 8ASYMP Edit this page History Report an error Markdown JSON