Travelling Salesman Problem

The travelling salesman problem (TSP) asks the following question:

"Given a list of cities and the distances between each pair of cities, what is the shortest possible route that visits each city and returns to the origin city?"

It is an NP-hard problem in combinatorial optimization, important in operations research and theoretical computer science.

Instructions:
  • Click on the map to add a new route point.
  • Click on an existing point to remove it from the route.
  • Click the reset button to restore the route.
Algorithm in use: {{ max_reached ? '2-opt heuristic' : 'linear programming' }}