Question: Describe an efficient greedy algorithm for making changes for a specified value using a minimum number of coins, assuming there are four denominations of coins

 Describe an efficient greedy algorithm for making changes for a specified

Describe an efficient greedy algorithm for making changes for a specified value using a minimum number of coins, assuming there are four denominations of coins (called quarters, dimes, nickels, and pennies) with values D_1 = 25, D_2 = 10, D_3 = 5, D_4 = 1, respectively. Argue why your algorithm is correct. If a new 20-cent coin (D_5 = 20) is created for the coin set, we can no longer use the greedy strategy to return change with the fewest number of coins. Devise a dynamic programming formulation that determines the fewest number of coins to return as cha for coin denominations

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!