Computational complexity
The study of how computational resources grow as problem size increases. It distinguishes algorithms by requirements such as time, memory or queries under an explicit computational model.
On this page
Plain-language explanation
Complexity is about scaling across a family of inputs, not just the runtime of one small example. The input size is usually the length of its encoding, such as the number of bits in an integer. Accuracy, success probability and access assumptions can also be parameters. A favorable asymptotic scaling can still have large constants or become useful only beyond a crossover size.
This is the foundation for interpreting quantum speedup claims. It explains why a theoretical breakthrough and a practical faster machine are related but different achievements.
Example
An algorithm using n squared steps and one using 2 to the n steps can behave similarly for very small n, then diverge dramatically as n grows. But an n-squared method with an enormous prefactor may still lose on every feasible instance.
Scope and limits
Complexity labels do not specify current hardware performance. A complete comparison must state the model, input encoding, precision and resource being counted.
Big O notation is a related idea. Computational complexity is the broader subject. Big O is a notation for upper bounds on growth rates, commonly used to express complexity results.
Sources
Verification scope
Recorded source check ·
Algorithms, complexity, simulation and mathematical background
Version observed dated August 27, 2026; educational synthesis, not experimental performance evidence.
Verification scope
Recorded source check ·
Quantum query methods, Fourier methods, phase estimation and algorithms
Algorithm guarantees depend on access and resource models.