A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

Asymptotic Notation: Big-O, Big-Omega, Big-Theta

College Depth 82 in the knowledge graph ☐ I know this ☆ Set as goal
344topics build on this
398prerequisites beneath it
See this on the map →
Algorithm Design Basics→→Amortized AnalysisAnalyzing Recursive Algorithms via Recurrence Relations+6 more
complexity-analysis big-o asymptotics

Core Idea

Asymptotic notation describes how algorithms' time and space usage scales with input size. Big-O provides an upper bound, Big-Omega a lower bound, and Big-Theta a tight bound. These notations ignore constant factors and focus on dominant growth rates.

How It's Best Learned

Start with concrete examples: n² grows faster than n log n, which grows faster than n. Draw or sketch growth curves. Compare 2n vs n² for small values (n=10, 100, 1000) to see the difference. Practice classifying simple code snippets (loops, nested loops, recursion).

Common Misconceptions

Explainer

From your work on algorithm design basics, you have written algorithms and observed that some are faster than others. But "faster" is slippery — an algorithm that wins on 100 elements might lose on a million, and raw timing depends on your hardware. Asymptotic notation gives you a hardware-independent language for talking about how algorithms scale. The core question it answers is: as the input grows toward infinity, how does the resource usage grow?

Big-O notation (O) provides an upper bound on growth. When we say an algorithm is O(n²), we mean its runtime grows no faster than some constant times n², once n is large enough. Formally, f(n) is O(g(n)) if there exist constants c > 0 and n₀ such that f(n) ≤ c · g(n) for all n ≥ n₀. The constants c and n₀ absorb the specifics — the exact number of operations per loop iteration, the speed of your CPU, the overhead of function calls. What remains is the shape of the growth curve. This is why O(2n) and O(n) are the same: the factor of 2 is absorbed into the constant c.

Big-Omega (Ω) is the mirror image: a lower bound. f(n) is Ω(g(n)) means f(n) grows at least as fast as g(n) for large inputs. If an algorithm is Ω(n log n), no input of size n can make it run faster than n log n (up to constants). Big-Theta (Θ) combines both: f(n) is Θ(g(n)) means it is both O(g(n)) and Ω(g(n)) — the growth rate is tightly bounded from above and below. When someone says "merge sort is Θ(n log n)," they mean it always grows proportionally to n log n, never significantly faster or slower.

A helpful analogy: Big-O is like saying "this package weighs at most 10 kg." Big-Omega says "it weighs at least 5 kg." Big-Theta says "it weighs between 5 and 10 kg." In practice, Big-O is used most often because programmers care about worst-case guarantees — you want to know your algorithm will not blow up, even on adversarial inputs. But when you can establish a Θ bound, it is more informative because it pins down the growth rate precisely. The common complexity classes you will encounter — O(1), O(log n), O(n), O(n log n), O(n²), O(2ⁿ) — form a hierarchy where each grows strictly faster than the one before it, and recognizing which class an algorithm falls into is the first step in evaluating whether it is practical for a given problem size.

Practice Questions 5 questions

Prerequisite Chain

Understanding Zero → The Number Zero → Counting to Five → Counting to 10 → Counting to 20 → Counting a Set of Objects Up to 20 → Cardinality: The Last Number Counted → Matching Numerals to Quantities → Subitizing Small Quantities → Addition Within 10 → Number Bonds to 10 → Addition Within 20 → Doubles and Near Doubles → Doubles Facts Within 10 → Near Doubles Facts Within 20 → Mental Math Strategies for Addition → Mental Math: Adding and Subtracting Tens → Addition Within 100 → Repeated Addition as Multiplication → Multiplication as Equal Groups → Multiplication: Arrays → Basic Multiplication Facts (0s, 1s, 2s, 5s, 10s) → Multiplication Facts Within 100 → Division as Equal Sharing → Division as Grouping (Measurement Division) → Division: Grouping (Repeated Subtraction) Model → Division: Fair Sharing Model → Division as Equal Sharing → Division as Grouping → Basic Division Facts → Division Facts Within 100 → Multiplication and Division Fact Families → Relationship Between Multiplication and Division → Division Facts as Inverse of Multiplication → Remainders and Quotients in Division → Division Word Problems → Multi-Step Word Problems → Solving Multi-Step Word Problems → Multiplication Word Problems → Division Word Problems → Introduction to Long Division → Factors and Multiples → Prime and Composite Numbers → Equivalent Fractions → Relating Fractions and Decimals → Decimal Place Value → Integers and the Number Line → Comparing and Ordering Integers → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Introduction to Exponents → Order of Operations → Integer Order of Operations → Variable Expressions → The Distributive Property → Variables and Expressions Review → Introduction to Polynomials → Adding and Subtracting Polynomials → Multiplying Polynomials → Factorial → Permutations → Combinations → Counting Principles: Addition and Multiplication Rules → Introduction to Graph Theory → Propositional Logic Foundations → Logical Equivalences → Boolean Algebra → Boolean Type and Truth Values → Comparison Operators and Boolean Tests → Logical Operators and Boolean Algebra → Conditional Statements → Defining and Calling Functions → Functions: Decomposing Problems → Function Parameters and Argument Passing → Return Values → Variable Scope → Introduction to Classes → Objects and Instances → Methods and Attributes → Algorithm Design Basics → Asymptotic Notation: Big-O, Big-Omega, Big-Theta

Longest path: 83 steps · 398 total prerequisite topics

Prerequisites (1)

Leads To (8)