The Traveling Salesman Problem: A Neural Network Perspective
The Traveling Salesman Problem: A Neural Network Perspective
The Traveling Salesman Problem: A Neural Network Perspective
Jean-Yves Potvin
Introduction
Exact Algorithms
Min Σ iΣ j d ij x ij
subject to:
Σj x ij = 1 , i=1,...,N
Σi x ij = 1 , j=1,...,N
(x ij) X
x ij = 0 or 1 ,
where d ij is the distance between vertices i and j and the x ij 's are the
decision variables: x ij is set to 1 when arc (i,j) is included in the tour,
and 0 otherwise. (x ij ) X denotes the set of s u b t o u r - b r e a k i n g
constraints that restrict the feasible solutions to those consisting of a
single tour.
(a) (b)
Fig. 1. (a) Solving the TSP, (b) Solving the assignment problem.
Heuristic Algorithms
i j i j
l k l k
The reader should also note that general surveys on the use of
neural networks in combinatorial optimization may be found i n
[22, 70]. An introductory paper about the impacts of neurocomputing
on operations research may be found in [29].
case, the first unit that turns on sends a positive excitatory signal t o
the other unit through that connection to facilitate its activation.
Montreal
(a) TSP problem
Toronto
Boston
NY
d
NY,LA
LA
1 2 3 4 5
Boston
Montreal
LA
T LA5,NY5
NY
Toronto
where U i, I i and V i are the input, input bias, and activation level of
unit i, respectively. The activation level of unit i is a function of i t s
input, namely
used to modify the slope of the function. In Figure 4, for example, the
U o value is lower for curve (2) than for curve (1).
g(Ui)
g(Ui) = 1
(2)
(1)
(1)
(2)
g(Ui) = 0
0 Ui
Ui = Σ j T ijV j + Ii .
13
E= A/2 ( Σ X Σ i Σ j i VXiVXj)
+ B/2 (Σ i Σ X Σ Y X VXiVYi)
+ C/2 (Σ X Σ i V Xi-N )2
+ D/2 (Σ X Σ Y X Σ i d XY V Xi (V Yi+1 + VYi-1)) , (1.5)
IXi = + CNe ,
(a) Solving a TSP with N cities requires O(N2) units and O(N4)
connections.
( b ) The optimization problem is not solved in a problem space of
O(N!), but in a space of O(2 N 2) where many configurations
correspond to infeasible solutions.
(c) Each valid tour is represented 2N times in the Hopfield-Tank
model because any one of the N cities can be chosen as t h e
starting city, and the two orientations of the tour a r e
equivalent for a symmetric problem. This phenomenon is
referred to as "2N-degeneracy" in neural network terminology.
17
(a) In [81, 97, 98] the activation levels of the units are normalized
so that Σ i VXi =1 for all cities X. The introduction of these additional
constraints is only one aspect of the problem-solving methodology,
which is closely related to the simulated annealing heuristic.
Accordingly, the full discussion is deferred to Section 2.4, w h e r e
simulated annealing is introduced.
e -E(s')/T
P T (s') = _________ . (2.1)
Σ s e -E(s)/T
Here, E(s') is the energy of configuration s', and the denominator is
the summation over all configurations. According to that probability,
configurations of high energy are very likely to be observed at high
temperatures and much less likely to be observed at low
temperatures. The inverse is true for low energy configurations.
Hence, by gradually reducing the temperature parameter T and b y
allowing the system to reach equilibrium at each temperature, t h e
system is expected to ultimately settle down at a configuration of low
energy.
23
(c) The research described in [81, 97, 98], which is derived from t h e
mean-field theory, is probably the most important contribution t o
the literature relating to the Hopfield-Tank model since its original
description in [51]. The term "mean-field" refers to the fact that t h e
model computes the mean activation levels of the stochastic b i n a r y
units of a Boltzmann machine.
E = dmax /2 ( Σ i Σ X ΣY X VXiVYi)
4. Compute
e U Xi /T
V Xi = _________ , i=1,...,N .
Σ j e U Xj/T
5. Evaluate the energy E.
e U Xi /T
V Xi = _________ , (2.3)
Σ j e U Xj/T
where U Xi = - dE/dVXi (see Step 3 of the algorithm).
As noted in [98], all the activation levels are the same at high
temperatures, that is, VXi → 1/N when T → . As the t e m p e r a t u r e
parameter is lowered, each city gradually settles into a single
position, because such configurations correspond to low e n e r g y
states. In addition, the model also prevents two cities from occupying
the same position, because a penalty of d m a x /2 is incurred in t h e
energy function. If the parameter d m a x is set to a value slightly
larger than twice the largest distance between any two cities, t h e
network can find a configuration with lower energy simply b y
moving one of the two cities into the empty position. Feasible t o u r s
are thus guaranteed through the combined actions of the new e n e r g y
function and the additional constraints imposed on the activation
levels V Xi (once again, for a sufficiently small parameter value T).
(e) In [8, 26, 66], random noise is introduced into the activation
level of the units in order to escape from local minima. The r a n d o m
28
noise follows a normal distribution with mean zero, and its intensity
is modulated by a temperature parameter which is gradually
reduced, as in the simulated annealing heuristic.
In this new energy function, the first two terms penalize cities t h a t
do not have exactly two neighbors.
i l
j k
Cuykendall 165 NA NA
9.409-9.933 a
and Reese
(1989)
Peterson and 200 NA SA NA
Soderberg
(1989)
Xu and 100 592.3 TO 570.2 c
Tsai 150 LK
9.529 b 9.616 d
(1991)
a Computation time of 1 to 10 hours on an Apollo DN4000
b Best of 5 runs with post-optimization by Lin-Kernighan
c Best of 25 runs starting from randomly generated tours
d Best of 30 runs starting from randomly generated tours
LK Lin-Kernighan
31
MT Manual Tour
NA Not Available
SA Simulated Annealing
TO 2-opt
Although the work in [81, 97, 98] has shown that it is possible t o
design models that consistently converge to feasible tours (one of t h e
problems with the original formulation), those tours do not y e t
compare with the tours generated by other TSP heuristics, like
simulated annealing. Furthermore, the convergence is quite slow
when the model is executed on a sequential computer. These
observations have led individuals to explore new lines of research, i n
particular, elastic nets and self-organizing maps.
Figures 6a, 6b and 6c show how the elastic net typically evolves
over time. In the figure, the small black circles are the points located
on the ring which are migrating towards the cities. The final solution
is shown in Figure 6d.
Σk φ (dX iY k,K)
2 2
φ (d,K) = e- d /2K .
33
(a) (b)
Montreal Montreal
Toronto
Toronto Boston Boston
NY NY
LA LA
(c) (d)
Montreal Montreal
Toronto Boston Toronto Boston
NY
NY
LA LA
Fig. 6. Evolution of the elastic net over time (a) (b) (c)
and the final tour (d).
Figure 7 illustrates the two forces that impact point j. The first
force (1), derived from the α term in the update equations, is q u i t e
easy to understand and is aimed at driving point j towards city i. T h e
second force (2), derived from the β term, can be more easily
interpreted by considering the equivalence
∆ Y j = -K dE/dYj ,
where
E=-αK Σ i ln Σ j φ (d X iY j, K) + β /2 Σ j dY jY j+12 . (3.2)
city i
j
(1)
j-1 (2)
j+1
35
φ (dY(X i)Y j, K)
s ij = ___________________ .
Σk φ (d Y(X i)Y k , K)
50 5.62 6.61
EN Elastic Net
PS Peterson and Soderberg
Table 3. Comparison of Results for the Elastic Net and the Model of
Peterson and Soderberg
38
Input Output
O1
X1
O2
X2
T 1M
T2M
OM
T M = ( T 1M , T2M )
(a) Fort [36] was one of the first with Angeniol et al., [9] Hueter, [52]
and Ritter and Schulten [85] to apply Kohonen's ideas to the TSP. Fort
notes, in particular, that the speed of convergence can be increased
by reducing the neighborhood of the winning unit and by reducing
the modification to the weights of the neighboring units over time. I n
his experiments, Fort uses 2N output units and solves problems w i t h
up to 400 cities. With respect to the 400-city problem, he generates a
tour of length 15.73, as compared to an estimated optimum of 1 4 . 9 8
derived from Stein's formula [94] .
K ← (1- α ) K ,
with 0 < α < 1 .
43
EN Elastic Net
GN Guilty Net
HT Hopfield-Tank
NA Not Available
SA Simulated Annealing
EN Elastic Net
NA Not Available
NN+TO Nearest Neighbor + 2-opt
SA Simulated Annealing
On the other hand, the gap between the elastic net or the self-
organizing map and the best heuristics of OR is still quite large. For
example, the study of Fritzke and Wilke [37] shows that the t o u r s
generated by their self-organizing map are 5% to 10% longer than the
optimal tours for ETSPs with 500 to 2,392 cities. These results c a n
hardly be compared with the tours generated by the heuristics of
Johnson and Bentley. [12,53] In the first case, solutions within 1% of
the optimum are reported for problems with 10,000 cities, while i n
the second case, solutions within 4% of the optimum are reported o n
problems with 1,000,000 cities.
References
16. M.C.S. Boeres, L.A.V. de Carvalho (1992), "A Faster Elastic Net
Algorithm for the Traveling Salesman Problem", in Proceedings
of the Int. Joint Conf. on Neural Networks, Baltimore, MD, pp. II-
215-220.
51
20. L.I. Burke (1992), "Neural Methods for the Traveling Salesman
Problem: Insights from Operations Research", presented at t h e
ORSA-TIMS Joint Meeting, San Francisco, CA, November 1992.
21. L.I. Burke, P. Damany (1992), "The Guilty Net for the Traveling
Salesman Problem", Computers & Operations Research 19 ( 3 / 4 ) ,
pp. 255-265.
22. L.I. Burke, J.P. Ignizio (1992), "Neural Networks and Operations
Research: An Overview", Computers & Operations Research
19(3/4), pp. 179-189.
23. D.J. Burr (1988), "An Improved Elastic Net Method for t h e
Traveling Salesman Problem", in Proceedings of the IEEE I n t .
Conf. on Neural Networks, San Diego, CA, pp, I-69-76.
27. W.I. Clement, R.M. Inigo, E.S. McVey (1988), "Synaptic Strengths
for Neural Simulation of the Traveling Salesman Problem", i n
Proceedings of Applications of Artificial Intelligence, SPIE 9 3 7 ,
Orlando, FL, pp. 373-380.
54. A. Joppe, H.R.A. Cardon, J.C. Bioch (1990), "A Neural Network f o r
Solving the Traveling Salesman Problem on the Basis of City
Adjacency in the Tour", in Proceedings of the Int. Joint Conf. o n
Neural Networks, San Diego, CA, pp. III-961-964.
55. A. Joppe, H.R.A. Cardon, J.C. Bioch (1990), "A Neural Network f o r
Solving the Traveling Salesman Problem on the Basis of City
Adjacency in the Tour", in Proceedings of the Int. Neural
Network Conf., Paris, France, pp. 254-257.
65. E.L. Lawler, J.K. Lenstra, A.H.G. Rinnooy Kan, D.B. Shmoys
(1985), The Traveling Salesman Problem: A Guided Tour of
Combinatorial Optimization, Wiley, Chichester.
96. D.A. Thomae, D.E. Van den Bout (1990), "Encoding Logical
Constraints into Neural Network Cost Functions", in Proceedings
of the Int. Joint Conf. on Neural Networks, San Diego, CA, p p .
III-863-868.
97. D.E. Van den Bout, T.K. Miller III (1988), "A Traveling Salesman
Objective Function that Works", in Proceedings of the IEEE I n t .
Conf. on Neural Networks, San Diego, CA, pp. II-299-303.
98. D.E. Van den Bout, T.K. Miller III (1989), "Improving t h e
Performance of the Hopfield-Tank Neural Network t h r o u g h
Normalization and Annealing", Biological Cybernetics 62, p p .
129-139.
59
99. D.E. Van den Bout, T.K. Miller III (1989), "TInMann: The I n t e g e r
Markovian Artificial Neural Network", in Proceedings of the I n t .
Joint Conf. on Neural Networks, Washington, DC, pp. II-205-211.
1 0 7 . C.S. Yu, W.D. Lee (1992), "Parallel Mean Field Annealing Neural
Network for Solving the Traveling Salesman Problem", i n
Proceedings of the Int. Joint Conf. on Neural Networks,
Baltimore, MD, pp. IV-532-536.