Problem 1-1
For each function f ( n ) f(n) f ( n ) and time t t t in the following table, determine the largest size n n n of a problem that can be solved in time t t t , assuming that the algorithm to solve the problem takes f ( n ) f(n) f ( n ) microseconds.
1 second 1 minute 1 hour 1 day 1 month 1 year 1 century lg n 2 1 0 6 2 6 × 1 0 7 2 3.6 × 1 0 9 2 8.64 × 1 0 10 2 2.59 × 1 0 12 2 3.15 × 1 0 13 2 3.15 × 1 0 15 n 1 0 12 3.6 × 1 0 15 1.3 × 1 0 19 7.46 × 1 0 21 6.72 × 1 0 24 9.95 × 1 0 26 9.95 × 1 0 30 n 1 0 6 6 × 1 0 7 3.6 × 1 0 9 8.64 × 1 0 10 2.59 × 1 0 12 3.15 × 1 0 13 3.15 × 1 0 15 n lg n 6.24 × 1 0 4 2.8 × 1 0 6 1.33 × 1 0 8 2.76 × 1 0 9 7.19 × 1 0 10 7.98 × 1 0 11 6.86 × 1 0 13 n 2 1000 7745 60000 293938 1609968 5615692 56156922 n 3 100 391 1532 4420 13736 31593 146645 2 n 19 25 31 36 41 44 51 n ! 9 11 12 13 15 16 17
\begin{array}{cccccccc}
& \text{1 second} & \text{1 minute} & \text{1 hour} & \text{1 day} & \text{1 month} & \text{1 year} & \text{1 century} \\
\hline
\lg n & 2^{10^6} & 2^{6 \times 10^7} & 2^{3.6 \times 10^9} & 2^{8.64 \times 10^{10}} & 2^{2.59 \times 10^{12}} & 2^{3.15 \times 10^{13}} & 2^{3.15 \times 10^{15}} \\
\sqrt n & 10^{12} & 3.6 \times 10^{15} & 1.3 \times 10^{19} & 7.46 \times 10^{21} & 6.72 \times 10^{24} & 9.95 \times 10^{26} & 9.95 \times 10^{30} \\
n & 10^6 & 6 \times 10^7 & 3.6 \times 10^9 & 8.64 \times 10^{10} & 2.59 \times 10^{12} & 3.15 \times 10^{13} & 3.15 \times 10^{15} \\
n\lg n & 6.24 \times 10^4 & 2.8 \times 10^6 & 1.33 \times 10^8 & 2.76 \times 10^9 & 7.19 \times 10^{10} & 7.98 \times 10^{11} & 6.86 \times 10^{13} \\
n^2 & 1000 & 7745 & 60000 & 293938 & 1609968 & 5615692 & 56156922 \\
n^3 & 100 & 391 & 1532 & 4420 & 13736 & 31593 & 146645 \\
2^n & 19 & 25 & 31 & 36 & 41 & 44 & 51 \\
n! & 9 & 11 & 12 & 13 & 15 & 16 & 17
\end{array}
lg n n n n lg n n 2 n 3 2 n n ! 1 second 2 1 0 6 1 0 12 1 0 6 6.24 × 1 0 4 1000 100 19 9 1 minute 2 6 × 1 0 7 3.6 × 1 0 15 6 × 1 0 7 2.8 × 1 0 6 7745 391 25 11 1 hour 2 3.6 × 1 0 9 1.3 × 1 0 19 3.6 × 1 0 9 1.33 × 1 0 8 60000 1532 31 12 1 day 2 8.64 × 1 0 10 7.46 × 1 0 21 8.64 × 1 0 10 2.76 × 1 0 9 293938 4420 36 13 1 month 2 2.59 × 1 0 12 6.72 × 1 0 24 2.59 × 1 0 12 7.19 × 1 0 10 1609968 13736 41 15 1 year 2 3.15 × 1 0 13 9.95 × 1 0 26 3.15 × 1 0 13 7.98 × 1 0 11 5615692 31593 44 16 1 century 2 3.15 × 1 0 15 9.95 × 1 0 30 3.15 × 1 0 15 6.86 × 1 0 13 56156922 146645 51 17