Asymptotic notation provides a mathematical framework to describe the dominant behavior of an algorithm's resource usage (usually time or space) as the input size approaches infinity. It uses notations like Big-O Notation, Big-Theta Notation, and Big-Omega Notation to categorize different bounds on this resource usage, not just the worst case.
An asymptotic function is usually defined as a function
There are 5 different notations which can be thought of intuitively in terms of inequalities.
| Notation | Inequality |
|---|---|
| | |
| | |
| | |
| | |
| | |
The worst case running time corresponds to Big-O Notation.
The best case running time corresponds to Big-Omega Notation
The average case running time corresponds to Big-Theta Notation
Low order terms in a function are relatively insignificant for large n.
For example:
If
Common Rates of Growth:
| Function | Growth Rate |
|---|---|
| | Constant |
| | Logarithmic |
| | Log-squared |
| | Linear |
| | unnamed |
| | Quadratic |
| | Cubic |
| | Exponential |
An asymptotically positive function
An asymptotically negative function