next up previous
Next: Up: Previous:

NP-Completeness

Almost all algorithms considered so far run in worst-case polynomial time.

That is,

T(n) = O(nk) for some constant k
n = input size


Size n
Complexity 10 20 30 40 50 60
n .00001 s .00002 s .00003 s .00004 s .00005 s .00006 s
n2 .0001 s .0004 s .0009 s .0016 s .0025 s .0036 s
n3 .001 s .008 s .027 s .064 s .125 s .216 s
n5 .1 s 3.2 s 24.3 s 1.7 min 5.2 min 13.0 min
2n .001 s 1.0 s 17.9 min 12.7 days 35.7 years 366 centuries
3n .059 s 58 min 6.5 years 3855 centuries 2x108 centuries 1.3 x 1013 centuries


next up previous
Next: Up: Previous: