0-1 Knapsack Problem
‹
Number of Items (n)
Capacity (W)
Item (i)
Weight (W
i
)
Profit (P
i
)
1
2
3
Maximum Profit: 3
Selected Items: [1, 2, 3]
Binary Table:
X
1
X
2
X
3
∑ Profit
0
0
0
0
1
0
0
1
0
1
0
1
0
0
1
1
1
1
0
2
1
0
1
2
0
1
1
2
1
1
1
3
©2023 - M10:V01