Growth of Functions

Recall the following results:

Algorithm Asymptotic Running Time
Insertion Sort Q (n2)
Merge Sort Q (n lg n)
Asymptotic Running time: As "n gets big" the running time scales like this, or the limit as n ® ¥

Warning: Asymptotic results may be hazardous to your health:

  1. They may hold only when n is "too big".
  2. For a particular n, the best asymptotic algorithm may not be the quickest -- in other words, what if n is not anywhere close to infinity.

 

Growth of Functions - 1 of 5