Lesson 6 of 9
Asymptotic Notations
0 of 9 lessons done
Lesson notes
Asymptotic notation is the precise language for “how fast a function grows”. Three symbols carry the whole subject:
The three notations
- Big-O (upper bound):
f(n) = O(g(n))if constantsc > 0,n₀exist withf(n) ≤ c·g(n)for alln ≥ n₀. “f grows no faster than g.” - Big-Omega (lower bound):
f(n) = Ω(g(n))iff(n) ≥ c·g(n)beyond somen₀. “f grows at least as fast as g.” - Theta (tight bound):
f(n) = Θ(g(n))when both hold — f is sandwiched betweenc₁·g(n)andc₂·g(n). This is the notation that pins a growth rate exactly.
How to actually use the definitions
To show 3n² + 5n = O(n²): pick c = 4; for n ≥ 5, 3n² + 5n ≤ 4n². Done
— one valid (c, n₀) pair is a complete proof. Exam questions that “look
theoretical” are usually just asking you to produce or verify such a pair.
Facts exams test again and again
- O is not worst case and Ω is not best case — notations bound functions; cases pick which function you’re bounding. Merge sort’s best case is Θ(n log n); binary search’s worst case is Θ(log n).
n = O(n²)is TRUE (upper bounds needn’t be tight) — but it’s a useless bound, and “tightest correct option” is what scoring keys reward.- Transitivity holds for all three; symmetry only for Θ (
f = Θ(g) ⇔ g = Θ(f)). - Little-o / little-ω are the strict versions:
f = o(g)means f grows strictly slower —2n = o(n²)but2n ≠ o(n).
Key takeaways
Memorise the three definitions verbatim — GATE asks them directly — and always answer with the tightest notation the options allow.