What is it?
Landau's symbols compare functions up to constant factors: (grows no faster), (no slower), (same rate), (strictly slower). Born in number theory, adopted by computer science to classify algorithms, and by numerical analysis to measure errors.
Why does it exist?
Exact running times depend on the machine, the compiler and the input. What survives every change of hardware is the shape of the growth: doubling the input quadruples the time of an algorithm on any computer. Asymptotic notation captures exactly that and throws the rest away.
Intuition
: beyond some point, the graph of stays under a stretched copy . Big-O is an upper bound, Ω a lower bound, Θ a sandwich. Little-o says the ratio goes to zero — in numerical analysis, means "the error vanishes faster than the step".
Formal definition
For (or ):
- for
- and
Formulas
- merge sort, via the master theorem
- the same symbol for small quantities
Example
Is ? Yes: , so it is even . But the crossover is huge: near . Asymptotics tell you who wins eventually, not when.
Why does it matter?
It is the vocabulary of algorithm design ("this is "), of numerical methods ("Runge–Kutta 4 has error "), of Monte Carlo ("error ") and of machine learning theory (generalization bounds). One notation, three communities.
Where it shows up in computing
The standard language for running time and memory: , , lower bounds.
Discretization errors are stated as : halve the step, divide the error by .
Monte Carlo error is in any dimension — 100 times more samples for one more digit.
Where is it used?
Computing topics reachable from here, through the chain of ideas that leads to them:
ℒ AI and machine learning
- Order of convergence→Gradient descent★★★★★
- Order of convergence→Gradient descent→Learning rate★★★★★
- Order of convergence→Gradient descent→Backpropagation★★★★★
- Order of convergence→Gradient descent→Stochastic gradient descent (SGD)★★★★★
- Order of convergence→Gradient descent→Loss landscape★★★★★
- Order of convergence→Gradient descent→Reinforcement learning★★★★★
- +6
What depends on it
Exercises
Order by growth: , , , , .
Solution
(compare logarithms: , , , , ).
An algorithm takes 1 s for . Estimate the time for if it is , and if it is .
Solution
: factor → about 11.6 days. : factor → about 33 minutes.