Solve the travelling salesman problem for every 2D or 3D problem, and calculate the shortest distance between a list of points.