Algorithm A Traveling Salesman Problem
Transcript of Algorithm A Traveling Salesman Problem
8/14/2019 Algorithm A Traveling Salesman Problem
http://slidepdf.com/reader/full/algorithm-a-traveling-salesman-problem 1/13
An Algorithm for theTraveling SalesmanProblem
John D. C. Little, Katta G. Murty,Dura W. Sweeney, and Caroline
Karel
1963
Speaker: Huang Cheng-Kang
8/14/2019 Algorithm A Traveling Salesman Problem
http://slidepdf.com/reader/full/algorithm-a-traveling-salesman-problem 2/13
What’s TSP? A salesman, starting in one city, wishes
to visit each of n – 1 other cities once and
only once and return to the start.
In what order should he visit the cities tominimize the total distance traveled?
8/14/2019 Algorithm A Traveling Salesman Problem
http://slidepdf.com/reader/full/algorithm-a-traveling-salesman-problem 3/13
The Algorithm The basic method:
Branch – break up the set of all tours
Bound – calculate a lower bound
8/14/2019 Algorithm A Traveling Salesman Problem
http://slidepdf.com/reader/full/algorithm-a-traveling-salesman-problem 4/13
Notation (1/2) The entry in row i and column j of the
matrix is the cost for going from city i to
city j. Let
A tour, t , can be represented as a set of n
ordered city pairs, e.g.,
== )],([ jicC cost matrix
)],)(,(),)(,[( 113221 iiiiiiiit nnn−=
8/14/2019 Algorithm A Traveling Salesman Problem
http://slidepdf.com/reader/full/algorithm-a-traveling-salesman-problem 5/13
Notation (2/2) The cost of a tour, t, under a matrix, C, is the sum
of the matrix elements picked out by t and will bedenoted by :
Also, let
nodes of the tree;
a lower bound on the cost of the tours of X ,i.e., for t a tour of X ;
the cost of the best tour found so far.
)(t z
∑= ),()( ji
t z ),( jicint
=)( X w
=Y Y X ,,
)()( X wt z ≥
=0 z
8/14/2019 Algorithm A Traveling Salesman Problem
http://slidepdf.com/reader/full/algorithm-a-traveling-salesman-problem 6/13
Lower Bounds The useful concept in constructing
lower bounds will be that of reduction.
t = [(1,2) (2,3) (3,4) (4,1)] z = 3+6+6+9 = 24
Reduce
Reduce Concept:
at least one zero in each row and colu
z = 16+(3+8) = 24
8/14/2019 Algorithm A Traveling Salesman Problem
http://slidepdf.com/reader/full/algorithm-a-traveling-salesman-problem 7/13
Branching
all tours
ji, ji,
l k ,l k ,
8/14/2019 Algorithm A Traveling Salesman Problem
http://slidepdf.com/reader/full/algorithm-a-traveling-salesman-problem 8/13
4
1
0 1
6
6 the sum of the smallest
element in row i and column j
:
∞
8/14/2019 Algorithm A Traveling Salesman Problem
http://slidepdf.com/reader/full/algorithm-a-traveling-salesman-problem 9/13
∞
下限 = 170
8/14/2019 Algorithm A Traveling Salesman Problem
http://slidepdf.com/reader/full/algorithm-a-traveling-salesman-problem 10/13
all tours
3,43,4
16
1722
8/14/2019 Algorithm A Traveling Salesman Problem
http://slidepdf.com/reader/full/algorithm-a-traveling-salesman-problem 11/13
4
01
0 0∞
8/14/2019 Algorithm A Traveling Salesman Problem
http://slidepdf.com/reader/full/algorithm-a-traveling-salesman-problem 12/13
all tours
3,43,4
16
1722
2,12,11721
8/14/2019 Algorithm A Traveling Salesman Problem
http://slidepdf.com/reader/full/algorithm-a-traveling-salesman-problem 13/13
all tours
3,43,4
16
1722
2,12,11721
4,24,2
17
1,317
t = [(1,2) (2,3) (3,4) (4,1)] z = 3+6+6+9 = 24