Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

When you start listing algorithms, you see that their speeds fall in a line. There are the log ones, the polys (with n lg n between n and n^2), the exponentials, and higher.

So why the distinction between poly and exp? A modern computer runs at about 10 GHz, 10,000 million ticks per second, and there are about 3.16×10^7 seconds in a year. Suppose your problem has size n=100. Then an n^3 algorithm takes 3.17×10^{-12} years. A 2^n algorithm takes 4.02×10^{12} years. The first is perfectly practible, the second is not (its time is longer than the age of the universe).



Thanks! But my question wasn't as basic as this :-) I tried to edit to clarify.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: