Speeding-up the Exploration of the \(3\)-OPT Neighborhood for the TSP

  • Giuseppe Lancia
  • Marcello Dalpasso
Part of the AIRO Springer Series book series (AIROSS, volume 1)


A move of the 3-OPT neighborhood for the Traveling Salesman Problem consists in removing any three edges of the tour and replacing them with three new ones. The standard algorithm to find the best possibble move is cubic, both in its worst and average time complexity. Since TSP instances of interest can have thousands of nodes, up to now it has been impossible to use the 3-OPT local search on anything other than quite small instances. In this paper we describe an alternative algorithm whose average complexity appears to be quadratic and which allowed us to use 3-OPT on instances with several thousand nodes. The algorithm is based on a rule for quickly choosing two out of three edges in a good way, and then completing the choice in linear time. To this end, the algorithm uses max-heaps as a suitable data structure.


Traveling Salesman Problem 3-OPT \(K\)-OPT Local search Average running time 


  1. 1.
    Aarts, E., Lenstra, J.K. (eds.): Local Search in Combinatorial Optimization, 1st edn. Wiley, Inc., New York, NY, USA (1997)Google Scholar
  2. 2.
    Applegate, D.L., Bixby, R.E., Chvatl, V., Cook, W.J.: The Traveling Salesman Problem: A Computational Study. Princeton University Press (2006)Google Scholar
  3. 3.
    Croes, G.A.: A method for solving traveling-salesman problems. Oper. Res. 6(6), 791–812 (1958)MathSciNetCrossRefGoogle Scholar
  4. 4.
    de Berg, M., Buchin, K., Jansen, B., Woeginger, G.J.: Fine-grained complexity analysis of two classic TSP variants. In: 43rd International Colloquium on Automata, Languages, and Programming, ICALP 2016, 11–15 July 2016, Rome, Italy, pp. 5:1–5:14 (2016)Google Scholar
  5. 5.
    Lin, S.: Computer solutions of the traveling salesman problem. Bell Syst. Tech. J. 44(10), 2245–2269 (1965)MathSciNetCrossRefGoogle Scholar
  6. 6.
    Papadimitriou, C.H., Steiglitz, K.: Combinatorial Optimization: Algorithms and Complexity, vol. 01. Prentice Hall (1982)Google Scholar
  7. 7.
    Reinelt, G.: TSPLIB—a traveling salesman problem library. ORSA J. Comput. 3, 376–384 (1991)CrossRefGoogle Scholar
  8. 8.
    Steiglitz, K., Weiner, P.: Some improved algorithms for computer solution of the traveling salesman problem. In: Proceedings of the 6th annual Allerton Conference on System and System Theory, pp. 814–821. University of Illinois, Urbana (1968)Google Scholar

Copyright information

© Springer Nature Switzerland AG 2018

Authors and Affiliations

  1. 1.DMIF, University of UdineUdineItaly
  2. 2.DEI, University of PadovaPadovaItaly

Personalised recommendations