Skip to main content
Log in

General k-opt submoves for the Lin–Kernighan TSP heuristic

  • Full Length Paper
  • Published:
Mathematical Programming Computation Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Institutional subscriptions

Similar content being viewed by others

References

  1. 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)

  2. 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)

  3. 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)

    MATH  Google Scholar 

  4. Applegate D., Cook W., Rohe A.: Chained Lin–Kernighan for large traveling salesman problems. INFORMS J. Comput. 15, 82–92 (2003)

    Article  MathSciNet  Google Scholar 

  5. Bergeron A.: A very elementary presentation of the Hannenhalli–Pevzner theory. LNCS 2089, 106–117 (2001)

    MathSciNet  Google Scholar 

  6. Caprara, A.: Sorting by reversals is difficult. In: Proceedings of the First International Conference on Computational Molecular Biology, pp. 75–83 (1997)

  7. 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)

  8. Christofides N., Eilon S.: Algorithms for large-scale traveling salesman problems. Oper. Res. Quart. 23, 511–518 (1972)

    Article  MATH  MathSciNet  Google Scholar 

  9. Fredman M.L., Johnson D.S., McGeoch L.A., Ostheimer G.: Data structures for traveling salesmen. J. Algorithms 18(3), 432–479 (1995)

    Article  MATH  MathSciNet  Google Scholar 

  10. 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)

    Article  MATH  Google Scholar 

  11. Gutin G., Punnen A.P.: Traveling Salesman Problem and Its Variations. Kluwer, Dordrecht (2002)

    MATH  Google Scholar 

  12. 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)

    MathSciNet  Google Scholar 

  13. 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)

  14. Held M., Karp R.M.: The traveling-salesman problem and minimum spanning trees. Oper. Res. 18, 1138–1162 (1970)

    Article  MATH  MathSciNet  Google Scholar 

  15. Held M., Karp R.M.: The traveling-salesman problem and minimum spanning trees: Part II. Math. Prog. 1, 6–25 (1971)

    Article  MATH  MathSciNet  Google Scholar 

  16. Helsgaun K.: An effective implementation of the Lin–Kernighan traveling salesman heuristic. EJOR 12, 106–130 (2000)

    Article  MathSciNet  Google Scholar 

  17. Hoos H.H., Stützle T.: Stochastic Local Search: Foundations and Applications. Morgan Kaufmann, Menlo Park (2004)

    Google Scholar 

  18. Johnson D.S.: Local optimization and the traveling salesman problem. LNCS 442, 446–461 (1990)

    Google Scholar 

  19. 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)

  20. 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)

    Google Scholar 

  21. 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)

  22. 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)

  23. 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)

  24. 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)

  25. Lin S., Kernighan B. W.: An effective heuristic algorithm for the traveling-salesman problem. Oper. Res. 21, 498–516 (1973)

    Article  MATH  MathSciNet  Google Scholar 

  26. Mak K.T., Morton A.J.: Distances between traveling salesman tours. Discret. Appl. Math. 58, 281–291 (1995)

    Article  MATH  MathSciNet  Google Scholar 

  27. 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)

    Article  MATH  MathSciNet  Google Scholar 

  28. 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)

    Article  MATH  MathSciNet  Google Scholar 

  29. Möbius A., Freisleben B., Merz P., Schreiber M.: Combinatorial optimization by iterative partial transcription. Phys. Rev. E 59(4), 4667–4674 (1999)

    Article  Google Scholar 

  30. Neto, D.: Efficient Cluster Compensation For Lin–Kernighan Heuristics. PhD thesis, University of Toronto (1999)

  31. Okada, M.: Studies on Probabilistic Analysis of λ-opt for Traveling Salesperson Problems. Doctor’s thesis, Nara Institute of Science and Technology (1999)

  32. Tannier, E., Sagot, M.: Sorting by reversals in subquadratic time. Rapport de recherche No 5097, l’INRIA (2004)

  33. The On-Line Encyclopedia of Integer Sequences. http://www.research.att.com/~njas/sequences/A061714

  34. Zhang, W., Looks, M.: A Novel Local Search Algorithm for the Traveling Salesman Problem that Exploits Backbones. IJCAI 2005, pp. 343–350 (2005)

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Keld Helsgaun.

Rights and permissions

Reprints 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

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s12532-009-0004-6

Keywords

Mathematics Subject Classification (2000)

Navigation