Generalized Traveling Salesman Problem Reduction Algorithms
The generalized traveling salesman problem (GTSP) is an extension of the well-known traveling salesman problem. In GTSP, we are given a partition of cities into groups and we are required to find a minimum length tour that includes exactly one city f…
Authors: Gregory Gutin, Daniel Karapetyan
Generalized T ra v eling Salesman Problem Reduction Algorithms Gregory Gutin ∗ Daniel Karap et y an † Abstract The generalized tra veling salesman problem (GTSP) is an ext en sio n of the w ell-known tra veling salesman prob lem. In GTSP , we are given a partition of cities into groups and we are required to find a minim um length tour t h at includes exactly one cit y from each group. The aim of this pap er is t o p resent a problem reduction algorithm that deletes redu ndan t vertices and edges, p reserving the optimal solution. The algorithm’s run ning time is O ( N 3 ) in the w orst case, but it is significantly faster in practice. The algorithm has reduced the problem size by 15–20% on av erage in our exp eriments and this has decreased the solution time by 10–60% for eac h of t h e considered solvers. Keywords Generalize d T rav eling Salesman Problem, Prepro cessing, Reduction Algorithm 1 In tro duction The gener alize d tr aveling salesman pr oblem (GTSP) is defined as fo llo ws. W e are given a weighted complete undirected graph G on N vertices a nd a partition V = V 1 ∪ V 2 ∪ . . . ∪ V M of its vertices; the subsets V i are called clus ters . The ob jective is to find a minimum weigh t cycle containing exactly one vertex from ea c h cluster. There a re ma ny publications on GTSP (see, e.g., the surveys [4, 6] and the references ther ein). The problem has many applica tions, see, e.g., [2, 11]. It is NP-hard, since the tr aveling salesman pr oblem (TSP) is its special case (when | V i | = 1 for each i ). The weigh t o f an edge xy of G is deno ted dis t( x , y ) a nd will b e often ca lled the distanc e betw een x and y . V ar ious appr o ac hes to GTSP hav e b een studied. Ther e ar e exact alg o rithms such as branch- and-b ound and br anc h-and-cut describ ed in [3]. Another appr o ac h use s the fact that GTSP can be conv erted to an equiv ale n t TSP with the same num b er of vertices [2, 1 3, 14, 15] and then can be solved with so me efficient TSP solver such as Co ncorde [1]. Heuristic GTSP algorithms hav e also be en invistigated, see, e.g., [7, 8 , 10, 1 8, 19, 20, 21]. Different prepro cessing pro cedures are o ften used for hard pro blems to r e duce the co mputation time. There a re examples of such appro ac hes in integer and linear prog ramming (e.g ., [9 , 17]) as ∗ Departmen t of Computer Science, Roy al Hollo wa y Universit y of London, Egham, Surr ey TW20 0EX, UK, G.Gutin@rh ul.ac.uk † Departmen t of Computer Science, Roy al Hollo wa y Universit y of London, Egham, Surr ey TW20 0EX, UK, Daniel.Karap et yan@gmail.com 1 well as for the V ehicle Routing P r oblem [12]. In some cases prepro cessing plays the k ey ro le in an a lgorithm (e.g., [5 ]). W e introduce prepro cessing pro cedure for GTSP . A feature of GTSP is that not every vertex of a pro blem sho uld b e visited a nd, thus, GTSP may cont ain vertices that a priori ar e not included in the o ptimal solution and may b e remov ed. W e hav e a similar situation with e dg es. The exp erimen tal r e sults s ho w that almost each GTSP instance tested in the liter a ture can be reduced by the pr esen ted proc edure at a v ery lo w cost and that this reduction is almost a lw ays bene fic ia l for the GTSP s olv ers. 2 V ertex Reduction Since GTSP solution cov ers only M vertices, up to N − M v ertices may b e reduced without a change of the optimal solution. W e present a n a pproach to detect some o f the redundant vertices in a re a sonable time. Definition 1. Let C b e a cluster, | C | > 1 . W e say that a vertex r ∈ C is re dundant if for each pair x, y of vertices from distinct clusters differe n t from C , there exis ts a vertex s ∈ C \ { r } such that dist( x, s ) + dist( s, y ) ≤ dist( x, r ) + dist( r, y ). In other words, if for each path xr y there exists another path xsy , s ∈ C \ { r } , with the same or smaller weight , vertex r can b e remov ed. T esting this condition for every vertex will take approximately O ( N 3 · | V | ), where | V | = N / M is the average cluster size. In the s ymmetric case of the pro blem ther e is an efficient heuris tic that usually allows to reduce the prepr ocess ing time significantly . Let us take tw o distinct vertices r and s in s ome clus ter C . W e can calcula te the differences betw een the dista nces to r a nd s fro m each vertex x / ∈ C (∆ r,s x = dist( x, r ) − dist( x, s )) and save this information to a Differ enc es T able such as T a ble 1. Notice that in T able 1 we assume that clusters 1 and 2 ha ve three vertices eac h and cluster 3 has tw o vertices, r b elongs to the first cluster and it is the first vertex in the cluster, i.e., vertex s c an b e o nly the second a nd the third vertices of cluster 1 . T a ble 1: Differences T able exa mple. s \ x cl.2 v .1 cl.2 v .2 cl.2 v.3 cl.3 v.1 cl.3 v.2 Negative # v.2 2 0 − 1 − 3 4 2 v.3 − 1 − 2 − 1 1 2 3 max 2 0 − 1 1 4 min { 2 , 0 , − 1 } = − 1 min { 1 , 4 } = 1 Observe that a vertex r is r e dundan t if there is no pair o f vertices from different clus ter s such that the sum of differences ∆ (see a bov e) for these vertices is neg a tiv e for every s , i.e., r is redundant if for every x a nd y there exists s ∈ C \ { r } such that ∆ r,s x + ∆ r,s y ≥ 0 , where x a nd y belo ng to 2 distinct c lusters. That is due to ∆ r,s x + ∆ r,s y = dist( x, r ) − dist( x, s ) + dist( y , r ) − dist( y , s ) = dist( x, r ) + dist( r, y ) − dist( x, s ) + dist( s, y ) Therefore we need to check ev ery pa ir of co lumns ( col 1 , col 2 ) (except the pairs of columns corres p onding to the same cluster s) in the Differences T a ble T r ow,col . If T 1 ,col 1 + T 1 ,col 2 < 0, we chec k the seco nd r o w ( T 2 ,col 1 + T 2 ,col 2 ). If the res ult is still neg a tiv e, we chec k the third row, e tc. If all the rows a re c heck ed and each time we obtain a negative sum, the vertex r cannot b e removed and the rest o f the pr o cedure may b e skipp ed. Example 1. In the example ab ov e (T able 1) it is necess a ry to p erform up to 6 tests provided in T a ble 2. T a ble 2: V er tices pair s for the ex ample. Pair Sum for s = v.2 Sum for s = v.3 cl.2 v .1 —cl.3 v.1 − 1 0 cl.2 v .1 —cl.3 v.2 6 − 1 cl.2 v .2 —cl.3 v.1 − 3 − 1 cl.2 v .2 —cl.3 v.2 4 0 cl.2 v .3 —cl.3 v.1 − 4 0 cl.2 v .3 —cl.3 v.2 3 1 The o nly test that do e s no t allow us to declare the vertex r redundant is in the row 3 of the T a ble 2 (cl.2 v.2—cl.3 v.1) as b o th sums (for s = v . 2 and for s = v . 3) a re negative. (Cer ta inly , there is no need to calculate the sum for s = v.3 in rows 2, 4, and 6 in the example above, and the calculations may be stopp ed after the row 3 .) Removing redundant vertex may cause a pr eviously irr edundan t vertex to b ecome re dunda n t. Thu s, it is useful to check r edundancy of vertices in cyclic order until we see that, in the la st cycle, no vertices are found to b e redundan t. How ever, in the worst case, that would lead to Θ ( N 2 ) redundancy tests. (Recall that N is the total num be r of vertices in GTSP .) Our c omputational exp erience ha s s ho wn that almost all redundant vertices will be found even if we r estrict o ur selv es to testing each vertex of GTSP at most twice. Th us, we a ssume in the rest of the pap er that each vertex is tested a t most t wice for redundancy . 2.1 Acceleration Heuristic In some ca ses it is p ossible to determine fas ter that a vertex r is not redundant. If min x / ∈ Z max s ∈ C ∆ r,s x + min x ∈ Z max s ∈ C ∆ r,s x < 0 for s ome cluster Z , then r ca nnot be reduced. This condition means that there exist tw o columns in the Differences T able corr esponding to dis tinct clusters and the sum of these columns maxima is negative. This ensures that the sum for every r o w of these columns is also nega tiv e. 3 W e can use an equiv a le nt condition: min x ∈ S j 1, w e detect redundant edges incident with v using the following pr ocedure : 1. Select an arbitrar y vertex v ′′ ∈ C \ { v } . 2. Set P x = ∆ v, v ′′ x for ea c h vertex x ∈ V \ C (recall that ∆ r,s x = dist( x, r ) − dist ( x, s )). 3. Sort arr ay P in non-decrea sing order. 4. F or e a c h cluster U 6 = C and for ea c h vertex u ∈ U do the following: (a) δ = ∆ v, v ′′ u (b) F or each item ∆ v, v ′′ x of the array P suc h that ∆ v, v ′′ x + δ < 0 check the following: if x / ∈ U and ∆ v, v ′ x + ∆ v, v ′ u < 0 for every v ′ ∈ C \ { v , v ′′ } , the edge u v is not redundant, co n tinu e with the next u . (c) Edg e uv is redundant, set dist( u, v ) = ∞ . T o prove that the a bov e edge r eduction alg orithm works cor rectly , let fix so me edge uv , u ∈ U , v ∈ C , U 6 = C . The algor ithm dec lares this edge redundant if the following condition holds for each x / ∈ C (se e 4b): ∆ v, v ′′ x + ∆ v, v ′′ u ≥ 0 or ∆ v, v ′ x + ∆ v, v ′ u ≥ 0 for some v ′ ∈ C \ { v , v ′′ } This condition is equiv alent to ∆ v, v ′ x + ∆ v, v ′ u ≥ 0 for some v ′ ∈ C \ { v } 5 So the algorithm declares the edge uv r edundan t if for each x ∈ V \ C \ U there exists v ′ ∈ C \ { v } such that ∆ v, v ′ x + ∆ v, v ′ u ≥ 0. dist( x, v ) − dist( x, v ′ ) + dist( u, v ) − dist( u, v ′ ) ≥ 0 and dist( u, v ) + dis t( v, x ) ≥ dist( u, v ′ ) + dist( v ′ , x ) . Let us ev aluate the algo rithm’s complexity . The edg e reduction a lgorithm p erforms the follow- ing steps for every cluster C , | C | > 1 for each v ∈ C : • Array P generation. This takes Θ( N ) op eration. • Array P sorting. This takes Θ( N log 2 N ) op erations. • Edges uv testing. Eac h test takes O (1) to O ( N · | C | ) opera tions and Θ( N ) tests are p erformed. Thu s the complexity of the ent ire algo rithm is Θ( N 2 log 2 N ) in the b e st case, and Θ( N 3 · | C | ) in the worst cas e . As usually | C | = Θ( N ), we may say that this algorithm’s complexity v aries from Θ( N 2 log 2 N ) to Θ( N 3 ). The ex perimental algo r ithm complexity is Θ( N 2 . 6 ) (se e Section 4.1). After the search fo r r edundan t edges has b een completed, the edge reduction a lgorithm finds redundant vertices using the follo wing observ ation: if after the edge reduction proce dure so me vertex has finite distance edg es to at mo st one cluster , then this vertex can b e declared redundant. This re ductio n takes O ( N 2 ) o peratio ns. 4 Exp erimen ts W e tested the reduction alg orithms on the standard GTSP instances (see, e.g., [2 , 18, 19, 20]) which were gener ated from some TSPLIB [16] instances b y applying the clustering pro cedure of Fis chetti, Salazar a nd T oth [3]. The algor ithms were implemented in C++ and tested on a computer with AMD At lon 64 X2 Co re Dual pro cessor (3 GHz frequency). W e hav e tes ted three r eduction algor ithms: the V er tex Reduction Algorithm (see Section 2), the Edge Reductio n Algorithm (see Section 3), and the Combined Algor ithm witch first applies the V ertex Reduction Algorithm and then the E dge Reduction Algorithm. 4.1 Exp erimen t al Results Each test was r e peated ten times. The co lumns of the ta ble are as follows: • Instanc e is the instance na me. The prefix num b er is the num b er o f clusters of the instance; the s uffix n umber is the num b er of vertices (before a n y pre process ing). • R v is the num b er of vertices detected as redundant. 6 • R e is the num b e r of edges detec ted as redundant. F or the Combined Algorithm R e shows the num b er of redundant edges in the already r educed by the V ertex Reduction Algo rithm problem. • T is the prepr ocessing time in seconds . T a ble 3 : T est results of the Reduction Algor ithms. V ertex r eduction Edge reduction Combined reduction Instance R v R v , % T R e , % R v T R v , %, R e , % T 4ulysses1 6 9 56.3 0.0 62 .0 4 0.0 56.3 23.5 0.0 4gr17 11 64.7 0.0 3 5.8 3 0.0 64.7 23.0 0.0 5gr21 8 38.1 0.0 48 .7 3 0.0 38.1 45.0 0.0 5ulysses2 2 11 50.0 0.0 4 4.3 2 0.0 50.0 39.5 0.0 5gr24 13 54.2 0.0 3 3.1 3 0.0 54.2 10.4 0.0 6fri26 13 50.0 0.0 2 8.7 3 0.0 50.0 20.3 0.0 6bayg29 12 41.4 0.0 37 .9 5 0.0 41.4 33.6 0.0 9dantzig42 6 14.3 0.0 36 .2 0 0.0 14.3 24.9 0.0 10att48 15 3 1.3 0.0 41.5 7 0 .0 31.3 25.3 0.0 10gr4 8 18 37.5 0.0 2 7.0 4 0.0 37.5 25.5 0.0 10hk48 6 12.5 0.0 34 .2 3 0.0 12.5 32.3 0.0 11b erlin52 15 28.8 0.0 3 6.1 1 0.0 28.8 35.0 0.0 11eil51 9 17.6 0.0 32.6 3 0 .0 17.6 28 .8 0.0 12brazil5 8 14 24.1 0.0 2 4 .5 3 0.0 24.1 29.0 0.0 14st70 12 17.1 0.0 36.5 3 0.0 17.1 24.6 0.0 16eil76 12 15.8 0.0 2 8.8 2 0.0 15.8 28.6 0.0 16pr76 2 2.6 0.0 2 9.0 1 0.0 2.6 29.7 0.0 20gr9 6 13 13.5 0.0 2 5.8 3 0.0 13.5 20.6 0.0 20rat9 9 11 11.1 0.0 2 3.7 3 0.0 11.1 23.2 0.0 20kro A100 16 1 6.0 0.0 20.9 2 0 .0 16.0 18 .8 0.0 20kro B100 8 8.0 0.0 2 8.1 2 0.0 8.0 25.0 0.0 20kro C100 19 19.0 0.0 2 7.2 2 0.0 19.0 24.2 0.0 20kro D100 19 19.0 0.0 27.9 2 0.0 19.0 19.8 0.0 20kro E100 21 21.0 0.0 2 6.4 1 0.0 21.0 20.2 0.0 20rd10 0 11 11.0 0.0 3 2.1 2 0.0 11.0 28.8 0.0 21eil10 1 14 13.9 0.0 35.5 1 0.0 13.9 31.5 0.0 21lin105 9 8.6 0.0 3 5.4 3 0.0 8.6 32.4 0.0 22pr10 7 9 8.4 0 .0 35.6 0 0 .0 8.4 35.9 0.0 24gr1 20 15 12.5 0.0 2 8.4 4 0.0 12.5 29.6 0.0 25pr12 4 17 13.7 0.0 3 2.5 3 0.0 13.7 22.2 0.0 26bier12 7 2 1.6 0.0 2 1.5 1 0.0 1.6 19.7 0.0 26ch130 16 12.3 0.0 25.9 3 0.0 12.3 21.2 0.0 28pr13 6 14 10.3 0.0 2 2.4 1 0.0 10.3 26.3 0.0 28gr1 37 10 7.3 0.0 19.9 1 0.0 7 .3 1 7.0 0.0 29pr14 4 19 13.2 0.0 3 3.2 2 0.0 13.2 31.1 0.0 30ch150 22 14.7 0.0 19.9 2 0.0 14.7 18.1 0.0 30kro A150 20 1 3.3 0.0 22.5 6 0 .0 13.3 19 .5 0.0 7 V ertex r eduction Edge reduction Combined reduction Instance R v R v , % T R e , % R v T R v , %, R e , % T 30kro B150 14 9 .3 0 .0 23.8 2 0 .0 9.3 23.4 0.0 31pr15 2 34 22.4 0.0 3 7.5 7 0.0 22.4 26.6 0.0 32u159 33 20.8 0.0 2 3.5 3 0.0 20.8 15.1 0.0 35si17 5 45 25.7 0.0 2 7.4 5 0.0 25.7 17.5 0.0 36brg1 80 97 53.9 0.0 57.9 51 0 .0 53.9 16.9 0.0 39rat1 95 12 6.2 0.0 22.2 1 0.0 6 .2 2 0.4 0.0 40d198 7 3.5 0.0 2 3.1 4 0.0 3.5 24.2 0.0 40kro A200 16 8 .0 0.0 20.3 2 0.0 8.0 20.6 0.0 40kro B200 7 3.5 0.0 1 9.1 1 0.0 3.5 18.5 0.0 41gr2 02 4 2.0 0.0 18.8 1 0.0 2 .0 1 8.5 0.0 45ts225 40 17 .8 0.0 20 .0 2 0.0 17.8 11.2 0.0 45tsp225 12 5.3 0.0 20.5 2 0.0 5.3 17.1 0.0 46pr22 6 12 5.3 0.0 29.6 1 0.0 5 .3 2 8.4 0.0 46gr2 29 1 0.4 0.0 22.0 0 0.0 0 .4 2 1.6 0.0 53gil26 2 16 6.1 0 .0 21.8 3 0.0 6.1 18.9 0.0 53pr26 4 11 4.2 0.0 21.5 1 0.0 4 .2 2 0.7 0.0 56a28 0 20 7.1 0 .0 19.4 1 0 .0 7.1 16.1 0.0 60pr29 9 15 5.0 0.0 16.2 0 0.0 5 .0 1 4.7 0.0 64lin318 13 4.1 0.0 20.5 2 0.0 4 .1 2 0.8 0.0 64linhp318 13 4.1 0 .0 20.5 2 0 .0 4.1 20.8 0.0 80rd40 0 11 2.8 0.0 14.8 1 0.1 2 .8 1 3.0 0.0 84fl417 43 10.3 0.0 2 8.3 5 0.1 10.3 22.7 0.1 87gr4 31 0 0.0 0.0 17.2 0 0.3 0 .0 1 7.2 0.3 88pr43 9 10 2.3 0.0 14.7 1 0.2 2 .3 1 5.0 0.1 89p cb442 24 5.4 0.0 11.9 0 0.1 5 .4 9.7 0.1 99d493 4 0.8 0.0 1 7.8 1 0.2 0.8 19.4 0.2 107att53 2 21 3.9 0.0 2 0.5 2 0.3 3.9 18.1 0.3 107ali5 35 29 5.4 0.1 16.6 2 0.5 5 .4 1 4.3 0.5 107si5 35 96 17.9 0 .0 26.5 9 0 .3 17.9 17 .9 0.1 113pa5 61 147 26.2 0.1 31 .3 5 0.3 26.2 22.6 0.1 115u57 4 11 1.9 0 .0 14.4 1 0 .2 1.9 14.0 0.2 115ra t575 18 3.1 0.0 1 1.2 2 0.2 3.1 10.9 0.1 131p65 4 88 13 .5 0.1 32 .6 2 0.8 13.5 28.2 0.5 132d65 7 8 1.2 0.0 10.8 0 0.3 1.2 9.6 0 .3 134gr 666 0 0.0 0.0 11.6 0 1.0 0 .0 1 1.6 1.0 145u72 4 34 4.7 0 .1 10.1 3 0 .5 4.7 8.8 0.4 157ra t783 25 3.2 0.0 9.8 2 0.4 3.2 8.4 0 .3 200dsj10 00 8 0.8 0 .1 9.6 1 2.4 0.8 9.4 1 .5 201pr1 002 20 2.0 0.1 9.2 2 3.0 2.0 8.7 1.6 207si1 032 85 8.2 0.2 12.1 12 1.2 8.2 10.2 0.9 212u10 60 36 3.4 0.1 14.4 1 1.7 3 .4 1 1 .2 2.0 217vm10 84 241 22.2 0.6 24 .0 8 2.3 22.2 8 .9 1.3 235p cb1173 11 0.9 0.1 8.2 0 1.5 0.9 8.2 1.3 259d12 91 48 3.7 0.2 12.4 2 2.3 3 .7 9.8 1.7 8 V ertex r eduction Edge reduction Combined reduction Instance R v R v , % T R e , % R v T R v , %, R e , % T 261rl1 304 19 1.5 0.2 7.9 2 2.6 1.5 7.2 2.0 265rl1 323 23 1.7 0.2 7.8 1 4.1 1.7 7.0 2.9 276nrw1 379 11 0.8 0.2 7.4 1 3.7 0.8 7.1 2.6 280fl14 00 23 1.6 0.9 17.4 0 6.5 1 .6 1 7 .5 5.3 287u14 32 33 2.3 0.2 7.7 1 3.2 2.3 6.6 2.6 316fl15 77 44 2.8 0.4 10.3 2 5.0 2 .8 9.2 4.5 331d16 55 14 0.8 0.2 6.7 1 3.7 0.8 6.7 3.7 350vm17 48 285 16.3 2.5 19 .8 2 11.4 16.3 11.0 5.5 364u18 17 5 0.3 0 .1 6.2 0 4.9 0.3 5.8 4 .5 378rl1 889 17 0.9 0.7 7.3 3 10.9 0.9 6.8 7.2 421d21 03 8 0.4 0 .2 6.7 1 2.9 0.4 6.6 2 .7 431u21 52 10 0.5 0.3 5.2 0 7.8 0.5 5.0 6.6 464u23 19 24 1.0 0.6 3.9 0 10.3 1.0 3.8 9.7 479pr2 392 33 1.4 0.9 5.9 1 15.4 1.4 5.3 13.4 608p cb3038 29 1.0 1.4 4.7 1 45 .4 1.0 4.7 36.2 759fl37 95 21 0.6 4.9 6.4 0 1 27.2 0.6 6.5 94.5 893fnl446 1 22 0.5 3.4 3.1 0 80 .2 0.5 2.9 46.7 1183r l5915 28 0 .5 7.9 2.4 2 258.1 0 .5 2.3 11 4.1 1187r l5934 38 0 .6 9.4 3.0 2 308.3 0 .6 2.7 13 9.6 1480pla 7397 196 2.6 31.5 4.6 1 2147.9 2.6 3.6 1001.3 2370r l11849 37 0.3 40.7 2702us a13509 21 0.2 98.7 The r e s ults of the exp eriments show that the pre pr ocess ing time fo r the V ertex Reduction is negligible for all the instances up to 21 2u1060 , i.e., for a lmo st all TSPL IB -based GTSP insta nc e s used in the litera ture. The av erage per cen tage o f detected r edundan t vertices for these instances is 14%, and it is 11% fo r all considered instances . The exp eriment al algor ithm complex ity is ab out O ( N 2 . 4 ). The Edge Re ductio n is more time-consuming than the V er tex Reduction. The running time is negligible for all instances up to 115rat5 75 . Note that in most o f the GTSP literatur e, only instances with N < 500 ar e considered. The av era ge p er cent of the detected redundant edges for these instances is ab out 2 7%, and it is 2 1% for a ll instances in T able 3 . The exp e r imen tal algorithm’s c omplexit y is O ( N 2 . 6 ). 4.2 Algorithms Application Results Certainly , one can doubt the usefulness of our reduction alg o rithms since they may not necessarily decrease the running time of GTSP solvers. Ther efor, we tested the improv ement of the running time o f the following GTSP solvers: 1. Exa ct algor ithm ( Exact ) bas ed on a transformation of GTSP to TSP [2]; the algorithm from [4] was not av a ilable. The algor ithm that we use conv erts a GTSP instanc e with N 9 vertices to a TSP instance with 3 N vertices in p olynomial time, solves the obtained TSP using the Co nco rde solver [1], and then co nverts the obtained TSP solution to GTSP solution also in p olynomial time. 2. Memetic alg orithm from [19] ( SD ). A memetic algorithm (MA) is a comb ination of a genetic algorithm with lo cal search. 3. MA from [7] ( GKK ). 4. MA from [18] ( SG ). 5. A mo dified version of MA from [8], the sta te- of-the-art GTSP memetic s o lv er, ( GK ). Each test was r epeated ten times. The columns of the tables not des cribed in Section 4.1 are as fo llows: • T 0 is the initial pro blem solution time. • B is the time benefit, i.e ., ( T 0 − T pr ) /T 0 , where T pr is the prepro cessed pro blem solution time; it includes pr eproces sing time as well. T a ble 4: Time be nefit for Exact . V ertices Red. Edge Red. Com bined Reductio n Instance T 0 , sec R v , % B , % R e , % B , % R v , % R e , % B , % 5gr21 0 .8 38.1 40 48.7 52 38.0 45.0 56 5ulysses2 2 1.7 50.0 60 44.3 48 50.0 39.5 79 5gr24 0 .2 54.2 74 33.1 53 54.1 10.4 81 6fri26 0.9 50.0 67 28.7 18 50.0 20.3 74 6bayg29 6.0 4 1.4 19 0.0 59 41.3 3 3.6 70 10gr4 8 16.1 37.5 57 27.0 2 37.5 25.5 55 10hk48 5 2.7 12.5 16 34.2 6 1 2.5 32 .3 2 2 11eil51 32.8 17.6 37 32.6 17 17.6 28.8 42 14st70 150.4 17.1 43 36 .5 1 7 17.1 24.6 50 Average 35.4 45.9 31 .7 30.2 35.3 28.9 58.8 The ex periments s ho w that the V ertex Reduction, the Edg e Reduction and the Comb ined Reduction T echnique significantly reduce the running time of the Exact , SD a nd GKK solvers. How ever, the E dge Reduction (and b ecause of tha t the Combined Reduction T echique) is not that successful for SG (T able 7) and the o riginal version of GK . That is b ecause not every algo rithm pro cesses infinite edges well. Next we show that a solver can b e adjusted to work b etter with prepro cessed insta nces. F or this purp o se we mo dified GK as follows: • The 2- opt heuris tic [8] was extended with the cluster o ptimization. F or ev ery iteration of 2-opt, where edges v 1 v 2 and v 3 v 4 are remov ed, instead of r e pla cing them with v 1 v 3 and v 2 v 4 10 T a ble 5: Time be nefit for GKK . V ertices Red. Edge Red. Com bined Reductio n Instance T 0 , sec R v , % B , % R e , % B , % R v , % R e , % B , % 89p cb442 60.7 5.4 4 11.9 17 5.4 9.7 35 99d493 85.2 0.8 14 17.8 1 9 0.8 19.4 29 107att53 2 101.2 3.9 9 20.5 20 3 .9 1 8 .1 2 0 107ali5 35 99.3 5.4 0 16.6 47 5.4 14.3 51 107si5 35 166.1 1 7.9 12 26.5 14 17 .9 17.9 41 113pa5 61 101.8 26.2 15 31.3 21 26.2 22.6 47 115u57 4 103.6 1.9 -3 14.4 12 1.9 14.0 28 115ra t575 219.3 3.1 38 11.2 36 3.1 10.9 45 131p65 4 165.4 13.4 21 32.6 12 13.4 2 8.2 38 132d65 7 189.1 1.2 10 10.8 22 1.2 9.6 24 134gr 666 224.8 0.0 26 11.6 36 0.0 11.6 57 145u72 4 232.9 4.6 25 10.1 29 4.6 8.8 55 157ra t783 392.7 3.1 1 9.8 16 3.1 8.4 29 200dsj10 00 8 98 0.8 6 9.6 5 2 0.8 9.4 51 Average 6.3 1 2.7 16.8 25.2 6.3 14.5 39 .3 we r eplace them with v ′ 1 v 3 and v ′ 2 v 4 , where v ′ 1 ∈ cl uster ( v 1 ) and v ′ 2 ∈ cl uster ( v 2 ) and v ′ 1 and v ′ 2 are selected to minimize the solution ob jective v a lue. (Here cl uster ( v ) is the cluster corres p onding to the vertex v : v ∈ clu ster ( v ).) Thereby , while the initial 2 -opt heuristic could decline some go o d 2-opt if w ( v 1 v 3 ) = ∞ or w ( v 2 v 4 ) = ∞ , the ex tended 2-opt will pass round the infinite edges . • Direct 2-opt heuristic [8] is excluded fro m the Lo cal Search Pro cedure. • Every time befor e starting the Cluster Optimization [8] we remov e all vertices that cannot be included in the solution, i.e., if a fragment of the solutio n corr esponds to clusters C 1 , C 2 and C 3 and there is no edge fro m C 1 to v ∈ C 2 or there is no edg e from v to C 3 then v ca n be ex cluded for the cur r en t Cluster Optimization r un. • Since the mo dified Lo cal Search Pro cedure is more pow erful than the pr evious one, we reduced the n umber of so lutions in a g eneration and the termination c ondition is also changed (now r = 0 . 2 G + 0 . 03 M + 8 while previously r = 0 . 2 G + 0 . 05 M + 1 0 and I cur ≥ max(1 . 5 I max , 0 . 02 5 M + 2) instead of I cur ≥ max(1 . 5 I max , 0 . 05 M + 5), see [8]). The modified algorithm do es not repro duce exactly the r esults o f the initial GK heuristic; it gives a little bit b etter solution qua lit y at the c o st of slightly larg er running times. Howev er, o ne can see (T able 8) that all the Reduction Algor ithms prop osed in this pap er influence the mo dified GK algorithm p ositively . Different reductions hav e different degr ee of succes s for different s olv ers. The Edge Reduction is more efficient than the V ertex Reduction fo r GKK a nd SD ; in other cases the V ertex Reduction is mor e successful. F o r every solver except SG the Combined T echnique is pr eferred to separate reductions. 11 T a ble 6: Time b enefit for SD . V ertices Red. Edge Red. Com bined Reductio n Instance T 0 , sec R v , % B , % R e , % B , % R v , % R e , % B , % 157ra t783 23.6 3.2 11 9 .8 5 3.1 8.4 36 200dsj10 00 100.3 0.8 47 9.6 3 6 0.8 9.4 42 201pr1 002 54 .9 1 .9 1 2 9.2 22 1.9 8 .7 4 3 207si1 032 21.3 8.2 3 12.1 -1 8.2 10.2 24 212u10 60 88 .8 3 .3 8 14.4 35 3.3 11.2 42 217vm10 84 78 .1 22.2 49 24 .0 -2 22 .2 8.9 57 235p cb1173 1 0 7.9 0.9 5 8.2 30 0.9 8.2 32 259d12 91 169.4 3.7 9 12.4 25 3.7 9 .8 2 6 261rl1 304 140.4 1.5 9 7.9 47 1.4 7.2 66 265rl1 323 132.6 1.8 20 7.8 2 0 1.7 7.0 32 276nrw1 379 111.5 0.8 4 7.4 22 0.7 7.1 46 Average 4.4 16.1 1 1 .2 21 .7 4.4 8.7 4 0.5 Prepro cessing is called to reduce the solution time. O n the o ther ha nd, there is no gua ran ty that the outco me of the prepro cessing will b e noticeable. Thus, it is imp ortant to ensur e a t lea st that the pr eproce s sing time is significantly shor ter than the so lution time. Five GTSP s olv ers are co nsidered in this pap er. The fir st so lv er, E xact , is an exa ct o ne and, th us, it is clear that its time complexity is larger than Θ( N 2 . 6 ) (see Section 4.1) or ev en the upp er bo und O ( N 3 ). The time co mplexities of the o ther four solvers were estimated ex perimentally , i.e., exp erimen ts were conducted for pro blems of different size obtained fro m TSPLIB [16] and then an approximation for “solution time”/“insta nc e size” dep endence was found. The exp erimen tal com- plexity of SD is ab out Θ( N 3 ) and it is ab out Θ( N 3 . 5 ) for GK , SG and GKK . T able 9 demonstra tes the q ualit y o f our estimate fo r SD (here T estimate ( N ) = 6 . 3 319 · 1 0 − 8 · N 3 ). Having the solvers time complexities, we can conclude that the prepro cessing time is signifi- cantly smaller than the so lutio n time for arbitrar y lar ge instance s as the ex perimental complexity of prepro cessing is smaller tha n the complexity of even the fastest of the cons ide r ed s olv ers. 5 Conclusion The GTSP reduction techniques allow one to significa n tly decrea s e the pr oblem c omplexit y at a very lo w cost. Exp erimen ts show that the Combined Reductio n is often the most p o werful among the presented a lgorithms and takes even less time than the single Edge Reduction. While the V ertex Reductio n yields very natur al problems and is successful with e very considered solver, the Edge Reductio n changes s ome edge weight s to infinity v a lues and, thus, not every s o lv er b enefits from it. How ever, in this pap er, it is shown that a so lv er can b e modified to pro cess such problems well. In this pap er we cons ide r the symmetric cas e only , i.e., dist( x, y ) = dist ( y, x ) for every pair of 12 T a ble 7 : Time b enefit for SG . V ertices Red. Instance T 0 , sec R v , % B , % 84fl417 .gtsp 4.5 10.3 12 87gr4 31.gtsp 8.3 0.0 6 88pr43 9.gtsp 10.2 2.3 -3 89p cb442.gtsp 11.5 5.4 0 99d493 .gtsp 20.0 0.8 7 107att53 2.gtsp 25 .1 3.9 11 107si5 35.gtsp 16 .9 1 7 .9 34 107ali5 35.gtsp 29.1 5.4 20 113pa5 61.gtsp 14.5 26 .2 3 1 Average 8.0 13 vertices x a nd y . O ther vertex and edge reduction algo rithms that can b e immediately derived from Definitions 1 and 2 exist for the asymmetric cas e, and their time co mplexit y is O ( N 3 ). Recall that N is the total num ber of pro blem vertices. Ac kno wledgem en t W e would like to thank La r ry Sn yder and J ohn Silber ho lz for kindly pr oviding the s ource co des o f SD and SG , resp ectiv ely . References [1] D. Appleg ate, R. E. Bix b y , V. Chv´ atal, and W. J. Co ok. Concorde TSP Solv er. Av ailable at http:/ /www.tsp .gatech.edu . [2] D. Ben-Arieh, G. Gutin, M. Penn, A. Y eo, and A. Zverovitc h. T ransforma tio ns of gener alized A TSP into A TSP , O perations Research Letters 31 (20 03), pp. 357– 365. [3] M. Fischetti, J. J. S. Go nz´ alez, and P . T oth. A Bra nc h-and-Cut a lgorithm for the symmetric generalized trav eling sales man problem. Op erations Research 45 (3) (1997), pp. 37 8–394. [4] M. Fisch etti, J. J. S. Gonz´ alez, and P . T oth. The Generaliz ed T r a veling Sa lesman and Ori- ent eer ing Problems. In The T r aveling Salesman Pr oblem and its V ariations (G. Gutin and A. P unnen, eds.), Kluw er, Dor drec ht, 2 002. [5] R. F ourer, D. M. Gay . Exp erience with a Primal Presolve Algorithm. L ar ge Sc ale Optimization: State of the Art (1994 ), pp. 13 5–154. [6] G. Gutin. T rav eling Sales man Proble ms . In Handb o ok of Gr aph The ory (J. Gross, and J. Y ellen, eds.), CRC Press, 2003. [7] G. Gutin, D. Kara pety an, and N. Krasno gor. A memetic a lg orithm for the asymmetric genera l- ized trav eling salesman problem. In Pro c. NICSO 2007, S tudies in Computational Int el ligenc e 129 (20 08), pp. 199– 210, Spring er. 13 T a ble 8: Time be nefit for GK . V ertices Red. Edge Red. Co m bined Reductio n Instance T 0 , sec R v , % B , % R e , % B , % R v , % R e , % B , % 89p cb442.gtsp 3.43 5.4 16 12 .0 -2 5 .4 9.8 7 99d493 .gtsp 6.36 0.8 2 17.9 0 0.8 1 9.4 2 107att53 2.gtsp 5.9 6 3.9 7 20.6 10 3.9 18.1 11 107si5 35.gtsp 4.5 2 17.9 14 26 .5 8 17.9 18.0 15 107ali5 35.gtsp 8.91 5.4 17 16 .6 1 9 5.4 14 .3 25 113pa5 61.gtsp 6.86 26.2 20 31.3 6 26.2 22.6 23 115u57 4.gtsp 7 .43 1.9 -2 14.4 -6 1 .9 1 4.0 -1 115ra t575.gtsp 7.2 9 3.1 0 11.3 0 3 .1 1 0 .9 2 131p65 4.gtsp 5 .47 13.5 11 3 2.7 2 1 3.5 28 .3 1 3 8.7 9 20.4 4 8.7 1 7.3 11 [8] G. Gutin, and D. Ka rapety an. A memetic algorithm for the generaliz e d trav eling salesman problem. T o app ear in Natura l Computing , Springer 2 0 09. [9] P . Gutman, and I. Ioslovic h. On the generaliz e d W olf problem: Prepr ocessing of nonnega- tive large- scale linear progra mming problems with group co nstrain ts. Automation and Remote Control, V o lume 68, Number 8 , August 2007, pp. 1 401–140 9. [10] H. Huang , X. Y a ng, Z. Hao, C. W u, Y. Liang, and X. Zhao . Hybrid Chromosome Genetic Algorithm for Generalize d T raveling Salesma n Problems. P h ys. Rev. E, America n Physical So ciet y , 2 0 04, 7 0. [11] G. Lap orte, A. Asef-V aziri, a nd C. Srisk andara jah. Some applications of the ge ne r alized trav- elling salesma n problem. Jour nal o f the O perationa l Resea rc h Society 47 (12) (1996 ), pp. 1 461– 1467. [12] G. Lap orte, H. Mercure, and Y. Nobert. A Br anc h and Bound Algorithm for a Cla ss of Asymmetrical V ehicle Routing Problems. The Journal of the Oper ational Resea rc h Socie ty , V ol. 43 , No . 5, Ma thematical P rogramming in Honour of Ailsa Land. (May , 1992 ), pp. 469– 481. [13] G. Lap orte, and F. Semet. Computational e v aluation of a transformatio n pro cedure for the symmetric genera lized tr a veling salesman pro blem, INF OR 37 (1999) (2), pp. 11 4-120. [14] Y. N. Lien, E. Ma , and B. W.-S. W ah (1993 ). T rans fo rmation of the Generalized T rav eling- Salesman Problem into the Standard T rav eling-Sa lesman P roblem. Information Sciences 74 , pp. 1 77–189. [15] C. E . No on, and J. C. Bea n (1993 ). An Efficient T ransforma tion of the Generalized T rav eling Salesman Problem. INF OR 31, pp. 39–4 4 . [16] G. Reinelt. TSPLIB —A traveling sales man problem librar y . ORSA Jour nal on Co mputing. 3 (1991), pp. 376-3 84, http ://www.c rpc.rice.edu/softlib/tsplib/ . 14 T a ble 9: SD work time estimation. Instance na me Real so lution time, sec Estimation, sec 45ts225 0 . 6 0 . 72 45tsp225 0 . 5 0 . 72 46pr22 6 0 . 7 0 . 73 46gr2 29 0 . 8 0 . 76 53gil26 2 0 . 9 1 . 14 53pr26 4 1 . 2 1 . 17 60pr29 9 1 . 3 1 . 69 64lin318 1 . 8 2 . 04 64linhp318 1 . 6 2 . 04 80rd40 0 3 . 5 4 . 05 84fl417 3 . 5 4 . 59 87gr4 31 3 . 7 5 . 07 88pr43 9 4 . 7 5 . 36 89p cb442 5 . 5 5 . 47 107si5 35 5 . 7 9 . 70 113pa5 61 6 . 7 11 . 18 115u57 4 13 . 2 11 . 97 115ra t575 11 . 1 12 . 04 131p65 4 10 . 2 17 . 71 134gr 666 14 . 0 18 . 70 145u72 4 27 . 9 24 . 03 157ra t783 23 . 6 30 . 40 200dsj10 00 100 . 3 63 . 32 201pr1 002 54 . 9 63 . 70 207si1 032 21 . 3 69 . 59 212u10 60 88 . 8 75 . 41 217vm10 84 78 . 1 80 . 65 235p cb1173 107 . 9 102 . 19 259d12 91 169 . 4 136 . 24 261rl1 304 140 . 4 140 . 40 265rl1 323 132 . 6 146 . 63 276nrw1 379 111 . 5 166 . 05 [17] M.W.P . Sav elsb ergh. Prepro cessing and probing techn iques for mixed integer pr ogramming problems. ORSA Journal o n Computing 6 (1 9 94), pp. 4 45–454. [18] J. Silber holz, B. Go lden. The Genera lized T raveling Salesman P roblem: a new Genetic Alg o- rithm appro ac h. Extending the Ho rizons: Adv ances in Computing, Optimization, a nd Decision T echnologies (2 007), pp. 1 65–181. [19] L. V. Snyder, and M. S. Da s kin. A rando m-k ey genetic a lg orithm for the generalized trav eling salesman problem. Europ ean Journa l o f Op erational Resea rc h 174 (2006 ), pp. 38–5 3. 15 [20] M. F. T asge tiren, P . N. Suga n than, and Q.-K. Pan. A discrete particle sw ar m optimizatio n algorithm for the genera lized trav eling salesman pr oblem. GECCO ’07 : Pro ceedings of the 9 th annual conference on Genetic and evolutionary computatio n, 2 007, pp. 15 8–167. [21] X. Zhao, J. Lin, H. Huang, a nd Z. Hao. V oid V er tex Genetic Algo r ithm for Pro duction- Distribution Supply Cha in GTSP Mo del. Jour nal of Information and Computing Science, V ol- ume 1, Number 5, December 20 0 6, pp. 2 5 9–265. 16
Original Paper
Loading high-quality paper...
Comments & Academic Discussion
Loading comments...
Leave a Comment