You are given 11 coins of values given above.
What is the smallest ( positive integer) amount of money, that cannot be paid using the coins?
Hint: Order the coins according to their value i.e., Now, consider the sets of amounts of money that can be paid using consecutive prefixes of the ordered sequence of coins
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Let us follow the hint. Using just the first two coins, it is possible to pay any amount from 0 to 2. If we include the third coin, 2, the range of amounts that can be paid extends to from 0 to 4. What if we include coin 5? Can we pay any amount of money from 0 to 4+5=9? Yes, for any amount from 0 to 4, we do not have to use coin 5, and for any amount x from 5 to 9, we use coin 5 and the amount x−5 can be paid using the remaining coins.
In general, if the range of amounts that can be paid using the first k coins is from 0 to r, and the following coin has value x, then either:
• x ≤ r + 1 and it is possible to pay any amount from 0 to r + x using the first k + 1 coins, or
• x > r + 1 and it is not possible to pay the amount of r + 1, since x and all the following coins have greater values.
Using this observation, we obtain the following sequence of included coins and ranges of amounts that can be paid:
And finally, 170 > 168 + 1 = 169, so the smallest amount that cannot be paid using the given coins is 1 6 9 .