next up previous
Next: Up: Previous:

Knapsack Problem

KNAPSACK: Given a finite set U, a ``size'' \(s(u) \in Z^+\)and a ``value'' \(v(u) \in Z^+\) for each \(u \in U\), a size constraint \(B \in Z^+\), and a value goal \(K \in Z^+\), is there a subset \(U' \subseteq U\) such that \(\sum_{u \in U'} s(u) \leq B\) and \(\sum_{u \in U'} v(u)
\geq K\)?

This can be seen as a knapsack, which has a size limit for the objects, as in the picture below.



\psfig{figure=figures/f27-11.ps}

The goal is to pick a collection of objects that will fit in the knapsack and whose total value is at least K (K is input)

KNAPSACK = \(\{(U, s, v, B, K): \exists\) subset U' of U such that the sum of s values is at most B, and the sum of v values is at least K}

Knapsack Problem Variant
Applet courtesy of the tutOR project,
Department of Mathematics and Statistics
University of Melbourne


next up previous
Next: Up: Previous: