Binary Integer Example - The Knapsack Problem

The knapsack model is a classic problem that uses binary variables. In this problem, you have a group of items you want to pack into your knapsack. Unfortunately, the capacity of the knapsack is limited such that it is impossible to include all items. Each item has a certain value, or utility, associated with including it in the knapsack. The problem is to find the subset of items to include in the knapsack that maximizes the total value of the load without exceeding the capacity of the knapsack.

Of course, the knapsack euphemism shouldn’t lead one to underestimate the importance of this class of problem. The "knapsack" problem can be applied to many situations. Some examples are vehicle loading, capital budgeting and strategic planning.