Big-O

Definition. O(g(n))O(g(n)) is the set of functions ff for which there exist a constant c>0c > 0 and a threshold n0n_0 such that for every n≥n0n \geq n_0, f(n)≤c⋅g(n)f(n) \leq c \cdot g(n); f(n)∈O(g(n))f(n) \in O(g(n)) says ff is one of them. Most other sources write this f(n)=O(g(n))f(n) = O(g(n)). The constant cc absorbs constant factors; the threshold n0n_0 absorbs small-input noise.

Proving a big-O claim means exhibiting witnesses cc and n0n_0; disproving one means negating the quantifiers: for every cc and n0n_0, some n≥n0n \geq n_0 has f(n)>c⋅g(n)f(n) > c \cdot g(n). Defined in Lecture 9 and used throughout Unit 3. Siblings: Big-Omega (lower bound), Big-Theta (both directions), Little-o (strictly slower growth).

Created · Updated
Copyright © 2026 Jared Coleman. All rights reserved.