 Some formulations of this problem rescale the variables "xi" to be in the range from 0 to 1.In this case the capacity constraint becomes
and the goal is to maximize the total benefit

The continuous knapsack problem may be solved by a greedy algorithm, first published in 1957 by George Dantzig, that considers the materials in sorted order by their values per unit weight.For each material, the amount "xi" is chosen to be as large as possible