摘要
结合生活中顾客中奖后奖品的选择问题,给出0-1背包问题的数学模型,介绍基于0-1背包问题的的贪婪算法,使用这种算法解决奖品选择问题,最后在viusalc++6.0下编程实现。
Combining of problem that a buyer how to choose award after winning a prize in a lottery, 0-1 knapsack problem’s mathematical model is proposed in this paper. And then simply introduces greedy algorithm based on the 0-1 knapsack problem.This algorithm is used to solve the problem that how to choose award,and is programmed in viusal c++6.0 at last.
出处
《计算机与数字工程》
2007年第6期32-33,136,共3页
Computer & Digital Engineering
关键词
0—1背包问题
贪婪算法
贪婪准则
0-1 knapsack problem,greedy algorithm,greedy criterion