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

Another question on Mathematics

question
Mathematics, 21.06.2019 20:30
What is the best approximation for the area of a circle with a radius of 4 m ? use 3.14 to approximate pi
Answers: 1
question
Mathematics, 21.06.2019 23:00
Alex measured the length of an item to be 3.7 cm. the actual length is 3.5 cm. what is alex’s percent error?
Answers: 2
question
Mathematics, 21.06.2019 23:30
Write an inequality for this sentence the quotient of a number and -5 increased by 4 is at most 8
Answers: 1
question
Mathematics, 22.06.2019 00:30
Select the correct answer from each drop-down menu. let c(g) be the total cost, including shoe rental, for bowling g games at pin town lanes. c(g) = 5g+3 so, c(6) = 8? 33? 30? or 14? this means that for a $6 shoe rental? for $6 per game? for 6 games? for a total cost of $6? , the games are $8 each? total cost is $33? number of games is 14? or total cost is $30? reset next
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
question
Mathematics, 24.02.2021 03:10
question
Mathematics, 24.02.2021 03:10
Questions on the website: 13722362