[Math] Solution to Travelling Salesman Problem

algorithmsgraph theory

I was wondering if this is a solution to the TSP problem.
For a set of $n$ points on the plane, the number of 'roads' in the plane such that there is a road between every point is $n\Bbb C 2$ = $n^2-n \over 2$

The total number of possible paths which connect all the points together is $n!$.

The Algorithm is as such:

*Assign weights(the length of the roads) to each road.

*Calculate the minimum spanning Tree for the graph (Algorithms exist to calculate in linear time.)

*Between the two end(free) vertices of the MST take the road.

*The cycle formed thus is the solution.

Best Answer

The weights of the edges need not be their lengths. In the TSP they are just costs - perhaps the salesman needs to take air fare into account.

Counterexample: suppose the cities are at the vertices of an equilateral triangle together with one city at the center. Then suppose the cost of traveling from the center to each of the three vertices is $0$ (or some small number if you like) while the cost of traveling along an edge is $1$. Then the MST is the graph consisting of the three spokes from the center.

The cheapest way for the salesman to visit all the cities is to go back and forth to the center. If she must travel in a cycle, use two edges of the triangle and two spokes. Neither of these is built from the spanning tree using your algorithm.