I understand that DP gives a better performance for many NP complete problems like TSP. Though the space needed is large, it reduces the complexity well.

But I couldn't understand the efficiency of branch and bound and backtracking as compared to an brute force search.

In worst case whether brute force equals b&b or backtracking ?

有帮助吗?

解决方案

With exhaustive search, you would compute all N! possible routes between the nodes. With backtracking, you might compute a route visiting half the nodes, notice that it is already more expensive than the best route found so far, and stop investigating that partial route at that point. By doing so, you have skipped computing all of the routes that are produced by completing that partial route, thus saving time over exhaustive search, which would have continued to check them all.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top