Answer to Question #271983 in Algorithms for Anu

Question #271983

(i) Formulate the Knapsack problem and write the pseudo code for solving a fractional

Knapsack problem. Also calculate its time complexity.

(ii) Find an optimal solution for the knapsack instance n (number of objects) =7 and

W ( totalweight) =15. Profits and weights of each object are shown below:

(p1, p2………..p7) = (10, 5, 15, 7, 6, 18, 3)

(w1, w2………w7) = (2, 3, 5, 7, 6, 4, 1)

Show all the steps.


1
Expert's answer
2021-11-28T11:45:16-0500

i)

The most common problem being solved is the 0-1 knapsack problem, which restricts the number xi of copies of each kind of item to zero or one. Given a set of n items numbered from 1 up to  n, each with a weight wi and a value vi, along with a maximum weight capacity W

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS