Lecture Notes: Order Notation

Preliminaries

Course Content

Review 1

Experiment with the Pizza Demo. See how many combinations you can show before the website becomes unresponsive.

Review 2

Draw these functions:

Review 3

Give four examples of functions which are \( O(n) \).

Motivation

Time and Memory

Definitions

Example Runtime Functions

Input Size

Comparing Functions

Asymptotic Equivalence

Growth Order

Big O

Big Omega

Big Theta

Summary

\[ O(c) \subsetneq O(\log(n)) \subsetneq O(n) \subsetneq O(n^2) \subsetneq O(n^3) \subsetneq O(2^n) \] \[ \Omega(2^n) \subsetneq \Omega(n^3) \subsetneq \Omega(n^2) \subsetneq \Omega(n) \subsetneq \Omega(\log(n)) \subsetneq \Omega(c) \] \[ \Theta(n^2) = \Theta(2n^2) = \Theta(2n^2 + 2n + 2) \] \[ \Theta(n) = \Theta(2n) = \Theta(2n + 2) \]

Little O and Little Omega

Theorems

Example Algorithms

Connection to Counting

Compute Budget

The textbook works through an example of compute budget on page 228. Skipped for time.