tsp.txt The first line indicates the number of cities. Each city is a point in the plane, and each subsequent line indicates the x-coordinates and y-coordinates of a single city.
The distance between two cities is defined as the Euclidean distance --- that is, two cities at locations (x,y) and (z,w) have distance ((x − z)^2 + (y − w)^2)^(1 / 2) between them. The code implements a dynamic programming approach to find the optimal solution to this problem.