Time- and Space-optimal Algorithm for the Many-visits TSP

Andre Berger*, Laszlo Kozma, Matthias Mnich, Roland Vincze

*Corresponding author for this work

Research output: Contribution to journalArticleAcademicpeer-review

6 Citations (Web of Science)


The many-visits traveling salesperson problem (MV-TSP) asks for an optimal tour of n cities that visits each city c a prescribed number k(c) of times. Travel costs may be asymmetric, and visiting a city twice in a row may incur a non-zero cost. The MV-TSP problem finds applications in scheduling, geometric approximation, and Hamiltonicity of certain graph families.The fastest known algorithm for MV-TSP is due to Cosmadakis and Papadimitriou (SICOMP, 1984). It runs in time n(O(n)) + O(n(3) log Sigma(c) k(c)) and requires n(Theta(n)) space. An interesting feature of the Cosmadakis-Papadimitriou algorithm is its logarithmic dependence on the total length Sigma(c) k(c) of the tour, allowing the algorithm to handle instances with very long tours. The superexponential dependence on the number of cities in both the time and space complexity, however, renders the algorithm impractical for all but the narrowest range of this parameter.In this article, we improve upon the Cosmadakis-Papadimitriou algorithm, giving an MV-TSP algorithm that runs in time 2(O(n)), i.e., single-exponential in the number of cities, using polynomial space. The space requirement of our algorithm is (essentially) the size of the output, and assuming the Exponential-Time Hypothesis (ETH), the problem cannot be solved in time 2(o(n)). Our algorithm is deterministic, and arguably both simpler and easier to analyze than the original approach of Cosmadakis and Papadimitriou. It involves an optimization over directed spanning trees and a recursive, centroid-based decomposition of trees.
Original languageEnglish
Article number35
Number of pages22
JournalACM Transactions on Algorithms
Issue number3
Publication statusPublished - Jun 2020


  • TSP
  • spanning trees
  • high-multiplicity scheduling

Cite this