动态编程和分支绑定有什么区别?

时间:2013-05-29 13:10:40

标签: dynamic-programming branch-and-bound

我只知道通过分支和绑定,可以减少程序以获得解决方案,但这只会对有解决方案空间树的问题有所帮助....

2 个答案:

答案 0 :(得分:4)

动态编程

动态编程(通常称为DP)是解决特定类问题的一种非常强大的技术。它要求非常优雅的方法和简单的思维,编码部分非常容易。
这个想法非常简单,如果你已经解决了给定输入的问题,那么保存结果以备将来参考,以避免再次解决同样的问题。不久'记住你的过去'

如果给定的问题可以分解为较小的子问题,并且这些较小的子问题又被分成仍然较小的子问题,并且在这个过程中,如果你观察到一些过度使用的子问题,那么它对DP来说是一个很大的暗示。此外,子问题的最优解决方案有助于给定问题的最优解(称为最优子结构属性)

有两种方法可以做到这一点。

1.) Top-Down : Start solving the given problem by breaking it down. If you see that the problem has been solved already, then just return the saved answer. If it has not been solved, solve it and save the answer. This is usually easy to think of and very intuitive. This is referred to as Memoization.
2.) Bottom-Up : Analyze the problem and see the order in which the sub-problems are solved and start solving from the trivial subproblem, up towards the given problem. In this process, it is guaranteed that the subproblems are solved before solving the problem. This is referred to as Dynamic Programming.

分支和界限

  • 分支定界算法由通过状态空间搜索的候选解决方案的系统枚举组成:候选解决方案集被认为是形成一个在根处全套的root树。
  • 该算法探索此树的分支,它代表解决方案集的子集。在枚举分支的候选解之前,将针对最优解上的上下估计边界检查分支,并且如果它不能产生比迄今为止发现的最佳解决方案更好的解决方案,则丢弃该分支。算法。

有关分支和绑定的更多信息请参阅以下链接:

http://www.cs.umsl.edu/~sanjiv/classes/cs5130/lectures/bb.pdf

答案 1 :(得分:0)

动态编程需要递归结构(例如,CRLS中的最佳子结构)。也就是说,在给定状态下,可以基于部分解来表征最优决策。

分支和绑定是更通用的,用于通过解空间的隐式枚举来解决更多难题。