Log-log Example

Suppose that f(n) = 25 * n2 .

n f(n)
2 100
3 225
4 400
5 625
6 900

The log-log graph makes it obvious that f(n) is O(n2).

The points that are plotted from the function lie on a straight line that is parallel to a known O(n2) line.

Contents    Page-10    Prev    Next    Page+10    Index