In change-making problem with following Greedy algorithms, addresses the following question: how can a given amount of money be made with the least number of coins?
Algorithm: using most valuable coins, if it possible. Suppose we have infinite numbers of each coins set.
my professor, wrote the (4) is not produce the optimal solution, anyone could say why? (or why other is not counterexample? )
1- {1,2,5}
2- {1,4,7}
3-{1,5,10}
4-{1,7,10}