Solve using fractional knapsack:
M=20, n=4
P= (3, 10, 15, 5)
W= (5, 13, 12, 8).
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.
The fractional knapsack problem involves selecting items to fill a knapsack of limited capacity (M=20 in this case) in such a way as to maximize the total value.
Here’s how to solve it:
So the optimal solution is to choose items 3, 2 and a fraction of item 1, with a total value of 22.