Why This Matters
Saying an algorithm is may be true and useless if the real cost is . The notation must say whether you mean an upper bound, lower bound, or tight growth rate.
Core Idea
| Notation | Meaning |
|---|---|
| asymptotic upper bound | |
| asymptotic lower bound | |
| both upper and lower bound |
Worked example: merge sort is and in the comparison model, so its running time is .
Common Mistakes
- Using Big-O when Big-Theta is known.
- Saying "at least Big-O." Lower bounds use Big-Omega.
- Treating all upper bounds as tight. is also .
Exercises
- Explain why is .
- Give a loose but true Big-O bound for binary search.
- State why comparison sorting has an lower bound.
Next Topics
References
- Cormen, Leiserson, Rivest, Stein. Introduction to Algorithms (4th ed., 2022). Ch. 3.
- Knuth. The Art of Computer Programming, Volume 1: Fundamental Algorithms (3rd ed.).