Abstract
Local search with k-exchange neighborhoods, k-opt, is the most widely used heuristic method for the traveling salesman problem (TSP). This paper presents an effective implementation of k-opt in LKH-2, a variant of the Lin–Kernighan TSP heuristic. The effectiveness of the implementation is demonstrated with experiments on Euclidean instances ranging from 10,000 to 10,000,000 cities. The runtime of the method increases almost linearly with the problem size. LKH-2 is free of charge for academic and non-commercial use and can be downloaded in source code.
Similar content being viewed by others
References
Applegate, D., Bixby, R., Chvátal, V., Cook, W.: Concorde: a code for solving traveling salesman problems. http://www.tsp.gatech.edu/concorde.html (1999)
Applegate, D., Bixby R., Chvátal V., Cook W.: Finding tours in the TSP. Technical Report 99885, Forschungsinstitut für Diskrete Mathematik, Universität Bonn (1999)
Applegate D., Bixby R., Chvátal V., Cook W.: Implementing the Dantzig–Fulkerson–Johnson algorithm for large traveling salesman problems. Math. Prog. 97, 91–153 (2003)
Applegate D., Cook W., Rohe A.: Chained Lin–Kernighan for large traveling salesman problems. INFORMS J. Comput. 15, 82–92 (2003)
Bergeron A.: A very elementary presentation of the Hannenhalli–Pevzner theory. LNCS 2089, 106–117 (2001)
Caprara, A.: Sorting by reversals is difficult. In: Proceedings of the First International Conference on Computational Molecular Biology, pp. 75–83 (1997)
Chandra, B., Karloff, H., Tovey, C.: New results on the old k-opt algorithm for the TSP. In: Proceedings of the 5th Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 150–159 (1994)
Christofides N., Eilon S.: Algorithms for large-scale traveling salesman problems. Oper. Res. Quart. 23, 511–518 (1972)
Fredman M.L., Johnson D.S., McGeoch L.A., Ostheimer G.: Data structures for traveling salesmen. J. Algorithms 18(3), 432–479 (1995)
Funke B., Grünert T., Irnich S.: Local search for vehicle routing and scheduling problems: review and conceptual integration. J. Heuristics 11, 267–306 (2005)
Gutin G., Punnen A.P.: Traveling Salesman Problem and Its Variations. Kluwer, Dordrecht (2002)
Hanlon P.J., Stanley R.P., Stembridge J.R.: Some combinatorial aspects of the spectra of normally distributed random matrices. Contemp. Math. 138, 151–174 (1992)
Hannenhalli, S., Pevzer, P.A.: Transforming cabbage into turnip: polynomial algorithm for sorting signed permutations by reversals. In: Proceedings of the 27th ACM-SIAM Symposium on Theory of Computing, pp. 178–189 (1995)
Held M., Karp R.M.: The traveling-salesman problem and minimum spanning trees. Oper. Res. 18, 1138–1162 (1970)
Held M., Karp R.M.: The traveling-salesman problem and minimum spanning trees: Part II. Math. Prog. 1, 6–25 (1971)
Helsgaun K.: An effective implementation of the Lin–Kernighan traveling salesman heuristic. EJOR 12, 106–130 (2000)
Hoos H.H., Stützle T.: Stochastic Local Search: Foundations and Applications. Morgan Kaufmann, Menlo Park (2004)
Johnson D.S.: Local optimization and the traveling salesman problem. LNCS 442, 446–461 (1990)
Johnson, D.S., McGeoch, L.A., Rothberg, E.E.: Asymptotic experimental analysis for the Held–Karp traveling salesman bound. In: Proceedings of 7th Ann. ACM-SIAM Symp. on Discrete Algorithms, pp. 341–350 (1996)
Johnson D.S., McGeoch L.A.: The traveling salesman problem: a case study in local optimization. In: Aarts, E.H.L., Lenstra, J.K. (eds) Local Search in Combinatorial Optimization, pp. 215–310. Wiley, New York (1997)
Johnson, D.S., McGeoch, L.A., Glover, F., Rego, C.: Proceedings of the 8th DIMACS Implementation Challenge: The Traveling Salesman Problem. http://www.research.att.com/~dsj/chtsp/ (2000)
Johnson, D.S., McGeoch, L.A.: Experimental analysis of heuristics for the STSP. In: Gutin, G, Punnen, A., (eds.) The Traveling Salesman Problem and Its Variations, pp. 369–443 (2002)
Kaplan, H., Shamir, R., Tarjan, R.E.: Faster and simpler algorithm for sorting signed permutations by reversals. In: Proceedings of 8th annual ACM-SIAM Symp. on Discrete Algorithms (SODA 97), pp. 344–351 (1997)
Lawler, E.L., Lenstra, J.K., Rinnooy Kan, A.H.G., Shmoys, D.B. (eds.): The Traveling Salesman Problem: A Guided Tour of Combinatorial Optimization. Wiley, New York (1985)
Lin S., Kernighan B. W.: An effective heuristic algorithm for the traveling-salesman problem. Oper. Res. 21, 498–516 (1973)
Mak K.T., Morton A.J.: Distances between traveling salesman tours. Discret. Appl. Math. 58, 281–291 (1995)
Martin O., Otto S.W., Felten E.W.: Large-step Markov chains for the TSP incorporating local search heuristics. Oper. Res. Lett. 11, 219–224 (1992)
Mendivil D., Shonkwiler R., Spruill M.C.: An analysis of random restart and iterated improvement for global optimization with an application to the traveling salesman problem. J. Optim. Theory Appl. 124(4), 407–433 (2005)
Möbius A., Freisleben B., Merz P., Schreiber M.: Combinatorial optimization by iterative partial transcription. Phys. Rev. E 59(4), 4667–4674 (1999)
Neto, D.: Efficient Cluster Compensation For Lin–Kernighan Heuristics. PhD thesis, University of Toronto (1999)
Okada, M.: Studies on Probabilistic Analysis of λ-opt for Traveling Salesperson Problems. Doctor’s thesis, Nara Institute of Science and Technology (1999)
Tannier, E., Sagot, M.: Sorting by reversals in subquadratic time. Rapport de recherche No 5097, l’INRIA (2004)
The On-Line Encyclopedia of Integer Sequences. http://www.research.att.com/~njas/sequences/A061714
Zhang, W., Looks, M.: A Novel Local Search Algorithm for the Traveling Salesman Problem that Exploits Backbones. IJCAI 2005, pp. 343–350 (2005)
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Helsgaun, K. General k-opt submoves for the Lin–Kernighan TSP heuristic. Math. Prog. Comp. 1, 119–163 (2009). https://doi.org/10.1007/s12532-009-0004-6
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s12532-009-0004-6