文件名称:KnapsackProblem
介绍说明--下载内容均来自于网络,请自行研究使用
问题:已知有n种物品和一个可容纳M重量的背包,每种物品i的重量为wi。假定将物品i的一部分xi放入背包就会得到pixi的效益,这里,0≤xi≤1,pi>0。如果这些
物品重量的和大于M,要求所有选中要装入背包的物品总重
量不得超过M,而装入背包物品获得的总效益最大。-Question: are known to have n kinds of goods and M can hold the weight of a backpack, the weight of each item i is wi. I assume that part of the item into the knapsack xi get pixi benefits, where, 0 ≤ xi ≤ 1, pi> 0. If the weight of these items is greater than M, requires that all selected items to be loaded backpack should not exceed the total weight of M, while the total load backpack items were the biggest benefits.
物品重量的和大于M,要求所有选中要装入背包的物品总重
量不得超过M,而装入背包物品获得的总效益最大。-Question: are known to have n kinds of goods and M can hold the weight of a backpack, the weight of each item i is wi. I assume that part of the item into the knapsack xi get pixi benefits, where, 0 ≤ xi ≤ 1, pi> 0. If the weight of these items is greater than M, requires that all selected items to be loaded backpack should not exceed the total weight of M, while the total load backpack items were the biggest benefits.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
KnapsackProblem.java