摘要
主要对回溯法与分枝限界法进行了分析与研究。首先介绍了两种算法的基本概念,引出它们的基本解题思想与过程。然后运用0-1背包问题分别对回溯法,队列式分枝界限法和优先队列式分枝界限法进行详细的分析与说明。进一步总结算法的异同,研究发现回溯法解决问题时对内存空间的要求更低,而分枝限界法解决问题时需要的时间更短。
This paper mainly analyzes and studies the backtracking and the branch-and-bound method. First, the basic concepts of the two algorithms are introduced, and their basic idea and process of solving the problem are introduced. Then the 0-1 knapsack problem is used to analyze and explain the backtracking method, the queue branch boundary method and the priority queue branch and boundary method in detail. By further summarizing the similarities and differences of the algorithm, it is found that the memory space requirement is lower when the backtracking method solves the problem, while the branch-and-bound method takes shorter time to solve the problem.
出处
《电脑知识与技术》
2018年第4Z期44-46,共3页
Computer Knowledge and Technology
基金
国家自然科学基金项目(No:61362016)
海南省自然科学基金项目(No:617121)
海南省高等学校教育教学改革研究项目(No:HNJG2014-33)
海南省教育科学规划(No:QJY201710130
QJY13516015)
中央电教馆全国信息技术课题(No:166233260)
关键词
回溯法
分枝限界法
0-1背包问题
backtracking
branch and bound method
0-1 knapsack problem