There are several notions that are utilized in complexity theory to express the growth rate of functions and it gives us a mathematical framework to compare the speed at which functions grow. Our focus will be on counting functions

, however, we can use utilize tools and intuition from analysis (calculus) to understand their growth rates.
Motivation: Let

,

and

(we will really only consider on the domain

). Suppose we wanted to understand which function grows faster as the input increases. We cannot simply say that

, even though intuitively cubic polynomials should be
larger than quadratic polynomials. In particular,
![Rendered by QuickLaTeX.com \[3=g(1)> h(1)=1 \text{ and } 9=g(2)>h(2)=8 \text{ and } 19=g(3)<h(3)=27\]](https://malachialexander.com/wp-content/ql-cache/quicklatex.com-3f1fee8080382938f878e0c929b87680_l3.svg)
and for all integers

, we have that

. Therefore, we can quickly conclude that simply comparing the functions will not give us the flexibility we’d like. Therefore, we need an approach which focuses on long-term behavior.
Definition Let

. We say

if
asymptotically grows at most the same rate as

, i.e.

for some

and sufficiently large

. This is known as big-O notation.
Example: Let

and

, then

when

. Therefore,

.
Of course, we could any

; however, it does not matter in showing

. It is more common to consider a more basic function such as

. In the next example, we will see multiple choices for

,
Example: Let

and

. Note

no longer works here. Since

for all

.

Therefore,

.
In this case, we can choose
. The reason is, we must overcome the constant term
, so
is not enough.
Exercise: Show that
. Hint: Consider a function such that
.
For any
and functions
and
,
-
-


In other words, multiplying a function by a constant does not affect how it grows asymptotically, and we can determine the big-O of a sum and product by looking at the individual terms and factors. The last property one should observe can be described in the following example:
Example: Let

and

. Note that earlier, we had

.
Therefore,
![Rendered by QuickLaTeX.com \[\vert 2n^2+1\vert \leq 1\cdot n^3\]](https://malachialexander.com/wp-content/ql-cache/quicklatex.com-86863afa80463b33b8a892452cc9e9e5_l3.svg)
for

. Therefore,

.
Therefore, we have seen that
and
. This is because
grows asymptotically at most the same rate as both
and
. This can cause some confusion because of the usage of “
.” This is simply because
grows faster than
and thus every function which is
is necessarily
as well (if you grow at most as fast as
, then clearly you should grow at most as fast as
). There are variations of the big-O, we list them all (including big-O for reference):
Let
,
-
if
asymptotically grows at most the same rate as
, i.e.
for some
and
sufficiently large. This is big O.
-
if
asymptotically grows at least the same rate as
, i.e.
for some
and
sufficiently large. This is big Omega.
-
if
asymptotically grows the same rate as
, i.e.
and
. This is big Theta.
-
if
asymptotically grows slower than
, i.e.
. This is little o.
-
if
asymptotically grows faster than
, i.e.
. This is little omega.