Document Open Access Logo

Fine-Grained Complexity of k-OPT in Bounded-Degree Graphs for Solving TSP

Authors Édouard Bonnet, Yoichi Iwata, Bart M. P. Jansen , Łukasz Kowalik

Thumbnail PDF


  • Filesize: 0.59 MB
  • 14 pages

Document Identifiers

Author Details

Édouard Bonnet
  • ENS Lyon, LIP, Lyon, France
Yoichi Iwata
  • National Institute of Informatics, Tokyo, Japan
Bart M. P. Jansen
  • Eindhoven University of Technology, Eindhoven, The Netherlands
Łukasz Kowalik
  • Institute of Informatics, University of Warsaw, Poland


This research was initiated at the Shonan Meeting Parameterized Graph Algorithms & Data Reduction: Theory Meets Practice held during March 4 - 8, 2019 in Shonan Village Center, Japan. Yoichi Iwata thanks the Kaggle Traveling Santa 2018 Competition for motivating him to study practical TSP heuristics. He also thanks Shogo Murai for valuable discussion about the possibility of faster k-OPT algorithms.

Cite AsGet BibTex

Édouard Bonnet, Yoichi Iwata, Bart M. P. Jansen, and Łukasz Kowalik. Fine-Grained Complexity of k-OPT in Bounded-Degree Graphs for Solving TSP. In 27th Annual European Symposium on Algorithms (ESA 2019). Leibniz International Proceedings in Informatics (LIPIcs), Volume 144, pp. 23:1-23:14, Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2019)


The Traveling Salesman Problem asks to find a minimum-weight Hamiltonian cycle in an edge-weighted complete graph. Local search is a widely-employed strategy for finding good solutions to TSP. A popular neighborhood operator for local search is k-opt, which turns a Hamiltonian cycle C into a new Hamiltonian cycle C' by replacing k edges. We analyze the problem of determining whether the weight of a given cycle can be decreased by a k-opt move. Earlier work has shown that (i) assuming the Exponential Time Hypothesis, there is no algorithm that can detect whether or not a given Hamiltonian cycle C in an n-vertex input can be improved by a k-opt move in time f(k) n^o(k / log k) for any function f, while (ii) it is possible to improve on the brute-force running time of O(n^k) and save linear factors in the exponent. Modern TSP heuristics are very successful at identifying the most promising edges to be used in k-opt moves, and experiments show that very good global solutions can already be reached using only the top-O(1) most promising edges incident to each vertex. This leads to the following question: can improving k-opt moves be found efficiently in graphs of bounded degree? We answer this question in various regimes, presenting new algorithms and conditional lower bounds. We show that the aforementioned ETH lower bound also holds for graphs of maximum degree three, but that in bounded-degree graphs the best improving k-move can be found in time O(n^((23/135+epsilon_k)k)), where lim_{k -> infty} epsilon_k = 0. This improves upon the best-known bounds for general graphs. Due to its practical importance, we devote special attention to the range of k in which improving k-moves in bounded-degree graphs can be found in quasi-linear time. For k <= 7, we give quasi-linear time algorithms for general weights. For k=8 we obtain a quasi-linear time algorithm when the weights are bounded by O(polylog n). On the other hand, based on established fine-grained complexity hypotheses about the impossibility of detecting a triangle in edge-linear time, we prove that the k = 9 case does not admit quasi-linear time algorithms. Hence we fully characterize the values of k for which quasi-linear time algorithms exist for polylogarithmic weights on bounded-degree graphs.

Subject Classification

ACM Subject Classification
  • Theory of computation → Graph algorithms analysis
  • Theory of computation → Parameterized complexity and exact algorithms
  • traveling salesman problem
  • k-OPT
  • bounded degree


  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    PDF Downloads


  1. Amir Abboud and Virginia Vassilevska Williams. Popular Conjectures Imply Strong Lower Bounds for Dynamic Problems. In Proc. 55th FOCS, pages 434-443. IEEE Computer Society, 2014. URL:
  2. Noga Alon, Raphael Yuster, and Uri Zwick. Finding and Counting Given Length Cycles. Algorithmica, 17(3):209-223, 1997. URL:
  3. Marek Cygan, Lukasz Kowalik, and Arkadiusz Socala. Improving TSP Tours Using Dynamic Programming over Tree Decompositions. In Proc. 25th ESA, volume 87 of LIPIcs, pages 30:1-30:14. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, 2017. URL:
  4. Mark de Berg, Kevin Buchin, Bart M. P. Jansen, and Gerhard J. Woeginger. Fine-Grained Complexity Analysis of Two Classic TSP Variants. In Proc. 43rd ICALP, volume 55 of LIPIcs, pages 5:1-5:14. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, 2016. Google Scholar
  5. Michael L. Fredman, János Komlós, and Endre Szemerédi. Storing a Sparse Table with O(1) Worst Case Access Time. J. ACM, 31(3):538-544, 1984. URL:
  6. Jiong Guo, Sepp Hartung, Rolf Niedermeier, and Ondrej Suchý. The Parameterized Complexity of Local Search for TSP, More Refined. Algorithmica, 67(1):89-110, 2013. URL:
  7. Michael Held and Richard M. Karp. The traveling-salesman problem and minimum spanning trees: Part II. Math. Program., 1(1):6-25, 1971. Google Scholar
  8. Keld Helsgaun. An effective implementation of the Lin-Kernighan traveling salesman heuristic. European Journal of Operational Research, 126(1):106-130, 2000. URL:
  9. Keld Helsgaun. General k-opt submoves for the Lin-Kernighan TSP heuristic. Math. Program. Comput., 1(2-3):119-163, 2009. Google Scholar
  10. D. S. Johnson and L. A. McGeoch. Experimental Analysis of Heuristics for the STSP. In G. Gutin and A. Punnen, editors, The Traveling Salesman Problem and its Variations, pages 369-443. Kluwer Academic Publishers, Dordrecht, 2002. Google Scholar
  11. D.S. Johnson and L.A McGeoch. The traveling salesman problem: A case study in local optimization. In E. Aarts and J.K. Lenstra, editors, Local search in combinatorial optimization, pages 215-310. Wiley, Chichester, 1997. Google Scholar
  12. S. Lin and Brian W. Kernighan. An Effective Heuristic Algorithm for the Traveling-Salesman Problem. Operations Research, 21(2):498-516, 1973. URL:
  13. Dániel Marx. Searching the k-change neighborhood for TSP is W[1]-hard. Oper. Res. Lett., 36(1):31-36, 2008. URL:
  14. Dániel Marx. Can You Beat Treewidth? Theory of Computing, 6(1):85-112, 2010. URL:
  15. Franco P. Preparata and Michael Ian Shamos. Computational Geometry - An Introduction. Texts and Monographs in Computer Science. Springer, 1985. Google Scholar
Questions / Remarks / Feedback

Feedback for Dagstuhl Publishing

Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail