0

It is my first post in this site, so please excuse if something is not clearly explained (and please, provide feedback to improve wording if necessary!).

I have been thinking on an algorithm to approach the Travelling Salesman Problem (TSP), and I have designed the following algorithm:

Suppose we have a set of points.

SET UP

  1. Assign coordinates (x,y) to each of the points in the set.
  2. Join all the points in the set with each other. This action will generate a set of segments, and a set of intersections (where the segments cross).
  3. Take the point with greatest (or lowest) abscissa or ordinate as starting point.

ITERATIVE ALGORITHM

  1. Evaluate which segments from the current point to the points left (the ones that are not already included in the solution set) have less intersections with other segments. If there is only one optimal solution, go to step 7. If there are many, go to step 5.
  2. Select the shortest segments. If there is only one optimal solution, go to step 7. If there is more than one, go to step 6.
  3. Select one of the segments randomly. Go to step 7.
  4. Pick the point joined (to the starting point in 4 through the selected segment), and add it to the solution set. Check if there are points not included in the solution set. If there are still points left, set the last point joined as starting point, and go again to step 4. If there are no points left, end the algorithm.

I want to check (i) how well works the algorithm in terms of (a) computation time and (ii) optimality of the solution obtained. I have tried to make a program in VBA, but I have not been able and I am sure there are better programming environments to implement and evaluate the algorithm. Any help you could provide (i) evaluating the algorithm, and/or (ii) advising me on how to implement and evaluate it would be really appreciated.

Thanks in advance!

0 Answers0