Travelling Salesman Problem
Travelling Salesman Problem
2
The Traveling
Salesman Problem
Let us return to the question of finding a
cheapest possible cycle through all the
given towns: We have n towns (points) in
the plane, and for any two of them we are
given the “cost” of connecting them directly.
We have to find a cycle with these nodes
such that the cost of the cycle (the sum of
the costs of its edges) is as small as possible.
This problem is one of the most
important in the area of combinatorial
optimization, the field dealing with
finding the best possible design in
various combinatorial situations, like
finding the optimal tree discussed in
the previous section.
Traveling Salesman Problem
Its name comes from the version of the
problem where a traveling salesman has to
visit all towns in a region and then return to
his home, and of course, he wants to
minimize his travel costs. It is clear that
mathematically, this is the same problem. It
is easy to imagine that one and the same
mathematical problem appears in
connection with designing optimal delivery
routes for mail, optimal routes for garbage
collection, etc.
The following important question leads to the
same mathematical problem, except on an
entirely different scale. A machine has to drill a
number of holes in a printed circuit board (this
number could be in the thousands),and then
return to the starting point. In this case, the
important quantity is the time it takes to move the
drilling head from one hole to the next, since the
total time a given board has to spend on the
machine determines the number of boards that
can be processed in a day. So if we take the time
needed to move the head from one hole to
another as the “cost” of this edge, we need to find
a cycle with the holes as nodes, and with
minimum cost.
The Traveling Salesman Problem is closely
related to Hamiltonian cycles. First of all, a
traveling salesman tour is just a Hamiltonian
cycle in the complete graph on the given set
of nodes. But there is a more interesting
connection: The problem of whether a
given graph has a Hamiltonian cycle can be
reduced to the Traveling Salesman Problem.
Let G be a graph with n nodes. We define the
“distance” of two nodes as follows: adjacent
nodes have distance 1; nonadjacent nodes have
distance 2.