The traveling salesman problem

  1. The traveling salesman problem consists of solving the order in which a person must visit each and every one of the defined cities only once, with the aim of minimizing the distance traveled. The problem definition includes a matrix of distances between the cities.



  Frederick Hagerstown Germantown Shepherdstown
Hagerstown 25.1      
Germantown 21.9 44.9    
Shepherdstown 31.7 18 50.7  
Washington D.C 45.5 68.6 27.7 74.4


  1. Create a code in any programming language and get the output to implement your solution.
Powered by WordPress