GreedyBag

所属分类:书籍源码
开发工具:Visual C++
文件大小:1KB
下载次数:10
上传日期:2008-11-25 09:08:10
上 传 者youknow2
说明:  贪心算法求背包问题,分别求出了三种标准1. 按效益值由大到小取物品. 2. 按重量值由小到大取物品 3.按比值pi/wi的值由大到小取物品 其中第3种是最优解
(Greedy algorithm for knapsack problem, respectively, obtained three standard 1. Press-effective value of descending and remove things. 2. By weight the value of items taken from small to big 3. According to the ratio of pi/wi check the value of descending The first of these three kinds of goods is the optimal solution)

文件列表:
GreedyBag.cpp (1613, 2008-11-17)

近期下载者

相关文件


收藏者