Small fixes
This commit is contained in:
parent
55b55d1fc1
commit
8028fddfa6
|
@ -836,7 +836,7 @@ calculate logarithms to some fixed base.
|
|||
\index{natural logarithm}
|
||||
|
||||
The \key{natural logarithm} $\ln(x)$ of a number $x$
|
||||
is a logarithm whose base is $e \approx 2{,}71828$.
|
||||
is a logarithm whose base is $e \approx 2.71828$.
|
||||
|
||||
Another property of logarithms is that
|
||||
the number of digits of an integer $x$ in base $b$ is
|
||||
|
|
|
@ -512,7 +512,7 @@ the lower-right corner and count the number of such paths.
|
|||
\item
|
||||
running time: 483 seconds
|
||||
\item
|
||||
recursive calls: 76 billions
|
||||
recursive calls: 76 billion
|
||||
\end{itemize}
|
||||
|
||||
\subsubsection{Optimization 1}
|
||||
|
@ -566,7 +566,7 @@ and finally multiply the number of the solutions by two.
|
|||
\item
|
||||
running time: 244 seconds
|
||||
\item
|
||||
recursive calls: 38 billions
|
||||
recursive calls: 38 billion
|
||||
\end{itemize}
|
||||
|
||||
\subsubsection{Optimization 2}
|
||||
|
@ -595,7 +595,7 @@ immediately if we reach the lower-right square too early.
|
|||
\item
|
||||
running time: 119 seconds
|
||||
\item
|
||||
recursive calls: 20 billions
|
||||
recursive calls: 20 billion
|
||||
\end{itemize}
|
||||
|
||||
\subsubsection{Optimization 3}
|
||||
|
@ -627,7 +627,7 @@ It turns out that this optimization is very useful:
|
|||
\item
|
||||
running time: 1.8 seconds
|
||||
\item
|
||||
recursive calls: 221 millions
|
||||
recursive calls: 221 million
|
||||
\end{itemize}
|
||||
|
||||
\subsubsection{Optimization 4}
|
||||
|
@ -664,7 +664,7 @@ very efficient:
|
|||
\item
|
||||
running time: 0.6 seconds
|
||||
\item
|
||||
recursive calls: 69 millions
|
||||
recursive calls: 69 million
|
||||
\end{itemize}
|
||||
|
||||
~\\
|
||||
|
|
|
@ -245,7 +245,7 @@ to the position of $X$.
|
|||
Next we will see how we can
|
||||
process range minimum queries in $O(1)$ time
|
||||
after an $O(n \log n)$ time preprocessing using \index{sparse table}
|
||||
a data structure called a \emph{sparse table}\footnote{The
|
||||
a data structure called a \key{sparse table}\footnote{The
|
||||
sparse table structure was introduced in \cite{ben00}.
|
||||
There are also more sophisticated techniques \cite{fis06} where
|
||||
the preprocessing time of the array is only $O(n)$, but such algorithms
|
||||
|
|
|
@ -603,7 +603,7 @@ is named after R. W. Floyd and S. Warshall
|
|||
who published it independently in 1962 \cite{flo62,war62}.}
|
||||
is an alternative way to approach the problem
|
||||
of finding shortest paths.
|
||||
Unlike the other algorihms in this chapter,
|
||||
Unlike the other algorithms in this chapter,
|
||||
it finds all shortest paths between the nodes
|
||||
in a single run.
|
||||
|
||||
|
|
|
@ -130,7 +130,7 @@ Of course, this strategy requires that
|
|||
the number of sticks is \emph{not} divisible by 4
|
||||
when it is our move.
|
||||
If it is, there is nothing we can do,
|
||||
but the opponent will win the game if
|
||||
and the opponent will win the game if
|
||||
they play optimally.
|
||||
|
||||
\subsubsection{State graph}
|
||||
|
|
|
@ -401,7 +401,7 @@ and the next range is
|
|||
\end{tikzpicture}
|
||||
\end{center}
|
||||
there will be three steps:
|
||||
the left endpoint moves one step to the left,
|
||||
the left endpoint moves one step to the right,
|
||||
and the right endpoint moves two steps to the right.
|
||||
|
||||
After each step, the array \texttt{c}
|
||||
|
|
Loading…
Reference in New Issue