knapsack problem
Sign in to saveAlso known as rucksack problem, backpack problem
problem in combinatorial optimization
~38 min read
Encyclopedic overview
Example of a one-dimensional (constraint) knapsack problem: which books should be chosen to maximize the books' value while still keeping the overall weight under or equal to 15 kg? A multiple constrained problem could consider both the weight and volume of the books. (Solution: if any number of each book is available, then three yellow books and three grey books; if only the shown books are available, then all except for the green book.)
The knapsack problem is the following problem in combinatorial optimization:
Excerpted from Wikipedia’s “knapsack problem” article, available under the CC BY-SA 4.0 licence.