0% found this document useful (0 votes)
62 views2 pages

Overview of the Knapsack Problem

The knapsack problem is a problem in combinatorial optimization where, given a set of items each with a mass and value, the goal is to choose items to put in a knapsack to maximize the total value without exceeding the knapsack's weight limit. It has applications in resource allocation and is studied in fields like computer science. While it has been studied for over a century, it remains computationally difficult. Common approaches to solving it include dynamic programming, meet-in-the-middle algorithms, and approximation algorithms. There are also many variations of the knapsack problem studied.

Uploaded by

princeram123
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views2 pages

Overview of the Knapsack Problem

The knapsack problem is a problem in combinatorial optimization where, given a set of items each with a mass and value, the goal is to choose items to put in a knapsack to maximize the total value without exceeding the knapsack's weight limit. It has applications in resource allocation and is studied in fields like computer science. While it has been studied for over a century, it remains computationally difficult. Common approaches to solving it include dynamic programming, meet-in-the-middle algorithms, and approximation algorithms. There are also many variations of the knapsack problem studied.

Uploaded by

princeram123
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Knapsack problem

From Wikipedia, the free encyclopedia

"BKP" redirects here. For other uses, see BKP (disambiguation).

Example of a one-dimensional (constraint) knapsack problem: which boxes should be chosen to maximize the amount of money 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 boxes. (Solution: if any number of each box is available, then three yellow boxes and three grey boxes; if only the shown boxes are available, then all but the green box.)

The knapsack problem or rucksack problem is a problem in combinatorial optimization: Given a set of items, each with a mass and a value, 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 the total value is as large as possible. It derives its name from the problem faced by someone who is constrained by a fixed-size knapsack and must fill it with the most valuable items. The problem often arises in resource allocation where there are financial constraints and is studied in fields such as combinatorics, computer science, complexity theory, cryptography and applied mathematics. The knapsack problem has been studied for more than a century, with early works dating as far back as 1897.[1] It is not known how the name "knapsack problem" originated, though the problem was referred to as such in the early works of mathematician Tobias Dantzig (18841956),[2]suggesting that the name could have existed in folklore before a mathematical problem had been fully defined.[3]
Contents
[hide]

1 Applications

2 Definition 3 Computational complexity 4 Solving

4.1 Dynamic programming

o o

4.1.1 Unbounded knapsack problem 4.1.2 0/1 Knapsack Problem

4.2 Meet-in-the-middle 4.3 Approximation algorithms

4.3.1 Greedy approximation algorithm 4.3.2 Fully polynomial time approximation scheme

4.4 Dominance relations

5 Solutions

5.1 Lua

6 Variations

o o o o

6.1 Multi-objective knapsack problem 6.2 Multiple knapsack problem 6.3 Quadratic knapsack problem 6.4 Subset-sum problem

7 Software 8 See also 9 Notes 10 References 11 External links

You might also like