Jump to content

Continuous knapsack problem

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Dohn joe (talk | contribs) at 17:12, 16 August 2012 (Dohn joe moved page Continuous-knapsack problem to Continuous knapsack problem over redirect: unable to find a single source that hyphenates). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

The continuous-knapsack problem, also known as the fractional-knapsack problem, is similar to the classic knapsack problem but in this problem fractions of an item can be put into the knapsack.

The problem is as following: Given a knapsack with capacity R and materials of different values per unit volume, find the most valuable combination of materials which fit in a knapsack of fixed volume R.

We are allowed to take fractions of materials. A greedy algorithm can find the optimum solution to the continuous-knapsack problem.

This problem can arise in situation that liquid material is used. Also in Lagrangian relaxation methods for facility location problems the problem will be reduced to instances of continuous knapsack problem. Unlike the knapsack problem, continuous-knapsack problem is easy to solve and is sometimes used as a simplified model for the classic knapsack problem.

Solution technique

Start with the material that is most valuable per unit volume and take as much as possible until you run out. If there is still space available take the second most valuable per unit volume item and take as much as possible. Continue this procedure until you run out of room in the knapsack.

This technique was also proposed by George Dantzig as a greedy algorithm to the classic knapsack problem.