Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Suppose, we employ the following strategy for making up a given amount x cents: (a) Choose (n1:x40 ), 40 cent coins. Let x:=x40n1 . (b)
Suppose, we employ the following strategy for making up a given amount x cents: (a) Choose (n1:x40 ), 40 cent coins. Let x:=x40n1 . (b) Choose (n2:x30) , 30 cent coins. Let x:=x30n2 . ... and so on ... (e) Choose (n5:x) 1 cent coins. How many coins does the greedy strategy require to make up 60 cents? Answer Which of the following is true about the set of US coins: 1 cents, 5 cents, 10 cents, 25 cents and 50 cents? The denominations are set so that the greedy algorithm also happens to be optimal for coin changing Not all denominations can be changed Adding a 20 cent coin makes the greedy algorithm optimal Changing 99 cents requires at least 10 coins
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started