References etc.
This commit is contained in:
parent
ef1e3abfd1
commit
3b312e9caf
|
@ -326,7 +326,7 @@ of the algorithm is at least $O(n^2)$.
|
||||||
It is possible to sort an array efficiently
|
It is possible to sort an array efficiently
|
||||||
in $O(n \log n)$ time using algorithms
|
in $O(n \log n)$ time using algorithms
|
||||||
that are not limited to swapping consecutive elements.
|
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.}
|
mergesort was invented by J. von Neumann in 1945.}
|
||||||
that is based on recursion.
|
that is based on recursion.
|
||||||
|
|
||||||
|
|
|
@ -657,7 +657,9 @@ achieves these properties.
|
||||||
|
|
||||||
\index{Floyd's algorithm}
|
\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$.
|
in the graph using two pointers $a$ and $b$.
|
||||||
Both pointers begin at a node $x$ that
|
Both pointers begin at a node $x$ that
|
||||||
is the starting node of the graph.
|
is the starting node of the graph.
|
||||||
|
|
|
@ -368,7 +368,10 @@ performs two depth-first searches.
|
||||||
\index{2SAT problem}
|
\index{2SAT problem}
|
||||||
|
|
||||||
Strongly connectivity is also linked with the
|
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
|
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),
|
(a_1 \lor b_1) \land (a_2 \lor b_2) \land \cdots \land (a_m \lor b_m),
|
||||||
|
|
|
@ -676,7 +676,9 @@ nodes in $O(\log n)$ time using this technique.
|
||||||
\subsubsection{Method 2}
|
\subsubsection{Method 2}
|
||||||
|
|
||||||
Another way to solve the problem is based on
|
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
|
Once again, the idea is to traverse the nodes
|
||||||
using a depth-first search:
|
using a depth-first search:
|
||||||
|
|
||||||
|
@ -719,8 +721,7 @@ However, we use a bit different tree
|
||||||
traversal array than before:
|
traversal array than before:
|
||||||
we add each node to the array \emph{always}
|
we add each node to the array \emph{always}
|
||||||
when the depth-first search walks through the node,
|
when the depth-first search walks through the node,
|
||||||
and not only at the first visit\footnote{A similar technique is sometimes called the
|
and not only at the first visit.
|
||||||
\key{Euler tour technique} \cite{tar84}.}.
|
|
||||||
Hence, a node that has $k$ children appears $k+1$ times
|
Hence, a node that has $k$ children appears $k+1$ times
|
||||||
in the array and there are a total of $2n-1$
|
in the array and there are a total of $2n-1$
|
||||||
nodes in the array.
|
nodes in the array.
|
||||||
|
|
11
list.tex
11
list.tex
|
@ -54,6 +54,11 @@
|
||||||
Theoretical improvements in algorithmic efficiency for network flow problems.
|
Theoretical improvements in algorithmic efficiency for network flow problems.
|
||||||
\emph{Journal of the ACM}, 19(2):248--264, 1972.
|
\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}
|
\bibitem{fan94}
|
||||||
D. Fanding.
|
D. Fanding.
|
||||||
A faster algorithm for shortest-path -- SPFA.
|
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.
|
The statistics of dimers on a lattice: I. The number of dimer arrangements on a quadratic lattice.
|
||||||
\emph{Physica}, 27(12):1209--1225, 1961.
|
\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.
|
D. E. Knuth.
|
||||||
\emph{The Art of Computer Programming. Volume 3: Sorting and Searching}, Addison–Wesley, 1998 (2nd edition).
|
\emph{The Art of Computer Programming. Volume 3: Sorting and Searching}, Addison–Wesley, 1998 (2nd edition).
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue