Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please do all three questions and provide detailed explaination. Thanks! [ 0 / 1 Knapsack ] Consider the knapsack problem discussed in class. We now

Please do all three questions and provide detailed explaination. Thanks!
[0/1 Knapsack] Consider the knapsack problem discussed in class. We now add the
requirement that xi=1 or xi=0,AAi. That is, an object is either completely included or not
included into the knapsack. We call this new version of knapsack problem as 0/1 Knapsack
problem, and we still want to maximize the profit subject to the total weight M.
(a) One greedy strategy is: consider the objects in order of nonincreasing profit pi; add the
object into the knapsack if it fits. Show that this strategy doesn't necessarily yield optimal
solutions.
(b) One greedy strategy is: consider the objects in order of nondecreasing weight wi; add the
object into the knapsack if it fits. Show that this strategy doesn't necessarily yield optimal
solutions.
(c) One greedy strategy is: consider the objects in order of nonincreasing density piwi; add
the object into the knapsack if it fits. Show that this strategy doesn't necessarily yield optimal
solutions.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Manga Guide To Databases

Authors: Mana Takahashi, Shoko Azuma, Co Ltd Trend

1st Edition

1593271905, 978-1593271909

More Books

Students also viewed these Databases questions