Question: consider a greedy algorithm that selects stamps by first choosing as many of the 10-cent stamps as possible, then as many of 8 cent stamps

consider a greedy algorithm that selects stamps by first choosing as many of the 10-cent stamps as possible, then as many of 8 cent stamps as possible, then as many 1 cent stamps as possible. does this greedy algorithm always produce the fewest number of stamps needed for each possible amount of postage? why or why not

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 Mathematics Questions!