diff --git a/chapter03.tex b/chapter03.tex index 21349d4..441ea1d 100644 --- a/chapter03.tex +++ b/chapter03.tex @@ -326,7 +326,7 @@ of the algorithm is at least $O(n^2)$. It is possible to sort an array efficiently in $O(n \log n)$ time using algorithms that are not limited to swapping consecutive elements. -One such algorithm is \key{mergesort}\footnote{According to \cite{knu98}, +One such algorithm is \key{mergesort}\footnote{According to \cite{knu983}, mergesort was invented by J. von Neumann in 1945.} that is based on recursion. diff --git a/chapter16.tex b/chapter16.tex index f5e312d..09d99cb 100644 --- a/chapter16.tex +++ b/chapter16.tex @@ -657,7 +657,9 @@ achieves these properties. \index{Floyd's algorithm} -\key{Floyd's algorithm} walks forward +\key{Floyd's algorithm}\footnote{The idea of the algorithm is mentioned in \cite{knu982} +and attributed to R. W. Floyd; however, it is not known if Floyd was the first +who discovered the algorithm.} walks forward in the graph using two pointers $a$ and $b$. Both pointers begin at a node $x$ that is the starting node of the graph. diff --git a/chapter17.tex b/chapter17.tex index ba99272..b52dad6 100644 --- a/chapter17.tex +++ b/chapter17.tex @@ -368,7 +368,10 @@ performs two depth-first searches. \index{2SAT problem} Strongly connectivity is also linked with the -\key{2SAT problem} \cite{asp79}. +\key{2SAT problem}\footnote{The algorithm presented here was +introduced in \cite{asp79}. +There is also another well-known linear-time algorithm \cite{eve75} +that is based on backtracking.}. In this problem, we are given a logical formula \[ (a_1 \lor b_1) \land (a_2 \lor b_2) \land \cdots \land (a_m \lor b_m), diff --git a/chapter18.tex b/chapter18.tex index 2be2193..81c7ab3 100644 --- a/chapter18.tex +++ b/chapter18.tex @@ -676,7 +676,9 @@ nodes in $O(\log n)$ time using this technique. \subsubsection{Method 2} Another way to solve the problem is based on -a tree traversal array \cite{ben00}. +a tree traversal array\footnote{This lowest common ancestor algorithm is based on \cite{ben00}. +This technique is sometimes called the \index{Euler tour technique} +\key{Euler tour technique} \cite{tar84}.}. Once again, the idea is to traverse the nodes using a depth-first search: @@ -719,8 +721,7 @@ However, we use a bit different tree traversal array than before: we add each node to the array \emph{always} when the depth-first search walks through the node, -and not only at the first visit\footnote{A similar technique is sometimes called the -\key{Euler tour technique} \cite{tar84}.}. +and not only at the first visit. Hence, a node that has $k$ children appears $k+1$ times in the array and there are a total of $2n-1$ nodes in the array. diff --git a/list.tex b/list.tex index 4bee692..d55e6b4 100644 --- a/list.tex +++ b/list.tex @@ -54,6 +54,11 @@ Theoretical improvements in algorithmic efficiency for network flow problems. \emph{Journal of the ACM}, 19(2):248--264, 1972. +\bibitem{eve75} + S. Even, A. Itai and A. Shamir. + On the complexity of time table and multi-commodity flow problems. + \emph{16th Annual Symposium on Foundations of Computer Science}, 184--193, 1975. + \bibitem{fan94} D. Fanding. A faster algorithm for shortest-path -- SPFA. @@ -141,7 +146,11 @@ The statistics of dimers on a lattice: I. The number of dimer arrangements on a quadratic lattice. \emph{Physica}, 27(12):1209--1225, 1961. -\bibitem{knu98} +\bibitem{knu982} + D. E. Knuth. + \emph{The Art of Computer Programming. Volume 2: Seminumerical Algorithms}, Addison–Wesley, 1998 (3rd edition). + +\bibitem{knu983} D. E. Knuth. \emph{The Art of Computer Programming. Volume 3: Sorting and Searching}, Addison–Wesley, 1998 (2nd edition).