# Comparison of Functions

## 1  Relationships

Like real numbers, many relational properties can be applied to asymptotic comparisons. One of the properties of real numbers that does not apply to asymptotic comparisons is trichotomy. For any two real numbers, $a$ and $b$, exactly one of the following must hold: $a, $a=b$, or $a>b$. Some functions however can not be asymptotically compared.

### 1.1  Transitivity

 $\begin{array}{ccccccccccc}\hfill f\left(n\right)& \hfill =\hfill & \Theta \left(g\left(n\right)\right)\hfill & \hfill \text{and}\hfill & \hfill g\left(n\right)& \hfill =\hfill & \Theta \left(h\left(n\right)\right)\hfill & \hfill \text{imply}\hfill & \hfill f\left(n\right)& \hfill =\hfill & \Theta \left(h\left(n\right)\right)\hfill \\ \hfill f\left(n\right)& \hfill =\hfill & O\left(g\left(n\right)\right)\hfill & \hfill \text{and}\hfill & \hfill g\left(n\right)& \hfill =\hfill & O\left(h\left(n\right)\right)\hfill & \hfill \text{imply}\hfill & \hfill f\left(n\right)& \hfill =\hfill & O\left(h\left(n\right)\right)\hfill \\ \hfill f\left(n\right)& \hfill =\hfill & \Omega \left(g\left(n\right)\right)\hfill & \hfill \text{and}\hfill & \hfill g\left(n\right)& \hfill =\hfill & \Omega \left(h\left(n\right)\right)\hfill & \hfill \text{imply}\hfill & \hfill f\left(n\right)& \hfill =\hfill & \Omega \left(h\left(n\right)\right)\hfill \\ \hfill f\left(n\right)& \hfill =\hfill & o\left(g\left(n\right)\right)\hfill & \hfill \text{and}\hfill & \hfill g\left(n\right)& \hfill =\hfill & o\left(h\left(n\right)\right)\hfill & \hfill \text{imply}\hfill & \hfill f\left(n\right)& \hfill =\hfill & o\left(h\left(n\right)\right)\hfill \\ \hfill f\left(n\right)& \hfill =\hfill & \omega \left(g\left(n\right)\right)\hfill & \hfill \text{and}\hfill & \hfill g\left(n\right)& \hfill =\hfill & \omega \left(h\left(n\right)\right)\hfill & \hfill \text{imply}\hfill & \hfill f\left(n\right)& \hfill =\hfill & \omega \left(h\left(n\right)\right)\hfill \end{array}$

### 1.2  Reflexivity

 $\begin{array}{ccc}\hfill f\left(n\right)& \hfill =\hfill & \Theta \left(f\left(n\right)\right)\hfill \\ \hfill f\left(n\right)& \hfill =\hfill & O\left(f\left(n\right)\right)\hfill \\ \hfill f\left(n\right)& \hfill =\hfill & \Omega \left(f\left(n\right)\right)\hfill \end{array}$

### 1.3  Symmetry

 $\begin{array}{ccccccc}\hfill f\left(n\right)& \hfill =\hfill & \Theta \left(g\left(n\right)\right)\hfill & \hfill \text{if and only if}\hfill & \hfill g\left(n\right)& \hfill =\hfill & \Theta \left(f\left(n\right)\right)\hfill \end{array}$

### 1.4  Transpose Symmetry

 $\begin{array}{ccccccc}\hfill f\left(n\right)& \hfill =\hfill & O\left(g\left(n\right)\right)\hfill & \hfill \text{if and only if}\hfill & \hfill g\left(n\right)& \hfill =\hfill & \Omega \left(f\left(n\right)\right)\hfill \\ \hfill f\left(n\right)& \hfill =\hfill & o\left(g\left(n\right)\right)\hfill & \hfill \text{if and only if}\hfill & \hfill g\left(n\right)& \hfill =\hfill & \omega \left(f\left(n\right)\right)\hfill \end{array}$

## 2  Standard Notation and Common Functions

The following terms and rules should be familiar, as most will be a review of some standard mathematical notations.

### 2.1  Monotonicity

A function, $f\left(n\right)$ is monotonically increasing if $m\le n$ implies $f\left(m\right)\le f\left(n\right)$. Similarly, a function is monotonically decreasing if $m\ge n$ implies $f\left(m\right)\ge f\left(n\right)$.
A function is strictly increasing if $m implies $f\left(m\right). Likewise, a function is strictly decreasing if $m>n$ implies $f\left(m\right)>f\left(n\right)$.

### 2.2  Floors and Ceilings

The floor of $x$ is the greatest integer less than or equal to $x$, and is denoted by $⌊x⌋$. The ceiling of $x$ is the least integer greater than or equal to $x$, and is denoted by $\mathrm{lceil}x⌉$.
For all real $x$: $x-1<⌊x⌋\le x\le ⌈x⌉.

### 2.3  Polynomials

Given a positive integer $d$, a polynomial in 4n4 of degree $d$ is a function of the form:

 $p\left(n\right)=\sum _{i=1}^{n}{a}_{i}{n}^{i}$

where ${a}_{1},{a}_{2},\dots ,{a}_{n}$ are the coefficients of the polynomial. For example, $3{n}^{5}-2{n}^{4}+7{n}^{2}+n-8$ is a polynomial of degree 5 with coefficients 3, -2, 0, 7, 1, and -8.

### 2.4  Exponentials

An important property of exponentials is that, for all real constants, $a$ and $b$ such that $a>1$,

 $\underset{n\to \infty }{lim}\frac{{n}^{b}}{{a}^{n}}=0$

From this we can conclude that

 ${n}^{b}=o\left({a}^{n}\right)$

Thus, any exponential function with a base strictly greater than 1 will grow faster than any polynomial function.

### 2.5  Logarithms

We will use the following notations throughout this course:

 $\begin{array}{cccc}\hfill \mathrm{lg}n& \hfill =\hfill & {\mathrm{log}}_{2}n\hfill & \text{(binary logarithm)}\hfill \\ \hfill \mathrm{ln}n& \hfill =\hfill & {\mathrm{log}}_{e}n\hfill & \text{(natural logarithm)}\hfill \\ \hfill {\mathrm{lg}}^{k}n& \hfill =\hfill & \left(\mathrm{lg}n{\right)}^{k}\hfill & \text{(exponentiation)}\hfill \\ \hfill \mathrm{lg}\mathrm{lg}n& \hfill =\hfill & \mathrm{lg}\left(\mathrm{lg}n\right)\hfill & \text{(composition)}\hfill \end{array}$

Like exponentials, we can relate polylogarithms to polynomials:

 $\underset{n\to \infty }{lim}\frac{{\mathrm{lg}}^{b}n}{{n}^{a}}=0$

We can then conclude that

 ${\mathrm{lg}}^{b}n=o\left({n}^{a}\right)$

for any constant $a>0$. So any polynomial function grows faster than any polylogarithmic function.

File translated from TEX by TTM, version 3.67.
On 31 Mar 2006, 18:12.