subject

Consider the 0–1 knapsack problem, in which each item has a weight Wi and a value vi, a solution is a subset of the items with total weight at most equal to the capacity W, and the quality of any solution is the sum of the values of the selected items. i 1 2 3 4
Vi 1 4 3 5
Wi 5 4 6 3.
(a) [10 points] Please use dynamic programming to find out what is the optimal solution with W=10, and what are the corresponding selected items.
(b) [6 points] Suppose one greedy algorithm chooses items in descending sorted order by V;/Wi until there is no room for any more items, what is the solution value found by the greedy heuristic for the above 0-1 knapsack problem?

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 14:50
Drag each label to the correct location on the image list the do’s and don’ts of safeguarding your password. a. keep yourself logged in when you leave your computer.b. don’t write your password down and leave it where others can find it.c. share your password with your friends.d.each time you visit a website,retain the cookies on your computer.e. use a long password with mixed characters.1. do's 2. don'ts
Answers: 2
question
Computers and Technology, 23.06.2019 13:30
Jace needs to answer a question on square roots to win a quiz. how can he use a spreadsheet to find the square root of 786? a. use the functions round and count b. create a table and chart c. use the function sqrt d. use the function now
Answers: 3
question
Computers and Technology, 23.06.2019 14:30
Norder to receive financial aid at his vocational school, mario must fill out the fafsa. the fafsa is a form that must be completed to determine . in order to complete a fafsa, you must submit . the fafsa can students obtain
Answers: 2
question
Computers and Technology, 23.06.2019 16:30
How to do this programming flowchart?
Answers: 3
You know the right answer?
Consider the 0–1 knapsack problem, in which each item has a weight Wi and a value vi, a solution is...
Questions
question
English, 08.04.2021 23:50
question
Biology, 08.04.2021 23:50
question
Mathematics, 08.04.2021 23:50
question
Biology, 08.04.2021 23:50
Questions on the website: 13722367