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. a. describe a greedy algorithm to make change consisting of quarters, dimes, nickels, and pennies. prove that your algorithm yields an optimal solution. b. suppose that the available coins are in the denominations that are powers of c, i. e., the denominations are c0, c1, , ck for some integers c > 1 and k % 1. show that the greedy algorithm always yields an optimal solution. c. give a set of coin denominations 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. d. give an o(nk)-time algorithm that makes change for any set of k different coin denominations, assuming that one of the coins is a penny.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 06:30
On early television stations, what typically filled the screen from around 11pm until 6am? test dummies test patterns tests testing colors
Answers: 1
question
Computers and Technology, 23.06.2019 14:00
How are stop motion special effects in animated films created
Answers: 1
question
Computers and Technology, 24.06.2019 02:00
Which steps will open the system so that you can enter a question and do a search for
Answers: 1
question
Computers and Technology, 24.06.2019 20:00
Avirus enters a computer or network as code embedded in other software directly from another computer
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
Health, 14.02.2021 03:50
question
Mathematics, 14.02.2021 03:50
question
Mathematics, 14.02.2021 03:50
question
Social Studies, 14.02.2021 03:50
question
Social Studies, 14.02.2021 03:50
Questions on the website: 13722359