subject

Consider the problem of making change for n cents using the fewest number of coins. assume that each coin's value is an integer. [10 points] a) describe a greedy algorithm to make change consisting of quarters (25 cents each), dimes (10 cents each), nickels (5 cents each), and pennies (1 cent each). prove that your algorithm yields an optimal solution b) give a set of coin value combination (the value of coins may not be limited to quarter, dime, nickel, or penny) for which the greedy algorithm does not yield an optimal solution. use an example to justify your answer. note that your set should include a penny value so that there is a solution for every possible value of n

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 01:00
Complete the sentence about a presentation delivery method
Answers: 2
question
Computers and Technology, 23.06.2019 13:30
Select the correct answer from each drop-down menu. which types of computer networks are bigger as well as smaller than a man? a man is a network of computers that covers an area bigger than a , but smaller than a .
Answers: 1
question
Computers and Technology, 23.06.2019 20:30
Column a of irma’s spreadsheet contains titles for each row, but her document is too big and will be printed three pages across. she wants to be sure that every page will be understood. what can irma do to with this problem?
Answers: 3
question
Computers and Technology, 24.06.2019 05:30
Cómo pongo un tomo de llamada sin pagar?
Answers: 1
You know the right answer?
Consider the problem of making change for n cents using the fewest number of coins. assume that each...
Questions
question
Mathematics, 23.04.2021 19:00
question
Mathematics, 23.04.2021 19:00
question
Chemistry, 23.04.2021 19:00