New in Wolfram Mathematica 6: Combinatorial Optimization
| ◄ previous | next ► |

Solve Traveling Salesman Problems

*Mathematica*6 has efficient algorithms for finding the shortest paths that visit a sequence of points.

In[1]:= | With[{p = RandomReal[10, {100, 2}]}, Graphics[{Line[p[[Last[FindShortestTour[p]]]]], PointSize[Large], Red, Point[p]}]] |

Out[1]= |