文件名称:1108
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:683byte
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
在0 / 1背包问题中,需对容量为c 的背包进行装载。从n 个物品中选取装入背包的物品,每件物品i 的重量为wi ,价值为pi 。对于可行的背包装载,背包中物品的总重量不能超过背包的容量,最佳装载是指所装入的物品价值最高,即n ?i=1pi xi 取得最大值。约束条件为n ?i =1wi xi≤c 和xi?[ 0 , 1 ] [ 1≤i≤n]。-At 0/1 knapsack problem, there is a need for a capacity of c for the loaded backpack. N items from a backpack loaded, select the items, each item i the weight of wi, the value of pi. Feasible for loading backpack, backpack items total weight of the backpack should not exceed capacity, the best means by loading articles into the highest value, that is, n? I = 1pi xi to obtain the maximum value. Constraint condition for n? I = 1wi xi ≤ c and xi? [0, 1] [1 ≤ i ≤ n].
(系统自动生成,下载前可以参看下载内容)
下载文件列表
1108 0-1背包问题.cpp
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.