Business
Business, 22.07.2019 18:00, lyndah15

The 100% rule does not imply that the optimal solution will necessarily change if the percentage exceeds 100%

answer
Answers: 1

Similar questions

Предмет
Computers and Technology, 25.10.2019 04:43, sobell7725
Consider the problem of making change for n cents using the fewest number of coins. assume that each coins value is an integer. a. you have available coin denominations of 1 cent, 5 cents, 10 cents, 25 cents, as in the us coins of penny, nickel, dime, quarter. assume there is infinite availability of each of these four coin denomination types. describe a greedy algorithm to make change using the fewest number of coins. b. consider your greedy algorithm and making change for n=30 cents. show that the optimal solution for making change includes your greedy choice. to do so, assume that your greedy choice is not in the optimal solution. then use the "cut and paste" argument to show that you can replace other coins by your greedy choice, therefore finding a better solution than what was assumed to be optimal. this is in contradiction to the assumption, so your greedy choice is in the optimal solution. c. although the greedy algorithm is optimal for the us coins, it is not necessarily optimal for any set of coins. give an example of a different set of made up coin denominations with different values, for which the greedy algorithm does not yield an optimal solution. your set should include a penny so that there is a solution for every value of n. as before, assume there is infinite availability of each of the coin denomination types. show specifically a counter example in which the greedy algorithm yields a change solution that is not optimal, that is, does not include the fewest number of coins. d. name another algorithmic approach that will find an optimal solution to your example in (c).
Answers: 3
Do you know the correct answer?
The 100% rule does not imply that the optimal solution will necessarily change if the percentage exc...

Questions in other subjects:

Konu
Mathematics, 12.08.2020 14:01