摘要
贪心算法是解决问题的一种算法,因其解决问题时具有简单性、直观性和高效性而备受青睐。当待解决的问题具有最优子结构和贪心选择性质时,就可以考虑用贪心算法求解。0-1背包问题是计算机问题中一个普遍的问题,文章中详述了用贪心算法如何解决0-1背包问题。并得出用贪心算法求解此问题能得到最优解。
The greedy algorithm is the solution to the problem of an algorithm,because of its solving problems with simplicity,intuitive and the efficiency is favour.When un-solved problems that have the most YouZi structure and moment-the greedy-choice properties,can consider to use greedy algorithm.0-1 knapsack problems in computer problems is a common problem in the text,was described by the greedy algorithm to solve 0-1 knapsack problems.And obtained by greedy algorithm for solving this problem can obtain optimal solutions.
作者
陈曦
CHEN Xi(Jiujiang University,Jiujiang 332005,China)
出处
《电脑知识与技术(过刊)》
2010年第35期10061-10062,共2页
Computer Knowledge and Technology
关键词
0-1背包
贪心算法
动态规划
0-1 knapsack
greedy algorithm
dynamic programming