Overview

Chapter 2.2 - Asymptotic Growth

Algorithm Analysis

Let $T(n)$ be the worst case runtime. If $O(f(n)) = T(n)$, $f(n)$ is an upper bound on $T(n)$.

If $\Omega(g(n)) = T(n)$, $g(n)$ is a lower bound on $T(n)$.

Big-O definition:

$T(n) = O(f(n))$ if $T(n) \leq c\cdot f(n)\: \forall n > n_o$ for some $c, n_0 \in \mathbb{R}$ where $c,n_0 > 0$.

Big-$\Omega$ definition:

$T(n) = \Omega(f(n))$ if $T(n) \geq c\cdot f(n)\: \forall n > n_o$ for some $c, n_0 \in \mathbb{R}$ where $c,n_0 > 0$.

Big-$\Theta$ definition:

$T(n) = \Theta(f(n))$ if $T(n) = O(f(n)) = \Omega(f(n))$

Theorem 2.1

$$ \lim_{n \to \infty} \dfrac{f(n)}{g(n)} = 0 \implies f(n) = O(g(n)) $$

$$ \lim_{n \to \infty} \dfrac{f(n)}{g(n)} = \infty \implies g(n) = O(f(n)) $$

$$ \lim_{n \to \infty} \dfrac{f(n)}{g(n)} = c \implies f(n) = \Theta(g(n)) $$

Chapter 2.7