The knapsack problem is a problem in combinatorial optimization: Given a set of items with associated weights and values, determine the number of each item to include in a collection so that the total weight is less than or equal to a given limit and it maximizes the total value. It is an NP-complete problem, but several common simplifications are solved efficiently with dynamic programming.
There are several variants of the knapsack problem, such as 0-1 knapsack problem, bounded and unbounded knapsack problem. The unbounded and 0-1 knapsack are solved efficiently by using divide-and-conquer techniques (dynamic programming).
Other variants, where one can take a non-integer amount of an item, the weights are real numbers (and instances where other constraints become real instead of integer) are NP-complete.
A multiple knapsack problem is often referred to as the bin-packing problem.