Identifying Dominant Terms
You'll learn how to spot which part of a time complexity expression matters most as inputs grow large.
When analyzing algorithms, you often end up with expressions like 3n² + 5n + 7 to describe runtime. But which part really matters? As your input size n grows enormous, some terms become insignificant compared to others.
The Core Idea
Think of competing terms as runners in a race. At the starting line (small n), they're close together. But as the race goes on (large n), one runner pulls ahead dramatically while the others fade into irrelevance.
For example, compare these terms as n grows:
- n² grows much faster than n: When
n = 10, n² = 100 but n = 10. Whenn = 1000, n² = 1,000,000 but n = 1000. - n grows faster than constant terms: The
+7barely registers whenn = 1000.
Spotting the Dominant Term
Look at the highest-order term (the one with the largest exponent or fastest-growing function):
- In
3n² + 5n + 7, the n² dominates - In
n³ + 100n² + 50n, the n³ dominates - In
5n + 1000, the n dominates (yes, even though 1000 is bigger initially!)
The dominant term determines your Big-O classification because it represents what happens at scale—and that's what matters for algorithm analysis.
Why This Matters
When simplifying to Big-O notation, you keep only the dominant term and drop everything else. This is why 3n² + 5n + 7 simplifies to O(n²). The other terms become negligible as inputs grow.
Key Takeaway: The dominant term is the fastest-growing component of your runtime expression; it alone determines Big-O complexity because it overwhelms all others as input size increases.