Professional Documents
Culture Documents
00
Printed in Great Britain. All rights reserved Copyright 0 1990 Pergamon Press plc
B. R. FEIRING
Department of Information Systems and Decision Sciences, College of Business Administration,
University of South Florida, Tampa, FL 33620, U.S.A.
Abstract-Simple procedures for the traveling salesman problem are presented. The procedures are
developed from a new solution generation scheme, which successively exchanges the rows and columns
of the matrix of distances. At each stage of the computation, the cost and the tour are uniquely determined.
1. INTRODUCTION
The traveling salesman problem (TSP) states that given a set of cities, find a minimum-cost tour,
provided that the cost of a trip between any pair of cities is known. On this tour, a salesman must
visit every city exactly once, and return to the starting city at the end so that his track of the tour
forms one circuit.
The TSP is one of the classic and standard problems in the fields of operations research and
management science [l-3]. It has a variety of applications in practice, since it is a prototype of “hard
combinatorial” optimization. Applications include circuit layout, vehicle routing, production
management and job sequencing [ 1,4].
The TSP is a problem that is easy to state but difficult to solve, although the solution to the
problem always exists. (It is one of the infamous N-P hard or N-P complete problems depending
on whether the problem is symmetric or asymmetric [5-71.)
For the n-city TSP, there are exactly (n - l)! possible tours to be examined and one of these
will provide the cheapest cost. The most obvious approach to obtain a solution is to generate all
(n - l)! feasible tours and select the one with the lowest cost. Consider a four-city problem.
Suppose a salesman lives in New York (N) and is required to visit Chicago (C), Minneapolis (M)
and Boston (B). He takes an airline and the fare between any two cities is known. There are only
six (3!) possible round trips for him:
N+C+M+B+N,
N-+C-+B+M+N,
N+B+C+M+N,
N+B+M+C+N,
N+M+B+C+N
or
N+M+C+B+N.
It is only necessary to calculate the total fare of each round trip and choose the trip with the
cheapest cost.
The approach becomes computationally infeasible as the number of cities increases, even by just
one or two. As seen in Table 1, the number of feasible tours grows very rapidly as the number
of cities increases. Therefore, the combinatorial approach of generating permutations and
calculating the corresponding costs fail to solve large-scale TSPs.
The TSP is equivalent to a general zero-one integer programming problem with subtour
elimination constraints [8]. The difficulties of this approach are: (1) the number of constraints which
eliminate the subtours grows very rapidly; and (2) the formulation of the constraints is difficult.
67
68 B. R. FEIRING
Table I
No. of cities TOWS
4 6
5 24
6 120
I 720
8 5040
9 40,320
IO 362,880
15 8.7lE + IO
20 1.2lE+ I7
30 8.8E + 30
40 2.03E + 46
50 2.03E + 46
100 6.08E + 62
A k-city tour, where k is less than the size of the problem, is called a subtour. Since a
salesman is required to visit every city once and only once, no k-city tours with k < n can be
allowed.
The solution generation scheme described in this paper does not permit subtours. This provides
several advantages that will be described subsequently. All computations were performed on the
Apple II Plus microcomputer with 48K.
2. NOTATION
Generally, in graph-theoretic terms, the TSP is that of finding a minimum weight Hamiltonian
cycle (or circuit) in a weighted, undirected graph G = (V, E), where V is the set of nodes (cities)
and E is the set of arcs. For simplicity, the cities are denoted by the integers 1,2,3, . . . , n - 1, n
(n-city TSP), and the following notation is introduced:
G = (V, E) is a directed, weighted graph,
I’={1,2,3 ,..., n - l,n} is a set of n cities,
E = {(i,j): i E V,j E V} is the set of all possible trips between each pair of cities,
W = [w(i, j): (i, j) E E] is the n x n cost (weight) matrix with elements w(i, j),
Tk = (0,, ~2,033 . . . , vk) is a k-city tour, where v, is the jth node, k < n, where vi # Uj,V i, j,
and
W’,) = C(v,, 02, ~3,. . . 3 ok)
Since a feasible tour for the TSP is a permutation of the elements of V [a cyclic permutation
of the order n - 1, i.e. (n - l)! possible feasible tours], and since the solution to this problem always
exists, the combinatorial approaches to obtain the optimal solution may be classified into three
types: (1) tour generations, (a) TA, Tl, Ty . . . (tour-to-tour improvement), (b) T,, T2, T,, . . . , T,
(tour-building); and (2) the subtour elimination method using mixed integer programming of the
assignment problem with subtour elimination constraints [9].
Approach (la) gives rather efficient algorithms which can handle large-scale TSPs but does not
guarantee the optimal solution since these algorithms are an approximation to total enumeration.
Much research has been dedicated to finding a way to modify and measure closeness [l, 10-141,
perhaps the most important been Ref. [15]. Approach (lb) is based on the exhaustive search
technique, using typical algorithms [ 10, 16, 171and dynamic programming (DP) [ 161.The algorithm
of Little [16], 1963, is still considered by several researchers to be the best available. DP, when
applied to the TSP, does not reduce the computational time as it frequently does in other
applications. Furthermore, even for small problems, the amount of the storage is a bottleneck [ 181.
Feasible solutions to the n-city TSP 69
The last approach (2) has difficulties similar to DP, since the number of constraints and variables
for the formulation of the subtour elimination are enormous and the complexity of the formulation
involves enormous computational effort.
The cost of a tour is always determined by the summation of the superdiagonal elements, i.e.
the elements immediately above the main diagonal of the weight matrix, and to decrease the cost
the rows and the columns of the weight matrix are successively permuted. [It should be noted that
~(1, n) is assumed to be on the superdiagonal for convenience.]
The following definitions are required:
Then the cost of the tour T (I, 2,3, . . . , n - 1, n) is calculated by B(P), where P is
(n, 1,2,3, . . . , n - 1). It is clear that the number of permutations performed with the weight matrix
is (n - l)!.
Using B(P), the sequences of the modification can be expressed as
= B(T,,).
Take the ith column and the jth column to be interchanged to obtain the new cost. Let the
original tour, T,, and the modified tour, T;, be
and
The algorithm computes the lower bound of the branch-and-bound method. At any city, the
algorithm gives the partial cost of the tour and the entire cost of the trip.
7. SUMMARY
REFERENCES
1. G. B. Dantzig, D. R. Fulkerson and S. M. Johnson, Solutions of a large-scale traveling salesman problem. Ops Res.
2, 393410 (1954).
2. M. M. Flood, The traveling salesman problem. Ops Res. 4, 61-75 (1956).
3. C. Gary, Graphs as Mathematical Models. Prindle, Webber & Schmidt, (1978).
4. M. Rothkopf, The traveling salesman problem: on the reduction of certain large problems to smaller ones. Ops Res.
(in press).
5. S. S. Anderson, Graphs Theory and Finite Combinations. Markham, Chicago, III. (1970).
6. B. Carre, Graphs and Networks. Clarendon Press, Oxford (1979).
7. M. C. Golumbic, Algorithmic Graph Theory and Perfect Graphs, Academic Press, New York (1980).
8. G. B. Dantzig, D. R. Fulkerson and S. M. Johnson, On a linear-programming, combinatorial approach to the traveling
salesman problem. Ops Res. 7, 5866 (1959).
9. M. Bellmore and G. L. Nemhauser, The traveling salesman problem: a survey. Ops Res. 16, 5388558 (1968).
10. G. A. Croes, A method for solving the traveling salesman problem. Ops Res. 6, 791-812 (1958).
1I. H. Crowder and M. W. Padberg, Solving large-scale symmetric traveling salesman problems to optimality. Mgmt Sci.
26(5), 495-508 (1980).
12. M. F. Decay, Selection of an initial solution for the traveling salesman problem. Ops Res. 8, 133-134 (1960).
13. M. L. Fisher, G. L. Nemhauser and L. A. Woolsey, An analysis of approximations for finding a maximum weight
Hamiltonian. Ops Res. 27, 799-809 (1979).
14. D. J. Rozenkrantz, R. E. Stearns and P. M. Lewis, An analysis of several heuristics for the traveling salesman problem.
SIAM JI Compur. 6, 563-581 (1977).
15. S. Lin and B. W. Kernighan, An effective heuristic algorithm for the traveling salesman problem. Ops Res. 21,498-516
(1973).
16. E. L. Lawler and D. E. Wood, Branch-and-bound method: a survey. Ops Res. 14, 699-719 (1966).
17. J. D. C. Little, D. W. Sweeny and C. Karel, An algorithm for the traveling salesman problem. Ops Res. 11, 972-981
(1963).
18. M. Held and R. M. Karp, The traveling salesman problem and minimum spanning trees. Ops Res. 18,1138-l 162 (1970).