English

Complexity of Token Swapping and its Variants

Computational Complexity 2018-01-08 v3 Discrete Mathematics Data Structures and Algorithms

Abstract

In the Token Swapping problem we are given a graph with a token placed on each vertex. Each token has exactly one destination vertex, and we try to move all the tokens to their destinations, using the minimum number of swaps, i.e., operations of exchanging the tokens on two adjacent vertices. As the main result of this paper, we show that Token Swapping is W[1]W[1]-hard parameterized by the length kk of a shortest sequence of swaps. In fact, we prove that, for any computable function ff, it cannot be solved in time f(k)no(k/logk)f(k)n^{o(k / \log k)} where nn is the number of vertices of the input graph, unless the ETH fails. This lower bound almost matches the trivial nO(k)n^{O(k)}-time algorithm. We also consider two generalizations of the Token Swapping, namely Colored Token Swapping (where the tokens have different colors and tokens of the same color are indistinguishable), and Subset Token Swapping (where each token has a set of possible destinations). To complement the hardness result, we prove that even the most general variant, Subset Token Swapping, is FPT in nowhere-dense graph classes. Finally, we consider the complexities of all three problems in very restricted classes of graphs: graphs of bounded treewidth and diameter, stars, cliques, and paths, trying to identify the borderlines between polynomial and NP-hard cases.

Keywords

Cite

@article{arxiv.1607.07676,
  title  = {Complexity of Token Swapping and its Variants},
  author = {Édouard Bonnet and Tillmann Miltzow and Paweł Rzążewski},
  journal= {arXiv preprint arXiv:1607.07676},
  year   = {2018}
}

Comments

23 pages, 7 Figures

R2 v1 2026-06-22T15:04:27.349Z