Discrete Mathematics / Further counting, graphs and algorithms
Growth Rates and Big-O
How to say an algorithm is fast: comparing functions by how they grow, ignoring constants.
Contents 2 sections
By the end you can
- Define , and
- Rank common growth rates
- Analyse simple loops and divide-and-conquer recurrences
Helps to know: Recurrence Relations
§1Ignoring constants
Binary search halves its problem each step: gives . Merge sort solves two halves and merges: gives .
Check yourself
- Q1is…
- Q2Which grows fastest?