What is it?
Predicting how the resources of an algorithm grow with the input size. Its tools are pure calculus of sequences: asymptotic notation, limits, sums and integrals, logarithms and exponentials, recurrences.
Formulas
- master theorem
Why does it matter?
The difference between an and an algorithm is the difference between hours and seconds at scale — no hardware upgrade closes it.
The mathematics behind it
Binary search is and comparison sorting .
when stays between positive constants as .
Amortized analysis of dynamic arrays and the master theorem cases are geometric sums.
Choosing between an and an algorithm is a comparison of orders of growth.
The standard language for running time and memory: , , lower bounds.
Upper and lower bounds on running time are proved by chains of inequalities.
Brute-force search over bits takes steps: exponential time is the signature of intractability.
Asymptotic comparisons of running times are limits as .
Costs of loops and recursions are sums; harmonic numbers give quicksort's average.
Turning sums like into integrals gives .
"Polynomial time" is the dividing line between tractable and intractable problems (P).
The running time is a sequence, often defined by a recurrence such as .
Proves the growth hierarchy used to compare algorithms: , .
Generating functions solve recurrences and count structures in the analysis of algorithms.
Bounding a messy cost sum by a simpler one is exactly how asymptotic bounds are proved.
Same idea as binary search (and
git bisect): halving gives steps.
This page has the essentials. A fuller treatment (intuition, formal definition, worked example) is on the way.