How to compute optimal paths for traveling salesman bitonic tour?

后端 未结 2 756
别那么骄傲
别那么骄傲 2020-12-28 18:54

UPDATED

After more reading, the solution can be given with the following recurrence relation:

(a) When i = 1 and j = 2, l(i; j) = di         


        
2条回答
  •  囚心锁ツ
    2020-12-28 19:19

    Okay, the key notions in a dynamic programming solution are:

    • you pre-compute smaller problems
    • you have a rule to let you combine smaller problems to find solutions for bigger problems
    • you have a known property of the problems that let's you prove the solution is really optimal under some measure of optimality. (In this case, shortest.)

    The essential property of a bitonic tour is that a vertical line in the coordinate system crosses a side of the closed polygon at most twice. So, what is a bitonic tour of exactly two points? Clearly, any two points form a (degenerate) bitonic tour. Three points have two bitonic tours ("clockwise" and "counterclockwise").

    Now, how can you pre-compute the various smaller bitonic tours and combine them until you have all points included and still have a bitonic tour?


    Okay, you're on the righ track with your update. But now, in a dynamic programming solution, what you do with work it bottom-up: pre-compute and memoize (not "memorize") the optimal subproblems.

提交回复
热议问题