this is for holding javascript data
Niclas Alexandersson edited b) Algorithm.tex
almost 10 years ago
Commit id: 47e843fe70c3c283ac0e4a7edaf43a2d6784965b
deletions | additions
diff --git a/b) Algorithm.tex b/b) Algorithm.tex
index 0c7456f..4d7b13a 100644
--- a/b) Algorithm.tex
+++ b/b) Algorithm.tex
...
However, if we only know the length of the input, and not the numbers themselves, we get differing upper and lower bounds. A binary number of length $n$ is any number $k$ such that $\floor{\log_2(k)}=n$. The smallest such number is $2^n$, and the largest such number is $2^{n+1}-1$. Let $n=\floor{\log_2(k)}$ be the length of $k$, and $m=\floor{\log_2(p)}$ be the length of $p$. We then get:
\[
T_{\verb|min|}(m, n) = \sum_{i=1}^{2^n}{\left[(i + 1)
\dcot \cdot m\right]}
\]