diff --git a/chapter07.tex b/chapter07.tex index 4f2d08f..e5b16e9 100644 --- a/chapter07.tex +++ b/chapter07.tex @@ -122,7 +122,7 @@ Thus, the recursive formula is where the function $\min$ gives the smallest of its parameters. In the general case, for the coin set -$\{c_0,c_1,\ldots,c_{k-1}\}$, +$\{c_1,c_2,\ldots,c_k\}$, the recursive formula is \[f(x) = \min(f(x-c_1),f(x-c_2),\ldots,f(x-c_k))+1.\] The base case for the function is @@ -392,6 +392,7 @@ possibilities of dynamic programming. \index{longest increasing subsequence} +Let us consider the following problem: Given an array that contains $n$ numbers, our task is to find the @@ -399,7 +400,7 @@ our task is to find the of the array. This is a sequence of array elements that goes from left to right, -and each element in the sequence is larger +and each element of the sequence is larger than the previous element. For example, in the array @@ -487,23 +488,24 @@ that ends at position $k$ is constructed: \begin{enumerate} \item The subsequence only contains the element at position $k$. In this case $f(k)=1$. -\item The subsequence is constructed -by adding the element at position $k$ to -a subsequence that ends at position $i$ -where $i