Question:medium

Find the optimal solution for knapsack instance \[ n=3,\quad m=20, \] \[ (p_1,p_2,p_3)=(25,24,15) \] and \[ (w_1,w_2,w_3)=(18,15,10). \]

Show Hint

For Fractional Knapsack: \[ \text{Select items in decreasing order of } \frac{\text{Profit}}{\text{Weight}}. \] This greedy strategy always produces the optimal solution.
Updated On: Jun 25, 2026
  • \((0,\frac{2}{3},1)\)
  • \((\frac{1}{2},\frac{1}{3},\frac{1}{4})\)
  • \((0,1,\frac{1}{2})\)
  • \((1,1,1)\)
Show Solution

The Correct Option is A

Solution and Explanation

Was this answer helpful?
0