Mathematical Principles for Scientific Computing and Visualization  
http://www.farinhansford.com/books/scv
by Gerald Farin and Dianne Hansford

Comparison of Typical Algorithm Complexity Functions

This notebook demonstrates the growth of the polynomials, logarithmic, and exponential functions that are typical big-O categories of computing time.

Change the last value in the "{n,1,10}" expression in the Plot command below to larger and larger numbers to see how the exponential function dominates.

Needs["PlotLegends`"]

Plot[{Log[n],n, n*Log[n], n*n, n^3, 2^n}, {n,1,50},  ImageSize->800,
AxesStyle->Directive[FontFamily->"Helvetica", 20], PlotStyle->{Directive[Red,Thick], Directive[Green,Thick], Directive[Blue,Thick], Directive[Yellow,Thick], Directive[Cyan,Thick], Directive[Magenta,Thick]},PlotLegend->{Style["logn", 20,  FontFamily->"Helvetica"], Style["n", 20,  FontFamily->"Helvetica"], Style["nlogn", 20,  FontFamily->"Helvetica"], Style["n^2", 20,  FontFamily->"Helvetica"], Style["n^3", 20,  FontFamily->"Helvetica"], Style["2^n", 20,  FontFamily->"Helvetica"], }, LegendPosition->{0.95, -0.3}]