(classic problem)

**Definition:**
Given types of items of different values and volumes, find the most valuable set of items that fit in a knapsack of fixed volume. The number of items of each type is unbounded. This is an *NP-hard* combinatorial *optimization problem*.

**Formal Definition:** There is a knapsack of capacity c > 0 and N types of items. Each item of type t has value v_{t} > 0 and weight w_{t} > 0. Find the number n_{t} > 0 of each type of item such that they fit, ∑_{t=1}^{N} n_{t}w_{t} ≤ c, and the total value, ∑_{t=1}^{N} n_{t}v_{t}, is maximized.

**Also known as** UKP.

**See also**
*knapsack problem*, *fractional knapsack problem*.

Author: PEB

Moshe Sniedovich's demonstration solutions using *dynamic programming*. formal definition and links to papers. Links to many papers.

Go to the Dictionary of Algorithms and Data Structures home page.

If you have suggestions, corrections, or comments, please get in touch with Paul Black.

Entry modified 27 September 2013.

HTML page formatted Mon Feb 2 13:10:40 2015.

Cite this as:

Paul E. Black, "unbounded knapsack problem", in
*Dictionary of Algorithms and Data Structures* [online], Vreda Pieterse and Paul E. Black, eds. 27 September 2013. (accessed TODAY)
Available from: http://www.nist.gov/dads/HTML/unboundedKnapsack.html