From eb445abef41bc8d2686a273b18fe9c582f632b97 Mon Sep 17 00:00:00 2001 From: Antti H S Laaksonen Date: Fri, 19 May 2017 00:24:08 +0300 Subject: [PATCH] Change variable x -> n --- chapter16.tex | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/chapter16.tex b/chapter16.tex index c6e91f3..1cdbca7 100644 --- a/chapter16.tex +++ b/chapter16.tex @@ -437,13 +437,13 @@ In such a graph, each node corresponds to a dynamic programming state and the edges indicate how the states depend on each other. As an example, consider the problem -of forming a sum of money $x$ +of forming a sum of money $n$ using coins $\{c_1,c_2,\ldots,c_k\}$. In this problem, we can construct a graph where each node corresponds to a sum of money, and the edges show how the coins can be chosen. -For example, for coins $\{1,3,4\}$ and $x=6$, +For example, for coins $\{1,3,4\}$ and $n=6$, the graph is as follows: \begin{center} \begin{tikzpicture}[scale=0.9] @@ -474,9 +474,9 @@ the graph is as follows: \end{center} Using this representation, -the shortest path from node 0 to node $x$ +the shortest path from node 0 to node $n$ corresponds to a solution with the minimum number of coins, -and the total number of paths from node 0 to node $x$ +and the total number of paths from node 0 to node $n$ equals the total number of solutions. \section{Successor paths}