Knapsack Calculator

Given a set of items, each with a weight and a value. The Knapsack problem is to determine which items to include in the collection so that the total weight is less than or equal to a given limit and the total value is as large as possible.

If the weights are integers, an optimal solution can be found in pseudo-polynomial time by breaking it down into simpler sub-problems. After you run the algorithm, you will see a table showing the solutions of the subproblems. The cell (i,j) contains the maximum value that can be attained with weight less than or equal to j by only using items 1 to i.

Items
Values
Weights
Item 1
Item 2
Item 3
Item 4