What exactly makes the travelling salesman problem hard, given that checking a route is trivial?
The problem is easy to state: visit every city once, return to the start, minimise total distance. Evaluating any particular route takes almost no work — add up the distances.
So the difficulty is entirely in the search rather than the evaluation, which I understand in principle. What I do not have is an intuition for why the search resists cleverness. Obvious heuristics like always going to the nearest unvisited city are known to be bad, and I would like to understand what specifically goes wrong rather than just being told it fails.
What is the shape of the difficulty here?
@algo_arda · last wk.
The clearest way to see what goes wrong with the nearest-city heuristic is that it is forced to pay for its own convenience at the end.
At every step it takes the cheapest available hop. That is locally sensible and it leaves behind a set of cities that are far from each other and far from where you now are — precisely the ones it kept skipping because something closer was available. The final legs of the tour are then enormous, and they cost more than everything the greedy choices saved.
You can construct arrangements where this is arbitrarily bad, and the constructions are not contrived: a line of closely spaced cities with one outlier does it. The greedy route runs happily down the line and then has to cross the whole map twice.
The general principle is that the cost of a decision in this problem is not visible when the decision is made. Any method that commits early without accounting for what it leaves behind can be defeated.
Reply
Report