6
Volume 4, Number 2 OPERATIONS RESEARCH LETTERS July 1985 AN IMPROVED ASSIGNMENT LOWER BOUND FOR THE EUCLIDEAN TRAVELING SALESMAN PROBLEM William R. STEWART, Jr. School of Bushless Administration, College of William and Mary, Williamsburg, VA 23185, USA Received November 1984 Revised Marcia 1985 A simple transformation of the distance matrix for the Euclidean traveling salesman problem is presented that produces a tighter lower bound on the length of the optimal tour than has previously been attainable using the assignment relaxation. The improved lower bound is obtained by exploiting geometric properties of the problem to produce fewer and larger subtours on the first solution of the assignment problem. This research should improve the performance of assignment based exact procedures and may lead to improved heuristics for the traveling salesman problem. traveling salesman * flow algorithms * integer programming* lower bounds 1. Introduction The Euclidean traveling salesman problem (TSP) is the problem of finding*a minimum weight Hamiltonian tour on an undirected graph where the weight on each arc (i, j) is the Euclidean distance (cij) between the end points of the arc. This paper presents a transformation of the Euclidean distance matrix that, in most instances, results in a tighter lower bound on the weight of the optimal TSP tour than has previously been obtained using the assignment relaxation. The method presented is an extension of the one proposed by Jonker et al. [4]. In that paper the Fig. 1. Two routes example (Jonker et al.). 0167-6377/85/$3.30 © 1985, Elsevier Science Publishers B.V. (North-Holland) 55

An improved assignment lower bound for the euclidean traveling salesman problem

Embed Size (px)

Citation preview

Page 1: An improved assignment lower bound for the euclidean traveling salesman problem

Volume 4, Number 2 OPERATIONS RESEARCH LETTERS July 1985

A N I M P R O V E D A S S I G N M E N T L O W E R B O U N D F O R T H E E U C L I D E A N

T R A V E L I N G S A L E S M A N P R O B L E M

Wil l i am R. S T E W A R T , Jr.

School of Bushless Administration, College of William and Mary, Williamsburg, VA 23185, USA

Received November 1984 Revised Marcia 1985

A simple transformation of the distance matrix for the Euclidean traveling salesman problem is presented that produces a tighter lower bound on the length of the optimal tour than has previously been attainable using the assignment relaxation. The improved lower bound is obtained by exploiting geometric properties of the problem to produce fewer and larger subtours on the first solution of the assignment problem. This research should improve the performance of assignment based exact procedures and may lead to improved heuristics for the traveling salesman problem.

traveling salesman * flow algorithms * integer programming* lower bounds

1. Introduction

The Eucl idean travel ing sa lesman p rob lem (TSP) is the p rob lem of finding*a min imum weight Hami l t on i an tour on an undi rec ted graph where the weight on each arc (i, j ) is the Eucl idean dis tance (c i j ) between the end points of the arc.

This pape r presents a t r ans format ion of the Eucl idean d is tance mat r ix that, in most instances, results in a t ighter lower b o u n d on the weight of the op t imal TSP tour than has previously been ob ta ined using the ass ignment relaxat ion.

The method presented is an extension of the one p roposed by Jonker et al. [4]. In that p a p e r the

Fig. 1. Two routes example (Jonker et al.).

0167-6377/85/$3.30 © 1985, Elsevier Science Publishers B.V. (North-Holland) 55

Page 2: An improved assignment lower bound for the euclidean traveling salesman problem

Volume 4, Number 2 OPERATIONS RESEARCH LETTERS July 1985

authors observed that they could solve an asym- metric assignment problem and have a tighter lower bound on the optimal TSP solution than is produced by the straight assignment relaxation. In essence, they chose one node to be a pure source with a supply of two units and a second node to be a pure sink with demand of two. (See Figure 1 taken from Jonker et al.) With all other nodes represented as transshipment nodes each with supply and demand of one and no self loops, the solution to the resulting problem is typically a number of small subtours and a pair of paths from the source node to the sink node constituting a large subtour when arc direction is ignored.

Jonker et al. refer to this as the two routes method. If all the nodes in the problem fall on this latter subtour, the optimal TSP solution has been obtained (as in Figure 1). Otherwise the solution represents a lower bound on the optimal TSP solution. By choosing the pure source and pure sink nodes far apart (max cij ) the two directed paths will typically contain a substantial propor- tion of the nodes in the problem, and the resulting bound will be quite good when compared to the assignment lower bound. (See Jonker et al. for more details.)

2. The many routes method

The following argument makes use of the property that in Euclidean TSP's, there exists an optimal tour such that the nodes on the boundary of the convex hull occur in the same sequence in the optimal tour as they do on the boundary (Flood [2]). Those nodes on the boundary of the convex hull can be renumbered in sequence around the boundary 1, 2, 3 . . . . . m, where m is the total number of nodes on the boundary. In the follow- ing discussion, assume that m is an even number (if it is not, one of the nodes on the boundary can be disregarded without' loss of generality).

The ordering of the boundary nodes is neces- sary as they will be treated alternately as sources and sinks. Ideally a source node with a supply of two will be connected to the sink node on either side of it. This connection will be direct or through intermediate interior (transshipment) nodes that are not on the boundary. In this way, an initial subtour with a large proportion of the nodes on it may be generated.

Formulation of the many routes problem:

Minimize ~_, ~_, cijxij, / j

subject to ~ x i j = 2, J

where

Z Xi j ~-- O,

J

Z Xi j = 1,

J

Z X i j = O, i

Z Xi j = 2, i

Z Xi j -~- 1, i

i = 2 k - 1 ,

m k = l , 2 . . . . . 2 '

i:#j, i = 2 k ,

m k = 1 , 2 . . . . .

i=~j, i = m + l , . . . , n ,

iq:j, j=2k-1,

m k = l , 2 . . . . . 2 '

iq:j, j = 2 k ,

m k = 1 , 2 . . . . . 2 '

iq:j, j = m + l . . . . . n,

(1)

(2)

(3)

(4)

(5)

(6)

i ~ j , (7)

£ Y'~ xij>_l V S C { 1 . . . . n}, i ~ s j ~ s (8)

xij=(10 if arc (i , j ) is used, otherwise,

and n is the number of nodes in the problem, and where S cannot have more even numbered nodes from the boundary of the convex hull than it has odd numbered nodes. The objective function (1) and constraints (2)-(7) define a transportation problem, while (8) constitute subtour elimination constraints. The optimal solution to (1)-(8) will be an optimal tour for the Euclidean TSP when arc directions are ignored.

As in Jonker et al., variables representing arcs out of the designated sink nodes (even numbered _< m) and into the designated source nodes (odd

56

Page 3: An improved assignment lower bound for the euclidean traveling salesman problem

Volume 4, Number 2 OPERATIONS RESEARCH LETTERS

2

8

7 6

Fig. 2. Many routes example with node numbers.

July 1985

numbered < m) may be ignored along with con- straints (3) and (5) above. Figure 2 depicts a solut ion to (1)-(8) that might result from a prob- lem with four nodes on the convex hull boundary .

To transform the original Euclidean distance matrix into a distance matrix for an assignment problem which will solve the relaxation (1)-(7) requires Steps 1 and 2. The addi t ion of Step 3 prevents a source node on the boundary from being directly assigned twice to the same sink node on the boundary. Step 1. Set ck+ U- - cki for a l l ' j and for k odd

and < m. Step 2. Set c,. k = g.k-I for all i and for k even

a n d < m. Step 3. Set ck. k=ck+~,k+ l=ck+l, k = ~ for k

odd and < m.

Set Ck,k_ ~ = Ck,k_2 = Ck+~,k_~ = OO for k odd and ~ m (note if k = l , k - l - = m and k - 2 = m - 1 ) .

These steps replicate the rows representing sources (odd values of k ) and the columns repre- Senting sinks (even values of k). Now each source must be assigned to two columns and each sink must have two rows assigned to it. Figure 3 shows the original cost matrix and the t ransformed many routes cost matrix for the p r o b l e m shown in Fig- ure 2.

These t ransformations allow a path from node k (odd) to the nodes on either side of it (nodes k - 1 and k + 1) on the convex hull boundary . At the same time, Step 3 prohibits node k from being attached directly (no intermediate nodes) to node k + 1 by two arcs or node k - 1 by two arcs. The cost matrix that results from these t ransformations represents a l inear assignment problem that solves

J 1 2 3 4 5 6 7 8 i

1 ¢0 64 106 50 78 29 49 66 2 64 e¢ 54 81 27 43 69 46 3 106 54 ¢0 96 29 77 82 46 4 50 81 96 zo 77 42 14 50 5 78 27 29 77 ¢0 50 63 30 6 29 43 77 42 50 ¢¢ 34 38 7 49 69 82 14 63 34 ¢0 36 8 66 46 46 50 30 38 36 co

(a) Initial cost matrix

J 2' 2 4' 4 5 6 7 8 i

1 z¢ 64 0¢ ¢¢ 78 29 49 66 1' ¢0 ¢¢ 50 00 78 29 49 66 3 00 zo oo 96 29 77 82 46 3' 54 00 ¢0 zo 29 77 82 46 5 27 27 77 77 o0 50 63 30 6 43 43 42 42 50 ~ 34 38 7 69 69 14 14 63 34 00 36 8 46 46 50 50 30 38 36 co

(b) Many routes t ransformed cost matrix

Fig. 3. Cost matrices.

the relaxation of the many routes problem, eqs. (1)-(7), when the subtour constraints (8) are dropped.

3. Lower bounds on the T S P

After the t ransformat ion of the distance matr ix using Steps 1-3 , the resulting ass ignment problem yields a lower b o u n d on the m a n y routes problem

57

Page 4: An improved assignment lower bound for the euclidean traveling salesman problem

Volume 4, Number 2 OPERATIONS RESEARCH LETTERS July 1985

and hence a lower bound on the optimal value of the TSP. By ignoring the implied direction in the solution of the transformed assignment problem, subtours can be constructed and costed out using the original distance matrix.

To demonstrate that the solution to the many routes problem is at least as good a lower bound on the value of the optimal TSP tour as the straight assignment solution, one must examine the solution to relaxation (1)-(7). It forces each node on the boundary of the convex hull to be on a subtour with at least one other node on the boundary. Step 3 forces any subtour that contains only two of these nodes from the boundary of the convex hull to have more than two nodes in that subtour. This implicitly enforces a subset of the constraints (8) (certain subtours must have at least three nodes) and hence produces a tighter lower bound than the straight assignment problem.

In their two routes method, Jonker et al. choose the two nodes at greatest distance from each other as their source node and sink nodes. In a Euclidean problem, these two nodes must fall on the boundary of the convex hull. Consequently, a solu- tion to the many routes problem that produces a subtour containing all the nodes on the boundary, must contain the two most remote nodes in that subtour. This solution will have an objective value at least as great as the solution of the two routes problem of Jonker et al.

Not all the many routes solutions result in a

situation where all the nodes on the boundary of the convex hull fall on the same subtour. When this happens, the many routes approach may not produce a better lower bound than the two routes method, although it still produces a better lower bound than the assignment relaxation. Figure 4 illustrates an example where the two routes lower bound would be better than the many routes solu- tion. Figure 5 presents an example of a situation where the many routes lower bound is superior to the two routes lower bound despite the fact that the nodes on the boundary of the convex hull fall in two different subtours in the many routes solu- tion. The situation illustrated in Figure 5 appears to be far more common an occurrence than that of Figure 4 when all the boundary nodes fail to fall on the same subtour. As shown in the computa- tional results of the next section, the two routes formulation rarely produces a tighter lower bound than that produced by the many routes formula- tion.

4. Computational results

Thirty Euclidean problems of various sizes were randomly generated on a 1000 × 1000 square. These problems were solved using the assignment relaxation, the two routes method, and the many routes method. The resulting lower bounds are compared in Table 1 which summarizes the tests

Y (a) Two routes solution

(b) Many routes solution

Fig. 4. An example where the two routes bound is superior to the many routes bound.

58

Page 5: An improved assignment lower bound for the euclidean traveling salesman problem

Volume 4, Number 2 OPERATIONS RESEARCH LETTERS July 1985

(a) Two routes solution

(b) Many routes solution

Fig. 5. An example where the many routes bound is superior.

on ten fifty-node-problems, ten seventy-five- node-problems, and ten one-hundred-node-prob- lems. The numbers in Table 1 represent the aver- age lower bound produced by each method, the relative improvement of the two routes and many routes methods over the assignment lower bound, the average number of subtours in each lower bound, and the number of times (out of ten) that the many routes method produced a tighter lower bound than that .produced by the two routes method.

As can be seen by examining Table 1, the many routes method clearly outperforms the two routes method in producing lower bounds. The many routes method produces lower bounds that are consistently 4-7% better than the two routes method and more than 10% above the assignment lower bound. The margin of superiority of the many routes over the two routes and the two routes over the assignment tends to drop off as the problem size increases. This appears to be related to the fact that the number of nodes contained in the large subtours produced by the many routes and two routes methods increases at a decreasing rate as the problem size increases.

In addition to the random problems in Table 1, the two routes and many routes methods were compared on the five one-hundred-node-problems

Table 1 Comparison of lower bounds on random problems; average performance

(1) (2) (3) (4) Problem Assignment Two routes Ratio size solution (no. solution (no. (3)/(2)

of subtours) of subtours)

(5) Many routes solution (no. of subtours)

(6) Ratio (5)/(2)

(7) Number of times many routes best

50 4616 (23) 5108 (11) 1.11 75 5612 (34) 6144(18) 1.09

100 6328(45) 6833 (28) 1.08

5427 (9) 6442 (14) 7069 (26)

1.18 1.15 1.12

9 10 10

Table 2 Comparison of lower bounds on five one-hundred-node-problems

Assignment Optimal lower bound

Problem no. solution (percent of optimum)

Two routes lower bound (percent of optimum)

Many routes lower b o u n d (percent of optimum)

24 21282 17087 (80.3%) 25 22141 16971 (75.8%) 26 20749 16738 (80.7%) 27 21294 16540 (77.7%) 28 22068 16685 (75.6%) Average (78.0%)

19124 (89.9%) 19130 (86.4%) 18358 (88.5%) 18232 (85.6%) 18989 (86.0%)

(87,3%)

19822 (93.1%) 19469 (87.9%) 18714 (90.2%) 18845 (88.5%) 18469 (83.7%)

(88.6%)

59

Page 6: An improved assignment lower bound for the euclidean traveling salesman problem

Volume 4, Number 2 OPERATIONS RESEARCH LETTERS July 1985

from Krolak, Felts and Marble [5], for which Crowder and Padberg [1] have recently produced optimal solutions. Results of the tests on these five problems are displayed i.n Table 2. While the results in Table 2 are not as strong as those in Table 1, the many routes method still produces an average lower bound some 2.2% better than the two routes method on four of the five problems. Since solving an assignment problem is a reasona- bly quick process, it would appear to be worthwhile to find both the two routes and many routes lower bounds and use the better one in a branch and bound procedure.

The weakening of the results from Table 1 to Table 2 is probably explained by the geometry of the problems involved. While the problems in Ta- ble 1 are generated on a square, the problems in Table 2 are generated on a rectangle twice as long as it is wide, placing the two most remote nodes at either end of the rectangle. Thus the two routes will more closely approximate the convex hull on these flatter problems.

5. Conclusions and extensions

The many routes approach takes advantage of geometric properties of the Euclidean TSP to pro- duce a tight lower bound. This method may be improved if a way can be found to prevent nodes on the boundary of the convex hull from falling into disjoint subtours. In the test problems sum- marized in Tables 1 and 2, very few of the many routes solutions yielded a subtour that included all of the nodes from the boundary of the convex hull even though the lower bounds .produced by these solutions were usually better than those produced by the corresponding two routes solutions.

Jonker et al. [4] observe in their paper that

branch and bound algorithms based on the two routes relaxation run faster than similar al- gorithms based on the assignment relaxation. It is reasonable to assume, based on the results here, that the many routes relaxation would produce as good or better results when incorporated into a branch and bound algorithm.

Finally the many routes approach may offer possibilities for more effective heuristics for the Euclidean traveling salesman problem. Heuristics for the Euclidean TSP that make use of the boundary of the convex hull as a starting subtour have been shown to be fast and accurate for large problems (see Stewart [6] and Golden and Stewart [3]). The many routes approach shows promise of being the foundation for an approach similar to these using the transformed assignment problem and the large initial subtour produced in the solu- tion to the many routes problem.

References

[1] H.P. Crowder and M.W. Padbarg, "Large-scale symmetric traveling salesman problems", Management Science 26, 495-509 (1980).

[2] M.M. Flood, "The traveling salesman problem", Operations Research 4, 61-75 (1956).

[3l B.L. Golden and W.R. Stewart, "The empirical analysis of TSP heuristics", forthcoming in: E. Lawler, J.K. Lenstra and A.H.G.R.innoy Kan, eds., The Traveling Salesman Problem.

[4] R. Jonker, G. De Leve, J.A. VanDerVelde and A. Volge- nant, "Bounding symmetric traveling salesman problems with an asymmetric assignment problem", Operations Re- search 28, 623-627 (1980).

[5] P. Krolak, W. Felts and G. Marble, "A man-machine approach toward solving the traveling salesman problem' CACM 14, 327-334 (1971).

[6] W.R. Stewart, "A computationally efficient heuristic for the traveling salesman problem", Proceedings Thir'teenth An- nual Meeting of Southeastern T IM~ Myrtle Beach, SC, 1977, 75-85.

60