Knapsack problem/Continuous: Difference between revisions

m
language corrections
(→‎{{header|Python}}: Greedy is optimal solution?)
m (language corrections)
Line 3:
See also: [[Knapsack problem]] and [http://en.wikipedia.org/wiki/Continuous_knapsack_problem Wikipedia]
 
A robber burgles in a butcher`'s shop, wherwhere he can select from some items. He knows the weights and prices of each items. Because he has a knapsack with 15 kg maximal capacity, he wantwants to select from the items, such that he would have thehis profit maximisedmaximized. He may cut the items. Of course; the item has a reduced price after cutting. Thethat reducedis itemproportional hasto proportionalthe original price withby originalthe priceratio of masses. That means: a half of an item has a half the price of the original.
 
This is the item list in the butcher`'s:
 
{| style="text-align: left; width: 80%;" border="4" cellpadding="2" cellspacing="2"
Anonymous user