Coin Machine
Coin Machine
This Demonstration shows a coin machine. Coins are available in denominations of 1, 5, 10, 25, and 50 cents and 1 dollar. Specific coins can be excluded and you can refill the machine. The coin machine can provide change for a given amount of money. Three algorithms are presented: the greedy algorithm, the optimal algorithm for the given system, and a random algorithm.