...

/

Visualize Common Rules for Runtime Analysis

Visualize Common Rules for Runtime Analysis

Visualize the common rules of runtime analysis of the algorithms.

Multiplicative constants

Multiplicative constants can be omitted. The following plot visualizes that n3n^3 and n3/2n^3/2 have the same growth rate.

The larger degree grows faster

Out of two polynomials, the one with a larger degree grows faster. The plot below shows the polynomial functions nn, n2n^2, and n3n^3 for 1n501\leq n \leq 50.

The plot illustrates that n3n^3 grows faster than n2n^2 and n2n^2 grows faster than nn.

Polynomial grows slower than exponential

Any polynomial grows slower than any exponential. Let’s plot n4n^4 ...