← Student tools · Problem 20 · Lecture 9 · Round 2 (30 pts)

Big-O · identify the dominant term

Polynomials decompose into bands; the highest power wins.

CLO-3R2·30 ptsL9
🔊 Listen
Definition (Sipser §7.1)

f(n) = O(g(n)) iff there exist constants c > 0 and n0 ≥ 0 such that for all n ≥ n0, f(n) ≤ c · g(n). Read it as "f is eventually upper-bounded by a constant multiple of g."

Two things to internalize. First, the constant c is allowed to be anything — so 1000n² and n² are both O(n²); the multiplicative factor doesn't change the class. Second, the bound only has to hold for large n. Tiny-n weirdness doesn't matter.

Related notation

Ω(g) = lower bound. f = Ω(g) iff ∃ c, n0 : f(n) ≥ c · g(n) for n ≥ n0.

Θ(g) = tight bound. f = Θ(g) iff f = O(g) and f = Ω(g) simultaneously.

o(g) = strict upper bound. f = o(g) iff f / g → 0.

🔊 Listen
Recipe · find the dominant term, drop constants, that's your O Step 1 · Identify terms 3n² + 5n + 7 three terms · powers 2, 1, 0 Step 2 · Find max exponent max(2, 1, 0) = 2 that term is dominant Step 3 · Drop constants = O(n²) drop the 3, drop the lower terms Practice rounds 7n³ + 2n² + n → O(n³) 100n + log n → O(n) 2ⁿ + n¹⁰⁰ → O(2ⁿ) n log n + n → O(n log n) Dominance order: log n < n < n log n < n² < n³ < n^k < 2ⁿ < n! < n^n
🔊 Listen
Cycle through example polynomials Auto-plays
🔊 Listen
🔊 Listen
🔊 Listen

Sipser: §7.1 (Big-O), §7.1 Examples 7.4–7.7. Lecture notes: Module 4 slide 2. Companion problem: P17 (growth-rate race, visual contrast).