added tex for problem 1-1. Finished Chapter 1

This commit is contained in:
pezy_mbp
2015-05-10 01:03:24 +08:00
parent 031ba2f4bb
commit 45aceb9f1e
4 changed files with 23 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
#mac-os
.DS_Store

Binary file not shown.

View File

@@ -0,0 +1,20 @@
\documentclass{article}
\usepackage{array}
\usepackage[margin=0.5in]{geometry}
\begin{document}
\title{Problems 1-1}
\author{pezy}
\maketitle
\begin{tabular}{ c | c | c | c | c | c | c | c | }
& 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
& second & minute & hour & day & month & year & century \\ \hline
$\lg n$ & $2^{10^6}$ & $2^{6\cdot10^7}$ & $2^{36\cdot10^8}$ & $2^{864\cdot10^8}$ & $2^{2592\cdot10^9}$ & $2^{31536\cdot10^9}$ & $2^{31536\cdot10^{11}}$ \\ \hline
$\sqrt{n}$ & $10^{12}$ & $3.6\cdot10^{15}$ & $1.296\cdot10^{19}$ & $7.46496\cdot10^{21}$ & $6.718464\cdot10^{24}$ & $9.945192960\cdot10^{26}$ & $9.945192960\cdot10^{30}$ \\ \hline
$n$ & $10^6$ & $6\cdot10^7$ & $3.6\cdot10^9$ & $8.64\cdot10^{10}$ & $2.592\cdot10^{12}$ & $3.1536\cdot10^{13}$ & $3.1536\cdot10^{15}$ \\ \hline
$n \lg n$ & $62746$ & $2801418$ & $133378059$ & $2755147513$ & $71870856404$ & $7.9763389\cdot10^{11}$ & $6.86109568\cdot10^{13}$ \\ \hline
$n^2$ & $1000$ & $7745$ & $60000$ & $293938$ & $1609968$ & $5615692$ & $56156922$ \\ \hline
$n^3$ & $100$ & $391$ & $1532$ & $4420$ & $13736$ & $31593$ & $146645$ \\ \hline
$2^n$ & $19$ & $25$ & $31$ & $36$ & $41$ & $44$ & $51$ \\ \hline
$n!$ & $9$ & $11$ & $12$ & $13$ & $15$ & $16$ & $17$ \\ \hline
\end{tabular}
\end{document}

View File

@@ -72,3 +72,4 @@ for n in range(1, 100):
> For each function `f(n)` and time `t` in the following table, determine the largest size `n` of a problem that can be solved in time `t`, assuming that the algorithm to solve the problem takes `f(n)` microseconds.
check and run [calc.py](calc.py)
see [P1-1.pdf](P1-1.pdf)