0 0 0 10 10 10 10 10 10 10 10 10 10 10 0 0 0 10 13 13 13 23 23 23 23 23 23 23 0 0 0 10 13 13 18 23 23 28 31 31 31 41 0 0 0 10 13 14 18 23 24 28 31 32 37 41 0 0 0 10 13 14 18 23 24 28 31 32 37 41For the smaller capacities, it will construct only as much of this table as is needed. The values of the solutions for capacities 9 through 13 can be seen to be 28, 31, 32, 37, and 41. The respective solutions are those that include items of the following weights: 6 and 3; 6 and 4; 6 and 5; 5, 3, and 4; and 6, 3, and 4.
The capacity 80 solution would also include the items of weight 6 and 12, and benefits 22 and 42. The capacity 85 solution would also include the items of weight 4, 6, 3 and 10, and benefits 15, 22, 11, and 35. The capacity 90 solution would also include the items of weight 6, 12, and 10, and benefits 22, 42, and 35. The capacity 95 solution would also include the weight 6, 12, 10, and 4, and benefits 22, 42, 35, and 15. Note that this last solution does not fill the knapsack.
0/0
/ \
6/18 ^
/ \ / \
11/32 ^ 5/14 ^
/\ / \ / \ / \
* ^ 9/28 ^ 8/24 ^ 3/10 ^
/ \ / \ / \ / \ / \ / \ / \
* ^ 13/41 ^ 10/31 ^ 12/37 ^ 9/27 ^ 7/23 ^ 4/13 ^
/ \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \
* ^ * ^ * ^ 13/35 ^ * ^ * ^ * ^ 12/31 ^ * ^ 10/27 ^ 11/30 ^ 7/17 ^