282 A Appendix
log log n,
log n, log
2
n, log
3
n, ...
n
ε
,n,nlog n, n log n log log n, n log
2
n, n
1+ε
,n
2
,n
3
,...
2
n
ε
, 2
εn
, 2
n
,
2
2
n
.
For a sum of constantly many orders of magnitude, one summand of which
grows asymptotically faster than the others, the order of magnitude is that of
this fastest growing summand. So, for example,
n
2
log
2
n +10n
3
/log n +5n
has the order of magnitude of n
3
/log n. For summands of the form c · n
α
, i.e.,
for polynomials, the order of magnitude is precisely the order of magnitude
of the term with the largest exponent.
Further simplifying, we obtain the following notions: A function f : N →
R
+
is called
• logarithmic if f = O(log n);
• polylogarithmic if f = O(log
k
n)forsomek ∈ N, i.e., if asymptotically f
grows no faster than a polynomial in log n;
• linear, quadratic,orcubic if f = O(n), f = O(n
2
), or f = O(n
3
);
• quasi-linear if f = O(n log
k
n)forsomek ∈ N;
• polynomially bounded (or sometimes just polynomial)iff = O(n
k
)for
some k ∈ N;
• superpolynomial if f = Ω(n
k
) for every k ∈ N, i.e., if f grows faster than
any polynomial;
• subexponential if f = O(2
n
ε
) for every ε>0;
• exponential if f = Ω(2
n
ε
)forsomeε>0; and
• strictly exponential if f = Ω(2
εn
)forsomeε>0.
It is important to note in this context that superpolynomial, exponential,
and strictly exponential denote lower bounds while the other terms refer to
upper bounds. So, for example, n
2
is cubic (more precisely we could say that
“n
2
grows asymptotically no faster than cubic”). If we want to express a lower
bound, we can say that an algorithm requires at least cubic computation time.
Functions like n
log n
that are superpolynomial but subexponential are called
quasi-polynomial.
If computation times depend on two or more parameters, we can still use
O-notation. For example, f(n, m)=O(nm
2
+ n
2
log m), if there is a constant
c such that f (n, m)/(nm
2
+ n
2
log m) ≤ c for all n, m ∈ N.
For probabilities p(n), it often matters how fast these converge to 0 or 1.
In the second case, we can consider how fast q(n):=1− p(n) converges to 0.
By definition p(n)=o(1) if and only if p(n) converges to 0. This is true even