摘要
0-1背包问题和背包问题是一类经典的NP困难问题。采用动态规划法和贪心法对该问题进行求解,分析和比较这两种算法在求解同一问题时的差异。
0-1 knapsack problems and knapsack problems are a classical NP hard problems. This paper adopts dynamic programming method and greedy method to solve such problems, then analyzes and compares the differences of two algorithms.
出处
《软件导刊》
2007年第3期111-113,共3页
Software Guide
关键词
背包问题
0-1背包问题
动态规划法
贪心法
0-1 knapsack problems
knapsack problems
dynamic programming method
greedy method