0-1 Knapsack Problem

The knapsack problem is to choose which objects (on the left) maximize the total value of the knapsack contents (on the right) subject to a total weight constraint. The 0-1 refers to a restriction: zero or one of each object.
The objects are , , where the are values and the are weights. The Demonstration maximizes , or , subject to the constraint .


  • [Snapshot]
  • [Snapshot]
  • [Snapshot]


[1] H. Ruskeepää, Mathematica Navigator, 3rd ed., San Diego, CA: Elsevier Academic Press, 2009, Chapter 23.2.2, p. 759.
    • Share:

Embed Interactive Demonstration New!

Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details »

Files require Wolfram CDF Player or Mathematica.