Analysis of algorithms
Builds on AlgorithmBig O notationTime complexity
Definition
Let be an algorithm with input set , and let be the size of an input . Let be the number of elementary steps of on in a fixed cost model. Let and assume each is finite and nonempty.
- The worst-case running time of is .
- The best-case running time is .
- Given a probability distribution on each , the average-case running time is .
The analysis of algorithms is the determination of such functions, usually up to asymptotic order as . The same definitions with memory use in place of give the space complexity.
Remarks
Example: linear search for a key in a list of items, counting comparisons, has and . If the key is present and equally likely to be at each of the positions, then . In asymptotic terms, , and .
The time complexity of a problem is a different notion: it is the least running time of an algorithm that solves the problem.
Reading path
To understand this page from the ground up, read these 4 pages in order. The foundations come first.
Show the path as a graph
- no evidence level
- Algorithm concept
- Big O notation concept
- Time complexity concept
- Analysis of algorithms definition
Further reading
About this page
| Tag | 45P7W927P5 |
|---|---|
| URI | m2://45P7W927P5 |
| Kind | definition |
| Writing | W0 stub |
| MSC | 68W40, 68Q25 |
| Defines | Analysis of algorithms |
| Uses | Algorithm, Big O notation, Time complexity |
| Changed | 3 November 2026 |
Markdown ยท JSON ยท Edit on GitHub
What this page needs for W1
- an inventory row: the row of the inventory that the node accounts for (0 of 1)
- a source with a locator (0 of 1)
The writing levels say how complete the text of a page is. They do not measure its truth.
What links here
No page links to this page yet.