Change variable s -> x

This commit is contained in:
Antti H S Laaksonen 2017-05-18 20:48:07 +03:00
parent 0a87804856
commit 22749765ee
1 changed files with 2 additions and 2 deletions

View File

@ -25,7 +25,7 @@ a greedy algorithm works.
As a first example, we consider a problem As a first example, we consider a problem
where we are given a set of coins where we are given a set of coins
and our task is to form a sum of money $s$ and our task is to form a sum of money $x$
using the coins. using the coins.
The values of the coins are The values of the coins are
$\{c_1,c_2,\ldots,c_k\}$, $\{c_1,c_2,\ldots,c_k\}$,
@ -34,7 +34,7 @@ What is the minimum number of coins needed?
For example, if the coins are the euro coins (in cents) For example, if the coins are the euro coins (in cents)
\[\{1,2,5,10,20,50,100,200\}\] \[\{1,2,5,10,20,50,100,200\}\]
and $s=520$, and $x=520$,
we need at least four coins. we need at least four coins.
The optimal solution is to select coins The optimal solution is to select coins
$200+200+100+20$ whose sum is 520. $200+200+100+20$ whose sum is 520.