Asymptotic Notation Explorer

BCS 309 — Algorithms I

Asymptotic Notations

Select a notation, then drag the sliders to adjust c and n₀ and watch the graph update live.

When we analyse algorithms, we care about how their running time grows as input size n increases. Asymptotic notations give us precise mathematical language for describing this growth.

Instead of "3n² + 5n + 2 steps", we say O(n²) — capturing the essential growth rate while ignoring constants and lower-order terms.

The Five Notations

NotationMeaningAnalogy
O (Big-O)Upper bound — at most≤
Ω (Big-Omega)Lower bound — at least≥
Θ (Theta)Tight bound — exactly=
o (Small-o)Strict upper — strictly less<
ω (Small-omega)Strict lower — strictly greater>
Key: f(n) = Θ(g(n)) ⟺ f(n) = O(g(n)) AND f(n) = Ω(g(n))

Iterative Algorithm Analysis

Step through each algorithm line-by-line. Watch operations being counted live with array visualisation.

Recursive Algorithm Analysis

Watch the recursion tree build level-by-level. Adjust n to see how the tree grows.

Proof Builder

Walk through formal proofs step-by-step. The graph is always visible — steps highlight what to look at.

Challenge Mode

Test your understanding of all five notations.