Small fixes
This commit is contained in:
parent
ee009bd9dd
commit
8a936ed246
|
@ -245,8 +245,9 @@ two $n \times n$ matrices
|
|||
in $O(n^3)$ time.
|
||||
There are also more efficient algorithms
|
||||
for matrix multiplication\footnote{The first such
|
||||
algorithm, with time complexity $O(n^{2.80735})$,
|
||||
was published in 1969 \cite{str69}, and
|
||||
algorithm was Strassen's algorithm,
|
||||
published in 1969 \cite{str69},
|
||||
whose time complexity is $O(n^{2.80735})$;
|
||||
the best current algorithm
|
||||
works in $O(n^{2.37286})$ time \cite{gal14}.},
|
||||
but they are mostly of theoretical interest
|
||||
|
@ -749,8 +750,9 @@ $2 \rightarrow 1 \rightarrow 4 \rightarrow 2 \rightarrow 5$.
|
|||
\index{Kirchhoff's theorem}
|
||||
\index{spanning tree}
|
||||
|
||||
\key{Kirchhoff's theorem}\footnote{G. R. Kirchhoff (1824--1887) was
|
||||
a German physicist.} provides a way
|
||||
\key{Kirchhoff's theorem}
|
||||
%\footnote{G. R. Kirchhoff (1824--1887) was a German physicist.}
|
||||
provides a way
|
||||
to calculate the number of spanning trees
|
||||
of a graph as a determinant of a special matrix.
|
||||
For example, the graph
|
||||
|
|
|
@ -359,8 +359,10 @@ The expected value for $X$ in a geometric distribution is
|
|||
|
||||
\index{Markov chain}
|
||||
|
||||
A \key{Markov chain}\footnote{A. A. Markov (1856--1922)
|
||||
was a Russian mathematician.} is a random process
|
||||
A \key{Markov chain}
|
||||
% \footnote{A. A. Markov (1856--1922)
|
||||
% was a Russian mathematician.}
|
||||
is a random process
|
||||
that consists of states and transitions between them.
|
||||
For each state, we know the probabilities
|
||||
for moving to other states.
|
||||
|
@ -515,11 +517,13 @@ just to find one element?
|
|||
|
||||
It turns out that we can find order statistics
|
||||
using a randomized algorithm without sorting the array.
|
||||
The algorithm is a Las Vegas algorithm:
|
||||
The algorithm, called \key{quickselect}\footnote{In 1961,
|
||||
C. A. R. Hoare published two algorithms that
|
||||
are efficient on average: \index{quicksort} \index{quickselect}
|
||||
\key{quicksort} \cite{hoa61a} for sorting arrays and
|
||||
\key{quickselect} \cite{hoa61b} for finding order statistics.}, is a Las Vegas algorithm:
|
||||
its running time is usually $O(n)$
|
||||
but $O(n^2)$ in the worst case\footnote{C. A. R. Hoare
|
||||
discovered both this algorithm, known as \key{quickselect} \cite{hoa61b},
|
||||
and a similar sorting algorithm, known as \key{quicksort} \cite{hoa61a}.}.
|
||||
but $O(n^2)$ in the worst case.
|
||||
|
||||
The algorithm chooses a random element $x$
|
||||
in the array, and moves elements smaller than $x$
|
||||
|
@ -563,9 +567,10 @@ but one could hope that verifying the
|
|||
answer would by easier than to calculate it from scratch.
|
||||
|
||||
It turns out that we can solve the problem
|
||||
using a Monte Carlo algorithm whose
|
||||
time complexity is only $O(n^2)$\footnote{This algorithm is sometimes
|
||||
called \index{Freivalds' algoritm} \key{Freivalds' algorithm} \cite{fre77}.}.
|
||||
using a Monte Carlo algorithm\footnote{R. M. Freivalds published
|
||||
this algorithm in 1977 \cite{fre77}, and it is sometimes
|
||||
called \index{Freivalds' algoritm} \key{Freivalds' algorithm}.} whose
|
||||
time complexity is only $O(n^2)$.
|
||||
The idea is simple: we choose a random vector
|
||||
$X$ of $n$ elements, and calculate the matrices
|
||||
$ABX$ and $CX$. If $ABX=CX$, we report that $AB=C$,
|
||||
|
|
|
@ -249,7 +249,7 @@ It turns out that we can easily classify
|
|||
any nim state by calculating
|
||||
the \key{nim sum} $x_1 \oplus x_2 \oplus \cdots \oplus x_n$,
|
||||
where $\oplus$ is the xor operation\footnote{The optimal strategy
|
||||
for nim was published in 1901 by C. L. Bouton \cite{bou01}}.
|
||||
for nim was published in 1901 by C. L. Bouton \cite{bou01}.}.
|
||||
The states whose nim sum is 0 are losing states,
|
||||
and all other states are winning states.
|
||||
For example, the nim sum for
|
||||
|
@ -369,7 +369,7 @@ so the nim sum is not 0.
|
|||
\index{Sprague–Grundy theorem}
|
||||
|
||||
The \key{Sprague–Grundy theorem}\footnote{The theorem was discovered
|
||||
independently by R. Sprague \cite{spr35} and P. M. Grundy \cite{gru39}} generalizes the
|
||||
independently by R. Sprague \cite{spr35} and P. M. Grundy \cite{gru39}.} generalizes the
|
||||
strategy used in nim to all games that fulfil
|
||||
the following requirements:
|
||||
|
||||
|
|
Loading…
Reference in New Issue