Computational complexity theory
Upper and lower bounds on the complexity of problems

To classify the computation time (or similar resources, such as space consumption), it is helpful to demonstrate upper and lower bounds on the maximum amount of time required by the most efficient algorithm to solve a given problem. The complexity of an algorithm is usually taken to be its worst-case complexity unless specified otherwise. Analyzing a particular algorithm falls under the field of analysis of algorithms. To show an upper bound T (n) {\displaystyle T(n)} on the time complexity of a problem, one needs to show only that there is a particular algorithm with running time at most T (n) {\displaystyle T(n)}. However, proving lower bounds is much more difficult, since lower bounds make a statement about all possible algorithms that solve a given problem. The phrase "all possible algorithms" includes not just the algorithms known today, but any algorithm that might be discovered in the future. To show a lower bound of T (n) {\displaystyle T(n)} for a problem requires showing that no algorithm can have time complexity lower than T (n) {\displaystyle T(n)}.

Upper and lower bounds are usually stated using the big O notation, which hides constant factors and smaller terms. This makes the bounds independent of the specific details of the computational model used. For instance, if T (n) = 7 n 2 + 15 n + 40 {\displaystyle T(n)=7n^{2}+15n+40}, in big O notation one would write T (n) = O (n 2) {\displaystyle T(n)=O(n^{2})}.
keywords:letter_frequency