Die Korrektheit eines Algorithmus (für alle inputs) kann mithilfe eines Beweises festgestellt werden.
Die Laufzeit wird (unabhängig von dem jeweiligen Computer auf dem das Programm ausgeführt wird) mit dem Modell des asymptotischen Wachstums ermittelt.
Wächst asymptotisch genauso schnell oder langsamer () als kann man schreiben, dass .
Das relative Wachstum von ist also in Relation zu beschränkt. Dies sagt aber nichts über eine untere Grenze aus, also gilt z.B. .
O-Notation
To write that , we can also write that . This is the case if there exists some constant that ensures that .
Big shortcuts
- If tends to , then and
- If tends to , then and
- If tends to , then and
If and
- ,
L’Hôpital’s Rule
L'Hôpital's Rule
Assume that functions and are differentiable, and . If or , then:
Keep these limitations for using l’Hôpital’s rule in mind!
Asymptotic Notation
-Notation for lower bounds.
For ,
We can write instead of .
-Notation for upper and lower bounds.
For ,
We can write instead of .
We thus have:
and Which can be used to restate the previous theorem like this:
Big shortcuts
- If tends to , then but
- If tends to , then
- If tends to , then but
The Master Theorem
To find the runtime of a recursively defined count of operations, you can use the master theorem.

Comparisons of Growth Rates for common functions
See this big inequality:
We also know that:
Deriving upper and lower bounds for formulas
We can quickly derive upper and lower bounds for some sums or functions using a trick:
- The upper limit can be expressed as the highest terms, times the amount of terms:
- A similar trick works for the lower limit. Take a limited number of terms, which is then automatically lower than the sum.