Content deleted Content added
The introdcution makes now clear that "computational complexity" does normally NOT refer to the complexity of an algorithm (although this is what the article is about^^), but to that of a problem. For that, the last parapgraph was fused with the first, to explain that more clearly. Anyway, the current title of the article is therefore a bit misleading, since computational complexity does ALMSOT NEVER refer to the complexity of algorithms, but to that of problems. So it needs to be renamed. Tag: Reverted |
|||
Line 1:
{{Short description|amount of resources (usually time and/or memory) to perform an algorithm}}
{{no footnotes|date=December 2017}}
In [[computer science]], the '''
As the amount of resources required to run an algorithm generally varies with the size of the input, the complexity is typically expressed as a function {{math|''n'' → ''f''(''n'')}}, where {{math|''n''}} is the size of the input and {{math|''f''(''n'')}} is either the [[worst-case complexity]] (the maximum of the amount of resources that are needed over all inputs of size {{math|''n''}}) or the [[average-case complexity]] (the average of the amount of resources over all inputs of size {{math|''n''}}). [[Time complexity]] is generally expressed as the number of required elementary operations on an input of size {{math|''n''}}, where elementary operations are assumed to take a constant amount of time on a given computer and change only by a constant factor when run on a different computer. [[Space complexity]] is generally expressed as the amount of [[computer memory|memory]] required by an algorithm on an input of size {{math|''n''}}.
==Resources==
|