Problem 3 Consider the following version of Knapsack. Given are two weight limits W1 and W2, where Wi < W2. Given are al

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Problem 3 Consider the following version of Knapsack. Given are two weight limits W1 and W2, where Wi < W2. Given are al

Post by answerhappygod »

Problem 3 Consider The Following Version Of Knapsack Given Are Two Weight Limits W1 And W2 Where Wi W2 Given Are Al 1
Problem 3 Consider The Following Version Of Knapsack Given Are Two Weight Limits W1 And W2 Where Wi W2 Given Are Al 1 (126.84 KiB) Viewed 60 times
Problem 3 Consider the following version of Knapsack. Given are two weight limits W1 and W2, where Wi < W2. Given are also n items (W1, C1), (W2, C2), ..., (Wn, Cn), where w; is the weight and Cị the cost of the i-th item. We want to find a subset of these items of the highest cost, with the restriction that the total weight of the chosen items must be at least W1 and at most W2. Give an O(nW2) algorithm for this problem. (Recall that the cost (respectively weight) of a subset is the sum of the costs (respectively weights) of the items in the subset.)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply