Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Statistical Techniques in Business and Economics

Authors: Douglas A. Lind, William G Marchal

17th edition

1259666360, 978-1259666360

More Books

Students also viewed these Mathematics questions