1.2. Order NotationΒΆ
Let \(f,g:\mathbb R\rightarrow\mathbb R\) be two functions. We say that \(f(n) = O(g(n))\), read as “\(f\) is big-oh of \(g\)” or “\(f\) is of order \(g\)”, if there is a positive constant \(C\) such that
for all sufficiently large \(n\). For example,
because as \(n\) becomes large, the terms of order lower than \(n^3\) become relatively insignificant. While the above definition is based on the function argument increasing in magnitude, the order notation can also be defined when the function argument keeps decreasing in magnitude. Indeed, in many applications we are interested in the behavior as some quantitiy \(h\) (such as a step size or mesh spacing) becomes very small. We say that
if there is a positive constant \(C\) such that
for all sufficient small \(h\). For example,
because as \(h\) becomes small, the omitted terms beyond \(h^2\) become relatively insignificant. Note that the above two definitions are equivalent if \(h=1/n\).