BUILT-IN MATHEMATICA SYMBOL

# FindShortestTour

FindShortestTour[{e1, e2, ...}]
attempts to find an ordering of the that minimizes the total distance on a tour that visits all the once.

## Details and OptionsDetails and Options

• FindShortestTour returns a list of the form , where is the length of the tour found, and is the ordering.
• The following options can be given:
•  DistanceFunction the distance function to apply to pairs of objects Method the method to use
• The can be numbers or lists of numbers, in which case the default distance function used is EuclideanDistance.
• If the are strings, the default distance function used is EditDistance.
• For small numbers of points, FindShortestTour will usually find the shortest possible tour. For larger numbers of points, it will normally find a tour whose length is at least close to the minimum.
• Possible settings for the Method option include , , , , , , , , , , and .
• For small numbers of points in the Euclidean space, an method is used, which is guaranteed to give the shortest tour.

## ExamplesExamplesopen allclose all

### Basic Examples (2)Basic Examples (2)

Find the length and ordering of the shortest tour through six points in the plane:

 Out[1]=

Specify a list of points:

 Out[2]=

Order the points according to the tour found:

 Out[3]=

Plot the tour:

 Out[4]=