What?

The Knapsack Problem

Given a set of items, each with a weight and a value, 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.

It’s solvable with Dynamic Programming.

Details:

As the amount of options increase, the difficulty grows exponentially. After each item you add to the collection (the knapsack), you have to re-evaluate which items you can now add.

Illustration: