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 18:40
Mariah was working on a multimedia presentation that included both video and audio files. the file was huge, and she wanted to send it to her coworker in another office. she needed to reduce the size of the file so that it could be transmitted faster. the utility she used to do this was
Answers: 2
question
Computers and Technology, 23.06.2019 13:10
What is domain name system (dns)? allows dynamic ip address allocation so users do not have to have a preconfigured ip address to use the network converts ip addresses into domains, or identifying labels that use a variety of recognizable naming conventions the efficient coexistence of telephone, video, and data communication within a single network, offering convenience and flexibility not possible with separate infrastructures the integration of communication channels into a single service
Answers: 2
question
Computers and Technology, 23.06.2019 23:00
Lucas put a lot of thought into the design for his company's new white paper. he made sure to include repeating design elements such as color schemes and decorative images. his goal was to a.add symmetry b.create a unified publication c.provide consistency d.save money
Answers: 1
question
Computers and Technology, 24.06.2019 00:10
Read each statement below. if the statement describes a peer-to-peer network, put a p next to it. if the statement describes a server-based network, put an s next to it. p - peer-to-peer s - server-based
Answers: 1
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
Mathematics, 16.06.2021 18:00
question
Mathematics, 16.06.2021 18:00
question
Mathematics, 16.06.2021 18:00
question
Geography, 16.06.2021 18:00
Questions on the website: 13722362