Big-O & Recurrence Complexity Formula Sheet

Asymptotic growth hierarchy (Big-O, Theta, Omega) and the three cases of the Master Theorem for divide-and-conquer recurrences.

Core Equations & Variable Definitions

Standard Asymptotic Hierarchy

O(1) < O(\log n) < O(n) < O(n\log n) < O(n^2) < O(2^n) < O(n!)

Ordered from slowest to fastest growth as input size n -> infinity.

Master Theorem Form

T(n) = a T\left(\frac{n}{b}\right) + f(n), \quad c_{\text{crit}} = \log_b a

a >= 1 subproblems, b > 1 size reduction factor, f(n) combine cost.

Master Theorem Case 2 (Balanced)

f(n) = \Theta\left(n^{\log_b a} \log^k n\right) \implies T(n) = \Theta\left(n^{\log_b a} \log^{k+1} n\right)

Covers Merge Sort T(n) = 2T(n/2) + O(n) -> Theta(n log n).

Master Theorem Cases 1 & 3

f(n) = O(n^{c_{\text{crit}} - \varepsilon}) \Rightarrow \Theta(n^{c_{\text{crit}}}), \quad f(n) = \Omega(n^{c_{\text{crit}} + \varepsilon}) \Rightarrow \Theta(f(n))

Case 3 also requires the regularity condition a f(n/b) <= c f(n) for some c < 1.

Interactive Big-O & Complexity Calculators

Common Exam Questions

What is the difference between Big-O, Big-Omega, and Big-Theta?

Big-O is an asymptotic upper bound, Big-Omega is an asymptotic lower bound, and Big-Theta is a tight bound meaning both upper and lower bounds match.

Why does constant factor 2n simplify to O(n)?

Asymptotic analysis focuses on how runtime scales with input size independent of CPU speed or compiler constants, so multiplicative constants and lower-order terms are dropped.

When does the Master Theorem not apply?

It cannot solve recurrences where subproblem sizes are unequal, a is not constant, or f(n) falls in the non-polynomial gap between cases (like n / log n).