Euclidean Case of the TSP for a given problem.

196 Views Asked by At

My textbooks states that the "Euclidean Plane" case of the Traveling Salesperson Problem is a special case of the TSP, when all the points lay in the euclidean plane and the distance between these points is satisfied by the "Triangle Inequality" $$d_i,_j≤d_i,_k+d_k,_j$$

Now the book says that to find the solution for this problem you need to make a spanning tree with the graph. For example, where the red arrows indicate the suggested path for this graph.

enter image description here

Now I'm confused as to how to turn this into the following graph, which solves the problem.

enter image description here

Also I can't seem to find any videos or web pages that discuss this approach to solve the TSP.

A classmate said that it's basically when you have no way of going back to your starting point without going through a point more than once, you basically make connections between $2$ points yourself to find the optimal route.

2

There are 2 best solutions below

1
On BEST ANSWER

If you double every edge of the MST and traverse it, you will get an eulerian path, which visits some cities more than once.

Since at the TSP you only want to visit every city exactly once, you walk along your path the following way.

Choose a random city and start following the path. If you would come to a city, which you already visited (and you havent visited all cities), 'skip' it and go further on the path. This skipping will result in a shorter way, because of the triangle equation.

At your example:
You start at 1. You go to 2, now the path would lead you to 1, but since you already were there and didnt visit all cities so far, you go further 3 and so on...

1
On

Once you build a spanning tree, traverse the eulerian path using depth first search. That will give you the path as shown in your figure. For visual examples of DFS (depth first) traversal on the eulerian path, I would suggest searching for examples on Christofides algorithm.