worst-case complexity
In computer science (specifically computational complexity theory), the worst-case complexity measures the resources (e.g.[src] running time, memory) that an algorithm requires given an input of arbitrary size (commonly denoted as in asymptotic notation).[src] It gives an upper bound on the resources required by the algorithm.[src] In the case of running time, the worst-case time complexity indicates the longest running time performed by an algorithm given any input of size , and thus guarantees that the algorithm will finish in the indicated period of time.[src] The order of growth (e.g.[src] linear, logarithmic) of the worst-case complexity is commonly used to compare the efficiency of two algorithms.[src] The worst-case complexity of an algorithm should be contrasted with its average-case complexity, which is an average measure of the amount of resources the algorithm uses on a random input.[src]
In computer science (specifically computational complexity theory), the worst-case complexity measures the resources (e.g.[src] running time, memory) that an algorithm requires given an input of arbitrary size (commonly denoted as in asymptotic notation).[src] It gives an upper bound on the resources required by the algorithm.[src] In the case of running time, the worst-case time complexity indicates the longest running time performed by an algorithm given any input of size , and thus guarantees that the algorithm will finish in the indicated period of time.[src] The order of growth (e.g.[src] linear, logarithmic) of the worst-case complexity is commonly used to compare the efficiency of two algorithms.[src] The worst-case complexity of an algorithm should be contrasted with its average-case complexity, which is an average measure of the amount of resources the algorithm uses on a random input.[src] t_{\mathsf{A}}(n) := \max_{s\in \{0, 1\}^n} t_{\mathsf{A}}(s) of inputs s with length or size \le n .[src] Similar definitions can be given for space complexity, randomness complexity, etc.[src] Very frequently, the complexity t_{\mathsf{A}} of an algorithm \mathsf{A} is given in asymptotic Big-O Notation, which gives its growth rate in the form t_{\mathsf{A}} = O(g(n)) with a certain real valued comparison function g(n) and the meaning: There exists a positive real number M and a natural number n_0 such that |t_{\mathsf{A}}(n)| \le M g(n) \quad \text{ for all } n\ge n_0.[src] Quite frequently, the wording is: „Algorithm \mathsf{A} has the worst-case complexity O(g(n)) .“ or even only: „Algorithm \mathsf{A} has complexity O(g(n)) .“[src]
18 sentences · 18 cited inline · 0 references stored
References
No reference rows published for this article.
Cite this article
MLA
"worst-case complexity." encyclopegia.org, 2023, https://encyclopegia.org/wiki/worst-case-complexity. Accessed 25 November 2026.
Chicago
"worst-case complexity." encyclopegia.org. Accessed November 25, 2026. https://encyclopegia.org/wiki/worst-case-complexity.
APA
encyclopegia.org. (2023). worst-case complexity. Retrieved November 25, 2026, from https://encyclopegia.org/wiki/worst-case-complexity
Accessed November 25, 2026 · CC BY-SA 4.0 · citation page · JSON