Skip to main content

Why use asymptotic notations

Short answer

Asymptotic notations (O, Ω, Θ) provide a machine-independent way to compare algorithms by describing growth rates as input size n becomes large, ignoring constants and lower-order terms. They simplify analysis (e.g., 5n²+3n+7 is Θ(n²)) and predict scalability.

Why do we use asymptotic notations during algorithm analysis?

Exact running time depends on the computer, compiler, language and input, so it cannot be used to compare algorithms fairly. Asymptotic notations (O, Ω, Θ) describe how running time or space grows with the input size n when n becomes large, ignoring constants and lower-order terms.

Reasons:

  • They are machine independent: we compare growth rates, not seconds.
  • They simplify analysis: 5n² + 3n + 7 is just Θ(n²).
  • They show how an algorithm scales: O(n log n) beats O(n²) for large inputs.
  • They express best (Ω), worst (O) and tight (Θ) behaviour, helping to choose the right algorithm before writing code.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Data Structure and Algorithm chapter 9 questions →