subject
Mathematics, 25.02.2020 03:46 mandilynn22

Now, consider the change problem in Binaryland. The input to this problem is an integer L. The output should be the minimum cardinality collection of coins required to make L cents of change (that is, you want to use as few coins as possible). In Binaryland, the coins are worth 1, 2, 22, 23, ..., 21000 cents. Assume that you have an unlimited number of coins of each type. Prove or disprove that the greedy algorithm (that takes as many coins of the highest value as possible) solves the change problem in Binaryland. HINT: The greedy algorithm is correct for one of the above two problems and is incorrect for the other.

ansver
Answers: 2

Other questions on the subject: Mathematics

image
Mathematics, 21.06.2019 13:20, allicat133
Given the following statements, which is the best
Answers: 2
image
Mathematics, 21.06.2019 15:00, babygirl123468
Martha needs 22.25 strawberries for every 5 smoothies she makes. complete the table to see how many strawberries she would need to make 10 smoothies and 20 smoothies.
Answers: 1
image
Mathematics, 21.06.2019 18:50, khalfani0268
The number of fish in a lake can be modeled by the exponential regression equation y=14.08 x 2.08^x where x represents the year
Answers: 3
image
Mathematics, 22.06.2019 02:30, brimccauley6518
Write a ratio and a percent for the shaded area. it is 3x3 and 5x5 grid there is 6 shaded out of a. 6 over 25 , 30% b. 3 over 50 , 6% c.6 over 25 , 24% d. 3 over 10 , 30%
Answers: 1
You know the right answer?
Now, consider the change problem in Binaryland. The input to this problem is an integer L. The outpu...

Questions in other subjects:

Konu
Mathematics, 02.02.2021 23:10
Konu
Mathematics, 02.02.2021 23:10
Konu
Mathematics, 02.02.2021 23:10
Konu
Arts, 02.02.2021 23:10