Growth Rates &
Function Classes
Learn how to compare functions by their asymptotic growth, master Big-O notation, and rank the most common function classes from slowest to fastest.
Why Do Growth Rates Matter?
When we analyze algorithms or mathematical processes, we need to understand how their resource usage scales as the input size \( n \) grows. A function that looks fast at \( n = 10 \) might become impossibly slow at \( n = 10{,}000 \).
What is Asymptotic Growth?
Asymptotic growth describes how a function behaves as its input approaches infinity. We compare two functions \( f(n) \) and \( g(n) \) by asking: which one eventually dominates?
Visualizing Growth Rates
The Big-O Definition
In plain language: \( f \) grows no faster than \( g \), up to a constant multiplier, once \( n \) is large enough. Big-O gives an upper bound on growth.
\( O \) vs \( \Omega \) vs \( \Theta \)
The Growth Hierarchy
The following ranking orders common function classes from slowest to fastest growing. Each class eventually dominates everything to its left:
Polynomial vs Exponential
The most important dividing line in computer science is between polynomial and exponential growth. This boundary separates tractable from intractable problems.
| Polynomial | Exponential | |
|---|---|---|
| Form | \( n^k \) for constant \( k \) | \( a^n \) for constant \( a > 1 \) |
| Examples | \( n, n^2, n^3 \) | \( 2^n, 3^n, 10^n \) |
| \( n = 20 \) | \( 400 \) (\( n^2 \)) | \( 1{,}048{,}576 \) (\( 2^n \)) |
| \( n = 100 \) | \( 10{,}000 \) | \( \approx 10^{30} \) |
| Tractable? | Generally yes | Generally no |
How to Compare Growth Rates
Example 1: Simplify and Classify
Example 2: Comparing Two Functions
Example 3: The Limit Test
The Power of Logarithms
Logarithmic functions are the slowest-growing unbounded class. They appear in algorithms that halve the problem at each step (like binary search).
Common Mistakes
Function Class Summary
| Class | Big-O | Example | \( n = 1000 \) |
|---|---|---|---|
| Constant | \( O(1) \) | Array index | 1 |
| Logarithmic | \( O(\log n) \) | Binary search | 10 |
| Linear | \( O(n) \) | Single loop | 1,000 |
| Linearithmic | \( O(n \log n) \) | Merge sort | 10,000 |
| Quadratic | \( O(n^2) \) | Nested loops | 1,000,000 |
| Exponential | \( O(2^n) \) | Brute force | \( \approx 10^{301} \) |
| Factorial | \( O(n!) \) | Permutations | \( \approx 10^{2567} \) |
Question 1 of 5
What is the Big-O classification of \( f(n) = 4n^2 + 9n + 15 \)?
Question 2 of 5
Which function grows faster as \( n \to \infty \)?
Question 3 of 5
If \( \lim_{n \to \infty} \frac{f(n)}{g(n)} = 5 \), what can we conclude?
Question 4 of 5
Place these in order from slowest to fastest growth:
\( n!, \; n \log n, \; \log n, \; n^2, \; 2^n \)
Question 5 of 5
Why is \( O(\log_2 n) \) the same class as \( O(\log_{10} n) \)?