文件名称:lab2
介绍说明--下载内容均来自于网络,请自行研究使用
1) Given a knapsack with the capacity M and some items with its weight and profit, to solve it using Greedy method and Search tree method.
2) Then compare this results with ones of 0/1 Knapsack problem based on the capacity of M.
3) These items could be given likes:
• M = 30
• (P1, P2, P3, P4, P5, P6)=(25,24,15,18,22,35)
• (W1, W2, W3, W4, W5, W6) = (12, 15, 10, 8, 9, 11)
4) These items could constructed by the random() function in some range, such as: (Wmin, Wmax) and (Pmin, Pmax) and the number of item could be more.
-1) Given a knapsack with the capacity M and some items with its weight and profit, to solve it using Greedy method and Search tree method.
2) Then compare this results with ones of 0/1 Knapsack problem based on the capacity of M.
3) These items could be given likes:
• M = 30
• (P1, P2, P3, P4, P5, P6)=(25,24,15,18,22,35)
• (W1, W2, W3, W4, W5, W6) = (12, 15, 10, 8, 9, 11)
4) These items could constructed by the random() function in some range, such as: (Wmin, Wmax) and (Pmin, Pmax) and the number of item could be more.
2) Then compare this results with ones of 0/1 Knapsack problem based on the capacity of M.
3) These items could be given likes:
• M = 30
• (P1, P2, P3, P4, P5, P6)=(25,24,15,18,22,35)
• (W1, W2, W3, W4, W5, W6) = (12, 15, 10, 8, 9, 11)
4) These items could constructed by the random() function in some range, such as: (Wmin, Wmax) and (Pmin, Pmax) and the number of item could be more.
-1) Given a knapsack with the capacity M and some items with its weight and profit, to solve it using Greedy method and Search tree method.
2) Then compare this results with ones of 0/1 Knapsack problem based on the capacity of M.
3) These items could be given likes:
• M = 30
• (P1, P2, P3, P4, P5, P6)=(25,24,15,18,22,35)
• (W1, W2, W3, W4, W5, W6) = (12, 15, 10, 8, 9, 11)
4) These items could constructed by the random() function in some range, such as: (Wmin, Wmax) and (Pmin, Pmax) and the number of item could be more.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
周宇梁 201430571102.doc
lab2.cpp