# IntraClusTSP—An Incremental Intra-Cluster Refinement Heuristic Algorithm for Symmetric Travelling Salesman Problem

^{1}

^{2}

^{3}

^{*}

## Abstract

**:**

## 1. Introduction

^{2}) variables and subtour elimination constraints. As a direct solution is unfeasible, the model is relaxed to find a solution. In the proposal [8] a novel representation form was introduced to reduce the number of subtour elimination constraints. In Reference [9], the related integer linear programming problem is based on the two-commodity network flow formulation of the TSP.

^{N}N

^{2}). Another drawback of the method is that it raises a significant space requirement too.

## 2. Incremental and Segmentation-Based Approaches in Solving eTSP

## 3. IntraClusTSP: Intra-Cluster Refinement Method for Incremental sTSP

#### 3.1. Motivations for the Development of a Novel Algorithm

- -
- The proposed method performs a tour improvement and not an initial tour construction (unlike the Greedy, Nearest Neighbour or Savings methods).
- -
- The segments may be overlapping; the same segment can be processed several times.
- -
- The proposed model can be used as an incremental TSP construction method. The new item is inserted into the current route using the simple Random point insertion method and then a cluster level refinement phase is executed.
- -
- The link between a segment and the main route is very flexible, there may be any number of connection edges
- -
- It differs from the k-opt, Lin-Kernighan and Helsgaun methods because the size of the sub-graph to be improved may be arbitrary and the algorithm of the subgraph optimization can be considered as a black box optimization.
- -
- Unlike the multi-level approach, this method performs a single level edge fixing and not a hierarchic refinement.
- -
- Unlike the tour-merging method, the method generates only a sub-tour to be replaced in the original tour.

#### 3.2. Formal Model and Algorithm of the Proposed Method

Algorithm 1: Ic_optim (V, T) |

1: // V: set of all vertexes |

2: // T: current optimal tour |

3: // l: length of current tour |

4: // W: set of clusters |

5: // Tc: candidate tour |

6: l : = d(T); // calculate tour length |

7: W := gen-clusters(V); // generate clusters |

8: for each VL in W do // loop on clusters |

9: // refinement of the local route |

10: Tc := Intra-cluster_reordering (V, VL, T); |

11: lc = d(Tc); // calculate tour length |

12: if lc < l then |

13: T := Tc; |

14: l : = lc; |

15: end if; |

16: end for; |

Algorithm 2: Intra-cluster_reordering (V, VL, T) |

1: // V: set of all vertexes |

2: // VL: set of cluster vertexes |

3: // T: current optimal tour |

4: // B: set of border vertexes |

5: // ET: set of external tour segments of T |

6: // VLB: the extended local vertex set for local optimization |

7: // DL: adjusted distance matrix for the VLB set |

8: // TL: the local optimal tour |

9: (B, ET) : = partition_tour (T, VL); // determine inner and outer sections |

10: VLB := VL union B; // replace outer sections with port symbols |

11: DL := gen_dist(VLB); // generate distance matrix |

12: TL := Optim (VLB, DL); // generate optimal local route |

13: Tnew : = merge (T, TL, B); // update global route |

14: Return (Tnew); // the new global optimal tour |

## 4. Cost Analysis of the Cluster Level Refinement Method

- N: number of vertices in V;
- f: cost function of the local optimization algorithm;
- N′: number of vertices in local cluster V′;

## 5. Performance Evaluation Tests for Local Refinements

- (a)
- General refinement of initial tour using arbitrary internal/local TSP optimization method;
- (b)
- Application of refinement for a specific local area;
- (c)
- Incremental route generation.

#### 5.1. Evaluation Methodology

#### 5.2. Nearest Neighbour Direct Construction Algorithm

#### 5.3. GA and Hierarchical GA Refinement Algorithms

#### 5.4. Nearest Insertion Algorithm with Two_Opt Refinement

#### 5.5. Chained Lin-Kernighan Refinement Algorithm

#### 5.6. Convergence of the IntraClusTSP Refinement Method

- -
- size of the cluster (large clusters can provide larger improvements but they require larger execution time)
- -
- quality of the cluster-level route (the quality shows how far is the length of the current route from the optimal length)

- N (number of nodes): 400, 800, 1200
- r (relative radius of the clusters): 0.1, 0.2, 0.3
- m (number of iteration steps): 25

- -
- Similar to the convergence of the base LK method, the convergence ratio is significantly larger in the first few iteration steps. In Figure 16, a sample convergence example is presented as a route length—iteration count function for the input parameters (N = 400, r = 0.2)
- -
- The convergence ratio is larger for larger cluster sizes. Figure 17 shows the comparison run for three different cluster size values. The bottom (solid) line belongs to r = 0.3 (large clusters); the middle (dashed) line relates to r = 0.2 and the top (dotted) line belongs to r = 0.1. The reason of the fact that the curves may have local plateau is that the clusters are selected here randomly, thus there is a chance to select areas already processed before. In this case, only little improvement can be achieved.
- -
- The convergence as relative length reduction is not very sensitive to the graph size but as the experiments show, in larger graphs we can achieve larger length reduction and a better convergence. In Figure 18, the results for three different sizes are summarized. The bottom (solid) line belongs to N = 1200 (large graph); the middle (dashed) line relates to N = 800 and the top (dotted) line belongs to N = 400.

## 6. Performance Evaluation Tests for Incremental TSP

- -
- Random insertion with random position (RR);
- -
- Random insertion with smallest single distance (RS);
- -
- Random insertion with smallest route length increase (RI);
- -
- Random insertion with smallest single distance with IntraClusTSP refinement (RCI);
- -
- Chained Lin-Kernighan method on the whole graph (LK).

## 7. Application in Data Mining

Algorithm 3: Histogram of edge length containing M bins |

1: CL := cluster level descriptors; |

2: g : = 0; // cluster level index |

3: for each i in (1 to M) do |

4: b := H[i]; // current bin |

5: b.count := count of edges in the bin |

6: b.length := average edge length in the bin |

7: bp := the previous not empty bin |

8: if b.count > 0 then |

9: L_g := the average edge length in the current cluster level CL[g]; |

10: L_a : = b.length – bp.length; |

11: if L_a > alpha * L_l then |

12: g = g + 1; //create a new cluster level |

13: add b to CL[g]; |

14: else |

15: add b to CL[g]; |

16: end if |

17: bp : = b; |

18: end if |

19: end for |

20: Calculate the GMDD distributions for the cluster levels |

- column (observed): the real clustering structure observed by humans. The column contains one or two numbers. The first number denotes the number of clusters at the first clustering level, while the second value is the cluster counter of the second level.
- column (gap-A): cluster count proposed by gap analysis using the first maximum optimum criteria;
- column (gap-B): cluster count proposed by gap analysis using the Tibs2001Semax optimum criteria;
- column (silhouette): cluster count given by the Silhouette method;
- column (multi-level GMDD): cluster count calculated by our proposed multi-level GMDD-based method;
- column (time [silhouette]): the execution time of the Silhouette method in milliseconds;
- column (time [gap]): the execution time of the gap statistics method in milliseconds;
- column (time [ml GMDD]): the execution time of our proposed multi-level GMDD method in milliseconds.

- -
- Only our proposed method can discover the multi-level clustering structure, while the current standard methods are aimed at determining the cluster count of the first clustering level.
- -
- In most cases, the proposed method could discover the hidden clustering structure.
- -
- Our proposed method could provide the best accuracy in all test cases.
- -
- The proposed method requires significantly less execution time.

## 8. Conclusions

- refinement of existing routes;
- extension of any existing TSP optimization methods;
- perform a region-level refinement in large graphs;
- implement an efficient incremental route construction method.

- investigate the application for real life TSP problems;
- adapt the proposed algorithm to specific TSP problems like multi-level vehicle routing problem in logistics;
- discover the deeper behaviour of the corresponding permutation space.

## Author Contributions

## Funding

## Conflicts of Interest

## References

- Zhao, C.; Parhami, B. Symmetric Agency Graphs Facilitate and Improve the Quality of Virtual Network Embedding. Symmetry
**2018**, 10, 63. [Google Scholar] [CrossRef] - Jiang, W.; Zhai, Y.; Zhuang, Z.; Martin, P.; Zhao, Z.; Liu, J.B. Vertex Labeling and Routing for Farey-Type Symmetrically-Structured Graphs. Symmetry
**2018**, 10, 407. [Google Scholar] [CrossRef] - José, M.V.; Zamudio, G.S. Symmetrical Properties of Graph Representations of Genetic Codes: From Genotype to Phenotype. Symmetry
**2018**, 10, 388. [Google Scholar] [CrossRef] - Ball, F.; Geyer-Schulz, A. How Symmetric Are Real-World Graphs? A Large-Scale Study. Symmetry
**2018**, 10, 29. [Google Scholar] [CrossRef] - Akiyama, T.; Nishizeki, T.; Saito, N. NP-completeness of the Hamiltonian cycle problem for bipartite graphs. J. Inf. Process.
**1980**, 3, 73–76. [Google Scholar] - Laporte, G. The Traveling Salesman Problem: An overview of exact and approximate algorithms. Eur. J. Oper. Res.
**1992**, 59, 231–247. [Google Scholar] [CrossRef] - Dantzig, G.B.; Fulkerson, D.R.; Johnson, S.M. Solution of a large-scale traveling-salesman problem. Oper. Res.
**1954**, 2, 393–410. [Google Scholar] [CrossRef] - Miller, C.E.; Tucker, A.W.; Zemlin, R.A. Integer programming formulations and traveling salesman problems. J. Assoc. Comput. Mach.
**1960**, 7, 326–329. [Google Scholar] [CrossRef] - Baldacci, R.; Hadjiconstantinou, E.; Mingozzi, A. An exact algorithm for the traveling salesman problem with deliveries and collections. Netw. Int. J.
**2003**, 42, 26–41. [Google Scholar] [CrossRef] - Held, M.; Karp, R.M. A dynamic programming approach to sequencing problems. J. Soc. Ind. Appl. Math.
**1962**, 10, 196–210. [Google Scholar] [CrossRef] - Bomze, I.M.; Budinich, M.; Pardalos, P.M.; Pelillo, M. The maximum clique problem. In Handbook of Combinatorial Optimization; Springer: Boston, MA, USA, 1999; pp. 1–74. [Google Scholar]
- Carpaneto, G.; Toth, P. Some new branching and bounding criteria for the asymmetric travelling salesman problem. Manag. Sci.
**1980**, 26, 736–743. [Google Scholar] [CrossRef] - Hougardy, S.; Wilde, M. On the nearest neighbor rule for the metric traveling salesman problem. Discret. Appl. Math.
**2015**, 195, 101–103. [Google Scholar] [CrossRef] [Green Version] - Monnot, J. A note on the traveling salesman reoptimization problem under vertex insertion. Inf. Process. Lett.
**2015**, 115, 435–438. [Google Scholar] [CrossRef] - Schuetz, P.; Caflisch, A. Efficient modularity optimization by multistep greedy algorithm and vertex mover refinement. Phys. Rev.
**2008**, 77, 046112. [Google Scholar] [CrossRef] [PubMed] - Borůvka, O. “O jistémproblémuminimálním” [About a certain minimal problem]. Prácemor. Přírodověd. Spol. vBrně III
**1926**, 3, 37–58, (In Czech and German). [Google Scholar] - Xiang, Z.; Chen, Z.; Gao, X.; Wang, X.; Di, F.; Li, L.; Zhang, Y. Solving large-scale TSP using a fast wedging insertion partitioning approach. Math. Probl. Eng.
**2015**, 2015, 854218. [Google Scholar] [CrossRef] - Mosheiov, G. The travelling salesman problem with pick-up and delivery. Eur. J. Oper. Res.
**1994**, 79, 299–310. [Google Scholar] [CrossRef] - Weise, T.; Chiong, R.; Lassig, J.; Tang, K.; Tsutsui, S.; Chen, W.; Yao, X. Benchmarking optimization algorithms: An open source framework for the traveling salesman problem. IEEE Comput. Intell. Mag.
**2014**, 9, 40–52. [Google Scholar] [CrossRef] - Genova, K.; Williamson, D.P. An experimental evaluation of the best-of-many Christofides’ algorithm for the traveling salesman problem. Algorithmica
**2017**, 78, 1109–1130. [Google Scholar] [CrossRef] - Ma, Z.; Liu, L.; Sukhatme, G.S. An adaptive k-opt method for solving traveling salesman problem. In Proceedings of the 2016 IEEE 55th Conference on Decision and Control (CDC), Las Vegas, NV, USA, 12–14 December 2016; Volume 1, pp. 6537–6543. [Google Scholar]
- Lin, S.; Kernighan, B.W. An effective heuristic algorithm for the traveling-salesman problem. Oper. Res.
**1973**, 21, 498–516. [Google Scholar] [CrossRef] - Ismkhan, H. Effective three-phase evolutionary algorithm to handle the large-scale colorful traveling salesman problem. Expert Syst. Appl.
**2017**, 67, 148–162. [Google Scholar] [CrossRef] - Valdez, F.; Melin, P.; Castillo, O. A survey on nature-inspired optimization algorithms with fuzzy logic for dynamic parameter adaptation. Expert Syst. Appl.
**2014**, 41, 6459–6466. [Google Scholar] [CrossRef] - Kóczy, L.T.; Földesi, P.T.; Szabó, B. An effective Discrete Bacterial Memetic Evolutionary Algorithm for the Traveling Salesman Problem. Int. J. Intell. Syst.
**2017**, 32, 862–876. [Google Scholar] [CrossRef] - Imran, A.; Salhi, S.; Wassan, N.A. A variable neighborhood-based heuristic for the heterogeneous fleet vehicle routing problem. Eur. J. Oper. Res.
**2009**, 197, 509–518. [Google Scholar] [CrossRef] [Green Version] - Cook, W.; Seymour, P. Tour merging via branch-decomposition. INFORMS J. Comput.
**2003**, 15, 233–248. [Google Scholar] [CrossRef] - Johnson, D.; McGeoch, L. Experimental Analysis of Heuristics for the STSP. In The Traveling Salesman Problem and Its Variations; Springer: Boston, MA, USA, 2007; pp. 369–443. [Google Scholar]
- Johnson, D.S.; McGeoch, L.A. The traveling salesman problem: A case study in local optimization. Local Search Comb. Optim.
**1997**, 1, 215–310. [Google Scholar] - Golden, B.; Bodin, L.; Doyle, T.; Stewart, W., Jr. Approximate traveling salesman algorithms. Oper. Res.
**1980**, 28, 694–711. [Google Scholar] [CrossRef] - Azar, Y. Lower bounds for insertion methods for TSP. Comb. Probab. Comput.
**1994**, 3, 285–292. [Google Scholar] [CrossRef] - Rosenkrantz, D.J.; Stearns, R.E.; Lewis, P.M. An analysis of several heuristics for the traveling salesman problem. SIAM J. Comput.
**1977**, 6, 563–581. [Google Scholar] [CrossRef] - Hurkens, C.A. Nasty TSP instances for farthest insertion. In Proceedings of the 2nd Integer Programming and Combinatorial Optimization Conference, Pittsburgh PA, USA, 25–27 May 1992; Carnegie Mellon University: Pittsburgh, PA, USA, 1992. [Google Scholar]
- Cronin, T.M. Maintaining Incremental Optimality When Building Shortest Euclidean Tours (No. CSWD-92-TRF-0042); Army Cecom Signals Warfare: Warrenton, VA, USA, 1990. [Google Scholar]
- Mladenović, N. An efficient general variable neighborhood search for large travelling salesman problem with time windows. Jugoslav J. Oper. Res.
**2016**, 23, 19–30. [Google Scholar] [CrossRef] - Ariyasingha, I.D.; Fernando, T.G. Performance analysis of the multi-objective ant colony optimization algorithms for the traveling salesman problem. Swarm Evol. Comput.
**2015**, 23, 11–26. [Google Scholar] [CrossRef] - Gendreau, M.; Hertz, A.; Laporte, G. New insertion and postoptimization procedures for the traveling salesman problem. Oper. Res.
**1992**, 40, 1086–1094. [Google Scholar] [CrossRef] - Chisman, J.A. The clustered traveling salesman problem. Comput. Oper. Res.
**1975**, 2, 115–119. [Google Scholar] [CrossRef] - Jongens, K.; Volgenant, T. The symmetric clustered traveling salesman problem. Eur. J. Oper. Res.
**1985**, 19, 68–75. [Google Scholar] [CrossRef] - Mulder, S.; Wunsch, D., II. Million city traveling salesman problem solution by divide and conquer clustering with adaptive resonance neural networks. Neural Netw.
**2003**, 16, 827–832. [Google Scholar] [CrossRef] - Applegate, D.; Cook, W. Solving large-scale matching problems. In Network Flows and Matching: First DIMACS Mathematical Problems in Engineering 7 Implementation Challenge; American Mathematical Society: Providence, RI, USA, 1993; pp. 557–576. [Google Scholar]
- Verhoeven, M.G.A.; Aarts, E.H.L.; Swinkels, P.C.J. A parallel 2-opt algorithm for the traveling salesman problem. Future Gener. Comput. Syst.
**1995**, 11, 175–182. [Google Scholar] [CrossRef] - Karp, R.M. Probabilistic analysis of partitioning algorithms for the traveling-salesman problem in the plane. Math. Oper. Res.
**1977**, 2, 209–224. [Google Scholar] [CrossRef] - Bentley, J.J. Fast algorithms for geometric traveling salesman problems. ORSA J. Comput.
**1992**, 4, 387–411. [Google Scholar] [CrossRef] - El-Samak, A.F.; Ashour, W. Optimization of traveling salesman problem using affinity propagation clustering and genetic algorithm. J. Artif. Intell. Soft Comput. Res.
**2015**, 5, 239–245. [Google Scholar] [CrossRef] - Phienthrakul, T. Clustering evolutionary computation for solving travelling salesman problems. Int. J. Adv. Comput. Sci. Inf. Technol.
**2014**, 3, 243–262. [Google Scholar] - Psychas, I.D.; Delimpasi, E.; Marinaki, Y. Hybrid evolutionary algorithms for the multiobjective traveling salesman problem. Expert Syst. Appl.
**2015**, 42, 8956–8970. [Google Scholar] [CrossRef] - Bednarik, L.; Kovács, L. Efficiency analysis of quality threshold clustering algorithms. Prod. Syst. Inf. Eng.
**2012**, 6, 1275–1285. [Google Scholar] - Garnier, R.; Taylor, J. Discrete Matrhematics for New Technolology; IoP Publisher: Bristol, UK, 2001. [Google Scholar]
- Sugar, C.A.; James, G.M. Finding the number of clusters in a dataset: An information-theoretic approach. J. Am. Stat. Assoc.
**2003**, 98, 750–763. [Google Scholar] [CrossRef] - Haroun, S.A.; Jamal, B.; Hicham, E.H. A Performance Comparison of GA and ACO Applied to TSP. Int. J. Comput. Appl.
**2015**, 117, 28–35. [Google Scholar] [CrossRef] [Green Version] - Richter, D.; Goldengorin, B.; Jäger, G.; Molitor, P. Improving the efficiency of Helsgaun’s Lin-Kernighan heuristic for the symmetric TSP. In Proceedings of the Workshop on Combinatorial and Algorithmic Aspects of Networking, Halifax, NS, Canada, 14 August 2007; pp. 99–111. [Google Scholar]
- Walshaw, C. A Multilevel Lin-Kernighan-Helsgaun Algorithm for the Travelling Salesman Problem; CMS Press: London, UK, 2001. [Google Scholar]
- Ma, F.M.; Guo, Y.J.; Yi, P.T. Cluster-reliability-induced OWA operators. Int. J. Intell. Syst.
**2017**, 32, 823–836. [Google Scholar] [CrossRef] - Rousseeuw, P.J.; Kaufman, L. Finding groups in data. Ser. Probab. Math. Stat.
**2003**, 34, 111–112. [Google Scholar] - Tibshirani, R.; Walther, G.; Hastie, T. Estimating the number of clusters in a data set via the gap statistic. J. R. Stat. Soc. Ser. B (Stat. Methodol.)
**2001**, 63, 411–423. [Google Scholar] [CrossRef] [Green Version] - Kass, R.E.; Raftery, A.E. Bayes factors. J. Am. Stat. Assoc.
**1995**, 90, 773–795. [Google Scholar] [CrossRef] - Yang, X.; Kong, F.; Xu, W.; Liu, B. Gaussian mixture density modeling and decomposition with weighted likelihood. J. Men’s Health
**2004**, 5, 4245–4249. [Google Scholar] - Liu, Y.; Li, Z.; Xiong, H.; Gao, X.; Wu, J. Understanding of internal clustering validation measures. In Proceedings of the 2010 IEEE International Conference on Data Mining, Sydney, Australia, 13–17 December 2010; pp. 911–916. [Google Scholar]

**Figure 14.**Relative efficiency of the proposed NN-initialized NI-2opt cluster level refinement method.

**Figure 17.**Comparison of the convergence for different cluster radius values (solid line: r = 0.3, dashed line: r = 0.2; dotted line: r = 0.1).

**Figure 18.**Comparison of the convergence for different graph size values (solid line: N = 1200, dashed line: N = 800; dotted line: N = 400).

N | TL Linkern | TL Nearest | TL Arbitrary | T Linkern | T Nearest | T Arbitrary |
---|---|---|---|---|---|---|

600 | 18 | 23 | 20 | 1 | 2 | 1 |

1200 | 25 | 32 | 29 | 1 | 6 | 1 |

1800 | 31 | 39 | 35 | 2 | 36 | 1 |

2400 | 35 | 44 | 40 | 2 | 90 | 1 |

3000 | 39 | 50 | 45 | 3 | 150 | 2 |

Method | Increase |
---|---|

RR | 1253 |

RS | 17 |

RI | 11 |

RCI | 9.3 |

LK | −1.2 |

Parameter | Level 0 | Level 1 | Level 2 |
---|---|---|---|

Mean length | 10.8 | 81.4 | 497.5 |

Standard deviation | 5.7 | 33.5 | 33.5 |

Size | 120 | 12 | 3 |

Observed | Gap A | Gap B | Silhouette | Multi-Level GMDD | Time [Silhouette] | Time [Gap] | Time [mL GMDD] |
---|---|---|---|---|---|---|---|

12 + 3 | 14 | 3 | 5 | 12+3 | 52 | 2890 | 1 |

12 + 3 | 14 | 3 | 4 | 12+3 | 57 | 2991 | 1 |

1 | 32 | 3 | 3 | 1 | 52 | 1850 | 1 |

1 | 32 | 3 | 3 | 1 | 53 | 1859 | 1 |

5 | 20 | 11 | 4 | 5 | 54 | 1920 | 1 |

5 | 32 | 7 | 2 | 7 | 54 | 1950 | 1 |

5 | 20 | 11 | 4 | 5 | 42 | 2010 | 1 |

6 | 32 | 9 | 2 | 6 | 56 | 1980 | 1 |

6 + 2 | 32 | 7 | 3 | 7 + 2 | 47 | 1940 | 1 |

© 2018 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Kovács, L.; Iantovics, L.B.; Iakovidis, D.K.
IntraClusTSP—An Incremental Intra-Cluster Refinement Heuristic Algorithm for Symmetric Travelling Salesman Problem. *Symmetry* **2018**, *10*, 663.
https://doi.org/10.3390/sym10120663

**AMA Style**

Kovács L, Iantovics LB, Iakovidis DK.
IntraClusTSP—An Incremental Intra-Cluster Refinement Heuristic Algorithm for Symmetric Travelling Salesman Problem. *Symmetry*. 2018; 10(12):663.
https://doi.org/10.3390/sym10120663

**Chicago/Turabian Style**

Kovács, László, László Barna Iantovics, and Dimitris K. Iakovidis.
2018. "IntraClusTSP—An Incremental Intra-Cluster Refinement Heuristic Algorithm for Symmetric Travelling Salesman Problem" *Symmetry* 10, no. 12: 663.
https://doi.org/10.3390/sym10120663