IDEAS home Printed from https://ideas.repec.org/a/inm/orijoc/v37y2025i5p1202-1222.html

Average Case Subquadratic Exact and Heuristic Procedures for the Traveling Salesman 2-OPT Neighborhood

Author

Listed:
  • Giuseppe Lancia

    (Dipartimento di Matematica, Informatica e Fisica, University of Udine, 33100 Udine, Italy)

  • Paolo Vidoni

    (Dipartimento di Scienze Economiche e Statistiche, University of Udine, 33100 Udine, Italy)

Abstract

We describe an exact algorithm for finding the best 2-OPT move that, experimentally, was observed to be much faster than the standard quadratic approach for a large part of a best-improvement local search convergence starting at a random tour. To analyze its average-case complexity, we introduce a family of heuristic procedures and discuss their complexity when applied to a random tour in graphs whose edge costs are either uniform random numbers in [0, 1] or Euclidean distances between random points in the plane. We prove that, for any probability p , there is a heuristic in the family that can find the best 2-OPT move with probability at least p in average-time O ( n log n ) for uniform instances and O ( n ) for Euclidean instances. The exact algorithm is then proved to be even faster in the sense that in those instances in which a heuristic finds the best move, the exact algorithm finds it in a smaller time. We give empirical evidence that a slight variant of our algorithm finds the best move in O ( n ) time on both types of instances, achieving the best possible performance for this particular problem. Computational experiments are reported to show the effectiveness of our algorithms, both in best-improvement and in first-improvement 2-OPT local search.

Suggested Citation

  • Giuseppe Lancia & Paolo Vidoni, 2025. "Average Case Subquadratic Exact and Heuristic Procedures for the Traveling Salesman 2-OPT Neighborhood," INFORMS Journal on Computing, INFORMS, vol. 37(5), pages 1202-1222, September.
  • Handle: RePEc:inm:orijoc:v:37:y:2025:i:5:p:1202-1222
    DOI: 10.1287/ijoc.2023.0169
    as

    Download full text from publisher

    File URL: http://dx.doi.org/10.1287/ijoc.2023.0169
    Download Restriction: no

    File URL: https://libkey.io/10.1287/ijoc.2023.0169?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    References listed on IDEAS

    as
    1. Merrill M. Flood, 1956. "The Traveling-Salesman Problem," Operations Research, INFORMS, vol. 4(1), pages 61-75, February.
    2. Gerhard Reinelt, 1991. "TSPLIB—A Traveling Salesman Problem Library," INFORMS Journal on Computing, INFORMS, vol. 3(4), pages 376-384, November.
    3. S. Lin & B. W. Kernighan, 1973. "An Effective Heuristic Algorithm for the Traveling-Salesman Problem," Operations Research, INFORMS, vol. 21(2), pages 498-516, April.
    4. G. A. Croes, 1958. "A Method for Solving Traveling-Salesman Problems," Operations Research, INFORMS, vol. 6(6), pages 791-812, December.
    5. Lancia, Giuseppe & Vidoni, Paolo, 2020. "Finding the largest triangle in a graph in expected quadratic time," European Journal of Operational Research, Elsevier, vol. 286(2), pages 458-467.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Sheldon H. Jacobson & Shane N. Hall & Laura A. McLay & Jeffrey E. Orosz, 2005. "Performance Analysis of Cyclical Simulated Annealing Algorithms," Methodology and Computing in Applied Probability, Springer, vol. 7(2), pages 183-201, June.
    2. Lucas García & Pedro M. Talaván & Javier Yáñez, 2022. "The 2-opt behavior of the Hopfield Network applied to the TSP," Operational Research, Springer, vol. 22(2), pages 1127-1155, April.
    3. Shaowen Lan & Yongliang Lu & Wenjuan Fan, 2025. "An adaptive variable neighborhood search for the traveling salesman problem with job-times," Journal of Heuristics, Springer, vol. 31(2), pages 1-65, June.
    4. Chris Walshaw, 2002. "A Multilevel Approach to the Travelling Salesman Problem," Operations Research, INFORMS, vol. 50(5), pages 862-877, October.
    5. Francesco Carrabs & Jean-François Cordeau & Gilbert Laporte, 2007. "Variable Neighborhood Search for the Pickup and Delivery Traveling Salesman Problem with LIFO Loading," INFORMS Journal on Computing, INFORMS, vol. 19(4), pages 618-632, November.
    6. J Renaud & F F Boctor & G Laporte, 2004. "Efficient heuristics for Median Cycle Problems," Journal of the Operational Research Society, Palgrave Macmillan;The OR Society, vol. 55(2), pages 179-186, February.
    7. Toni Pacheco & Rafael Martinelli & Anand Subramanian & Túlio A. M. Toffolo & Thibaut Vidal, 2023. "Exponential-Size Neighborhoods for the Pickup-and-Delivery Traveling Salesman Problem," Transportation Science, INFORMS, vol. 57(2), pages 463-481, March.
    8. Daniel Martins & Gabriel M. Vianna & Isabel Rosseti & Simone L. Martins & Alexandre Plastino, 2018. "Making a state-of-the-art heuristic faster with data mining," Annals of Operations Research, Springer, vol. 263(1), pages 141-162, April.
    9. A. S. Santos & A. M. Madureira & M. L. R. Varela, 2018. "The Influence of Problem Specific Neighborhood Structures in Metaheuristics Performance," Journal of Mathematics, Hindawi, vol. 2018, pages 1-14, July.
    10. Gary R. Waissi & Pragya Kaushal, 2020. "A polynomial matrix processing heuristic algorithm for finding high quality feasible solutions for the TSP," OPSEARCH, Springer;Operational Research Society of India, vol. 57(1), pages 73-87, March.
    11. Yuan Sun & Andreas Ernst & Xiaodong Li & Jake Weiner, 2021. "Generalization of machine learning for problem reduction: a case study on travelling salesman problems," OR Spectrum: Quantitative Approaches in Management, Springer;Gesellschaft für Operations Research e.V., vol. 43(3), pages 607-633, September.
    12. Majid Namazi & M. A. Hakim Newton & Conrad Sanderson & Abdul Sattar, 2023. "Solving travelling thief problems using coordination based methods," Journal of Heuristics, Springer, vol. 29(4), pages 487-544, December.
    13. Xujin Chen & Xiaodong Hu & Xiaohua Jia & Zhongzheng Tang & Chenhao Wang & Ying Zhang, 2021. "Algorithms for the metric ring star problem with fixed edge-cost ratio," Journal of Combinatorial Optimization, Springer, vol. 42(3), pages 499-523, October.
    14. G Laporte, 2010. "A concise guide to the Traveling Salesman Problem," Journal of the Operational Research Society, Palgrave Macmillan;The OR Society, vol. 61(1), pages 35-40, January.
    15. Zhou, Fangting & Lischka, Attila & Kulcsár, Balázs & Wu, Jiaming & Haghir Chehreghani, Morteza & Laporte, Gilbert, 2025. "Learning for routing: A guided review of recent developments and future directions," Transportation Research Part E: Logistics and Transportation Review, Elsevier, vol. 202(C).
    16. Konstantin Pavlikov & Niels Christian Petersen, 2025. "Two-commodity opposite direction network flow formulations for the travelling salesman problem," Computational Optimization and Applications, Springer, vol. 92(3), pages 987-1033, December.
    17. Bruce Golden & Zahra Naji-Azimi & S. Raghavan & Majid Salari & Paolo Toth, 2012. "The Generalized Covering Salesman Problem," INFORMS Journal on Computing, INFORMS, vol. 24(4), pages 534-553, November.
    18. Pablo Moscato & Michael G. Norman, 1998. "On the Performance of Heuristics on Finite and Infinite Fractal Instances of the Euclidean Traveling Salesman Problem," INFORMS Journal on Computing, INFORMS, vol. 10(2), pages 121-132, May.
    19. K Sang-Ho & G Young-Gun & K Maing-Kyu, 2003. "Application of the out-of-kilter algorithm to the asymmetric traveling salesman problem," Journal of the Operational Research Society, Palgrave Macmillan;The OR Society, vol. 54(10), pages 1085-1092, October.
    20. Gabriela Ochoa & Nadarajen Veerapen, 2018. "Mapping the global structure of TSP fitness landscapes," Journal of Heuristics, Springer, vol. 24(3), pages 265-294, June.

    More about this item

    Keywords

    ;
    ;
    ;
    ;
    ;

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:inm:orijoc:v:37:y:2025:i:5:p:1202-1222. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Chris Asher (email available below). General contact details of provider: https://edirc.repec.org/data/inforea.html .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.