An efficient algorithm for the traveling salesman problem

The traveling salesman problem is a combinatorial optimization problem. The problem is to find a shortest tour to visit a number of cities each once and return to the starting point. The statement of the traveling salesman problem is simple, yet its resolution is of a difficulty that sets it among the hardest problems in NP. A polynomial time algorithm for the traveling salesman problem will prove P equals NP.

I found a polynomial time algorithm for the asymmetric traveling salesman problem with distances a and b (a, b are two positive integers). In the asymmetric case, the distance from one vertex to another does not have to be the same in the other direction; and with the restriction to two distances, every adjacent vertex is either distant by a or b. The traveling salesman problem remains NP complete in this case. The algorithm that I found finds an optimal tour and the amount of time required in the computation increases as n, the number of vertices, raised to the power of two. Consequently, large instances of the problem can be solved in a short time. Moreover, the algorithm, not only, finds an optimal route, it can find all optimal routes in a systematic way.

A more restricted case of the traveling salesman problem is the Hamiltonian cycle problem. The Hamiltonian cycle problem is to find a tour of an undirected or directed graph. An instance of the Hamiltonian cycle problem can be easily transformed to an instance of the traveling salesman with distances a and b. The algorithm that I found can be used to solve directly the Hamiltonian cycle problem. The corresponding weighted graph is provided as input. This yields a big improvement in resource usage. The required amount of time is reduced and is bounded by O(|N|+|A|), where |N| is the number of nodes and |A| is the number of arcs.

Unknown's avatar

Author: Fouad El Khamlichi

Computer Science

Leave a comment