资 源 简 介
实现背包问题的三种贪心策略,背包问题描述如下: 已知
背包容量M=120
物品种类数n=10
各种物品的总效益pi(i=1,2,………10) : 50,60,70,80,90,80,70,60,50,40
各种物品的总重量wi(i=1,2………10) : 17,30,25,41,80,70,64,56,47,38
求: 各种物品所取重量占其总重量的比例xi(i=1,2,…..10),满足0<=xi<=1,
且
且使得
达到最大值.
-Knapsack problem to achieve the three greedy strategy, knapsack problem described as follows: It is known knapsack capacity M = 120 the number of n = 10 categories of items of various items of the total benefits pi (i = 1,2, ... ... ... 10): 50,60 , 70,80,90,80,70,60,50,40 total weight of all kinds of items wi (i = 1,2 ... ... ... 10): 17,30,25,41,80,70,64,56 , 47,38 seeking: all kinds of items by taking the ratio of the weight of its total weight of xi (i = 1,2, ... .. 10), satisfy 0 < = xi < = 1, and and making the maximum.