Re:Show HN: Find the fastest route via a place
by Derander on Tuesday September 03, 2013 @09:57PM
(#6325112)
One thing to note about this specific problem: this is an example of the traveling salesman problem with a metric. This makes efficient (good) approximation algorithms a possibility.
Many NP-hard approximation algorithms classes teach a 1.5 approx known as the Christofides algorithm. This algorithm is guaranteed to provide an approximate solution that is no worse than 1.5 times the optimal total distance, and often much better.
Re:Show HN: Find the fastest route via a place
by pyk on Wednesday September 04, 2013 @01:44AM
(#6325798)
For the ambitious, some of the leading code for solving the TSP to optimality is Concorde (at best it has optimally solved an 85,900 "city" instance):
http://www.math.uwaterloo.ca/tsp/concorde/downloads/download...
or solve/run Concorde on Argonne National Laboratory's server here:
http://neos.mcs.anl.gov/neos/solvers/co:concorde/TSP.html
Disclaimer: free for academic use
AKA Traveling salesman problem? Even with a few hundred cities that would be difficult to find the optimal solution, let alone thousands. You could find a decent to even good solution with other algorithms, though