开发者

What is the problem name for Traveling salesman problem(TSP) without considering going back to starting point?

I would like to know what is the problem name for TSP w/o considering the way of going back to starting point and what is th开发者_如何学Goe algorithm to solve this.

I looked into Shortest path problem but that is not what I am looking for, the problem only find the shortest path from 2 assigned points. But what I am looking for is the problem which we give n points and inputting only 1 starting point. Then, find the shortest path traveling all points exactly once. (end point can be any point.)

I also looked into Hamiltonian path problem but it seems not to solve my defined problem but rather find whether there is Hamiltonian path or not.


I've found the answer to my question in this book. It is the same with Computer wiring problem which occurs repeatedly in the design of computers and other digital systems. The purpose is to minimize the total wire length. So, it is indeed a minimum length Hamiltonian path.

What the book suggests is to create a dummy point whose distances to every other points is 0. Therefore, the problem becomes an (n+1)-city symmetric TSP. After solving, just delete dummy point and then the minimum length Hamiltonian path is solved and we can get the TSP path without returning back the start point.


If I understand correctly, you want to find the shortest path (that starts from some vertex s) and goes through all the nodes in the graph without visiting the same node twice. A simpler problem, is the hamiltonian path problem. It asks, like you said, weather there exists such a path or not. Since that problem is NP-hard, and it's easier than your problem, solving your problem is at least NP-Hard. Well, that isn't true because your problem is not a decision problem. But what it does say is that we can almost be sure that there is no polynomial algorithm for your problem.

You can resort to approximation. There is a pretty cool approximation for the metric TSP here: http://en.wikipedia.org/wiki/Travelling_salesman_problem#Metric_TSP.


Using Asymmetric TSP Solver (if any)

If a start node has to be specified, as mentioned by @Vivek Payasi, you can build a typical TSP problem with weights otherwise normal except for the arcs that flow into the start node. Set their weights to 0.
This will produce an asymmetric travelling salesman problem(ATSP).

Now if you have an exact ATSP solver, this will look for the shortest cycle.
When it's done, remove the arc with weight 0 from the solution. This will look like a path you're looking for.

*All this relies on an efficient ATSP solver.

Using a plain Symmetric TSP Solver Instead

If you want to avoid using ATSP solver, refer to this answer: https://stackoverflow.com/a/59354134/7470152

The bottom line is: fix start node & an end node, add a dummy node whose arcs are connected to both node with weight 0 and then treat it like a normal TSP problem.
Repeat this for all (n-1) end nodes, and choose the shortest one.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜