# How does FindShortestTour work?

How are FindShortestTour and the algorithms therewithin implemented internally?

Also: Can I access some form of incremental, in-progress result during evaluation? (e.g.: PCB autorouting)

There are many unrelated methods that FindShortestTour can use. Check the documentation undr Details please:

• Possible settings for the Method option include "AllTours", "CCA", "Greedy", "GreedyCycle", "IntegerLinearProgramming", "OrOpt", "OrZweig", "RemoveCrossings", "SpaceFillingCurve", "SimulatedAnnealing", and "TwoOpt".

• For small numbers of points in the Euclidean space, an "IntegerLinearProgramming" method is used, which is guaranteed to give the shortest tour.

I'd suggest to Google a bit more for the methods that you are interested in to learn how they work, and asking about one specific method. Some of these methods are completely unrelated.

The reason why so many methods exist is that no fast (polynomial time) method is known that is guaranteed to give the shortest tour. For this reason there was a lot of research on coming up with good approximations to the solutions: finding "short enough" tours, if not the shortest one.

If you need the specific details of one of the methods listed here, WRI support is usually pretty good in supplying the appropriate references.

Unfortunately I don't believe you can access a partial solution and continue the computation from there.

Here are my guesses on what the various methods do:

• AllTours This one probably enumerates all possible tours and is going to be unusably slow except for only a handful of points.

• SpaceFillingCurve This is quite interesting and I'm told it's used in practice. It's supposed to be fast but it'll only give an approximation. See the details.

• Greedy Start with a point and take the closest one as the next.

• SimulatedAnnealing is a general method for discrete optimization problems. You'll find a lot of accessible literature and tutorials on it (check Wikipedia for a start)

• "CCA" According to the docs, this is "Convex hull, Cheapest insertion and Angle selection". The name gives hints, but I'm not familiar with it.

• Strangely, the method part isn't there any more in 10.0's doc... – Silvia Nov 22 '14 at 19:06
• @Silvia Here's the link to the old docs. I wonder if the algorithms used by FindShortestTour have changed in v10. – Szabolcs Nov 22 '14 at 19:18
• Ah thank you! I just found that in v10.0 some of the methods are prompted in auto-completion. I should keep my v9.0 longer... – Silvia Nov 22 '14 at 19:31
• @Silvia: You can also use an invalid method and the error message will list the available methods. But yes, the documentation should describe them as did previously... maybe is not complete yet. – siritinga Mar 4 '15 at 20:14