Improved Hardness-Of-Approximation for Token-Swapping
Abstract
We study the token swapping problem, in which we are given a graph with an initial assignment of one distinct token to each vertex, and a final desired assignment (again with one token per vertex). The goal is to find the minimum length sequence of swaps of adjacent tokens required to get from the initial to the final assignment.
The token swapping problem is known to be NP-complete. It is also known to have a polynomial-time 4-approximation algorithm. From the hardness-of-approximation side, it is known to be NP-hard to approximate with a ratio better than 1001/1000.
Our main result is an improvement of the approximation ratio of the lower bound: We show that it is NP-hard to approximate with ratio better than 14/13.
We then turn our attention to the 0/1-weighted version, in which every token has a weight of either 0 or 1, and the cost of a swap is the sum of the weights of the two participating tokens. Unlike standard token swapping, no constant-factor approximation is known for this version, and we provide an explanation. We prove that 0/1-weighted token swapping is NP-hard to approximate with ratio better than for any constant .
Lastly, we prove two barrier results for the standard (unweighted) token swapping problem. We show that one cannot beat the current best known approximation ratio of 4 using a large class of algorithms which includes all known algorithms, nor can one beat it using a common analysis framework.
Keywords and phrases:
algorithms, token-swapping, hardness-of-approximation, lower-boundsFunding:
Sam Hiken: NSF grant CNS-2150186, Paglia Post-Baccalaureate Fellowship.Copyright and License:
2012 ACM Subject Classification:
Theory of computation Approximation algorithms analysis ; Theory of computation Graph algorithms analysisAcknowledgements:
We would like to thank anonymous reviewers for their helpful suggestions.Editors:
Anne Benoit, Haim Kaplan, Sebastian Wild, and Grzegorz HermanSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
In the token swapping problem [1, 8, 2, 25, 30, 31, 32, 35, 18, 9, 10, 16, 20, 17, 36, 21, 29], we are given an undirected -vertex graph , distinct tokens, and two one-to-one assignments of tokens to vertices: a starting assignment, and a target assignment. A swap along an edge switches the locations of the tokens on and . The token swapping problem asks how many swaps are needed to arrive at the target configuration from the starting configuration.
The token swapping problem is a fundamental and well-studied problem, and one of the central problems in the area of reconfiguration algorithms. It has also found relevance in a number of disparate areas including network engineering [2], robot motion planning [12, 28], and game theory [14]. Token swapping (mainly its parallel variant [3, 6, 12, 17, 37]) also has an extensively studied application to qubit routing (e.g. [5, 26, 19, 7, 11, 15, 24, 33]). Algorithms and heuristics for the token swapping problem have also undergone experimental evaluation [23, 27].
The token swapping problem is NP-complete [18], even when the underlying graph is a tree [1]. As a result, the research literature has focused on approximation algorithms. Miltzow, Narins, Okamoto, Rote, Thomas, and Uno gave a 4-approximation [18], which remains the best known. For the special case of trees, there is a 2-approximation, which was independently discovered 3 times using different algorithms [2, 32, 35].
From the hardness side, the above work [18] proved that token swapping is APX-hard (on general graphs). Thus, unless , token swapping does not admit a PTAS, and instead there exists some positive constant for which there is no -approximation. Regarding this constant , they state “We want to point out that a crude estimate for the constant c in [the NP-hardness result] is . We do not believe that it is worth to compute c exactly. Instead, we hope that future research might find reductions with better constants.” This question is the main focus of our work.
We also consider the 0/1-weighted version of token swapping, in which each token has a weight of either 0 or 1, and the cost of a swap is the sum of the weights of the two tokens. Despite being studied in prior work [8, 1], there is no known approximation algorithm for 0/1-weighted token swapping with a non-trivial approximation ratio. Furthermore, there is no known separation between 0/1-weighted token swapping and standard token swapping.
See the introductions of [8] and [1] for a more detailed survey of related work, including a sizable body of work on token swapping for a number of special classes of graphs.
1.1 Our Results
Our main result is the first hardness of approximation result for token swapping with an explicit approximation ratio of “reasonable” magnitude. Specifically, we show that it is NP-hard to obtain better than a -approximation:
Theorem 1.
For any constant , it is NP-hard to approximate token swapping on graphs within a factor of .
Our result is via a reduction from the label cover problem. We note that our result does not rely on the Unique Games Conjecture, and is instead a gap-preserving reduction from a regime of the label cover problem known to be NP-complete.
For 0/1-weighted token swapping, our next result explains the aforementioned gap in the literature by showing a large separation between the 0/1-weighted and unweighted versions. Specifically, we show that it is NP-hard to obtain better than an -approximation for 0/1-weighted token swapping:
Theorem 2.
For any constant , it is NP-hard to approximate weighted token swapping with weights on vertices within a factor of .
Our reduction uses a completely different technique from our main result, and is a much simpler reduction, from the set cover problem. This is notable in comparison to the known reductions in the token swapping literature, which tend to be quite complicated [1, 8, 18, 9].
Our final two results are barrier results regarding the algorithm and analysis techniques that could possibly achieve better than the current best-known approximation ratio of 4 (for standard unweighted token swapping). All known token swapping algorithms have the natural property of local optimality: they never perform a swap that brings both tokens farther from their destinations.111We compare the notion of a locally optimal algorithm to that of an -straying algorithm, introduced in prior work on token swapping for trees [1]. These two notions are incomparable: a swap sequence can have either property without having the other. However, any algorithm that solves token swapping on general graphs must generate an -straying swap sequence: consider the example of a cycle where each token wants to shift over by 1. For this reason, we do not consider -straying algorithms for general graphs, and focus instead on locally optimal algorithms. We show that, strangely, this property must be violated to achieve any approximation ratio better than 4.
Theorem 3.
For any , there exists a token swapping instance so that for any locally optimal swap sequence of length , .
In our second barrier result, we show that a proof technique used by all known analyses of approximation algorithms for token swapping, cannot yield better than a 4-approximation. In particular, all known approximation algorithms for token swapping on general graphs and trees [18, 35, 2] use the following approach to bound the approximation factor. Given a Token Swapping instance , consider the quantity . We observe that , as each swap moves at most two tokens closer to their destinations. Proofs of correctness for approximation algorithms then show that they yield swap sequences of length at most , which implies that the given algorithm is a -approximation. A natural approach to obtaining a -approximation for token swapping on graphs, then, is to show that on any input an algorithm yields a swap sequence of length at most , for some . Below, we show that this approach will not work.
Theorem 4.
For any , there exists a token swapping instance so that .
The proof is given in the full version.
Lastly, in the full version we provide an alternative algorithm that gives a 4-approximation for token swapping (in addition to the known algorithm [18]). While the algorithm of [18] is an extension of the 2-approximation “happy swap algorithm” for trees [2], our algorithm is an extension of the 2-approximation “cycle algorithm” for trees [35].
1.2 Additional Related Work
Token swapping and its variants have been studied from many angles. Exponential-time algorithms and hardness under the Exponential Time Hypothesis (ETH) were studied in [18]. Parameterized complexity was studied in [9], where the authors show that token swapping is W[1]-hard when the parameter is the number of swaps, and show further hardness under ETH. Token swapping has also been studied on a variety of special classes of graphs including cycles [16], stars [21, 20], brooms [17, 8, 31], complete bipartite graphs [35], complete split graphs [36], and cliques [10] (dating back to Cayley in 1849). Colored token swapping has also been studied, where each token has a color and same-colored tokens are indistinguishable [18, 8, 9, 34, 34]. There are also several other models of token movement on graphs such as token sliding, token rotation, and token permutation (see e.g. [28]). See also the introductions of [8] and [1] for more details on the wealth of related work.
2 Preliminaries
Definition 5.
A Token Swapping instance consists of a graph , a set of tokens where , and two one-to-one assignments . We call and the starting and target configurations respectively. A swap along an edge switches the locations of the tokens on and . The token swapping problem asks how many swaps are needed to arrive at the target configuration from the starting configuration.
For a token swapping instance , we denote by the length of the shortest swap sequence. For a vertex , we denote by and the tokens that begin and end on . When a token lies on the vertex of the path , we use the phrase bubbling t across p to denote the sequence of swaps .
We also consider the following weighted variant of Token Swapping:
Definition 6 (Weighted Token Swapping).
An instance of Weighted Token Swapping consists of a graph , together with a set of tokens of size . The weight function assigns to each token a non-negative real weight. As in standard Token Swapping, the one-to-one functions map each token to a unique vertex, giving the starting and target configurations of . The weight of an edge swap is the sum of the weights of the tokens being swapped. The weight of a swap sequence is the sum of the weights of the constitutive edge swaps. The output to is the weight of the lowest-weight swap sequence from the starting to the target configuration.
3 Hardness for standard token swapping
In this section, we prove Theorem 1. See 1 This improves on the lower bound presented in [18], which is roughly . We obtain our lower bound via a gap-preserving reduction from Label-Cover, defined below.
Definition 7 (Label Cover).
An instance of Label-Cover consists of a bipartite graph with vertex set and edge set , together with a finite alphabet , and a set of constraints . Each constraint is a function .
A labelling of is a function which assigns a label to each vertex. For , , a constraint is satisfied if .
We denote by the maximum fraction of constraints in which can be satisfied by any labelling. An instance of the promise problem consists of a label-cover instance with alphabet , together with the guarantee that either or . Here, is a positive constant close to . The following is a seminal result in the theory of hardness of approximation.
Theorem 8.
For any constant , there exists a sufficiently large constant (dependent only on ) such that is NP-hard.
Arora and Lund [4] describe a reduction from 3-SAT which, together with Raz’s Parallel Repetition Theorem [22], implies that Theorem 8 remains true even on instances where the underlying graph is regular. Moreover, we may take the degree to be at least any arbitrarily large constant by creating many copies of our graph and adding a copy of the constraint between every copy of and every copy of . Note that in such an instance . We use a gap-preserving reduction from label-cover to prove Theorem 1.
3.1 Construction
Our reduction maps a label cover instance , where the base graph has degree , to a token swapping instance .
We construct by building a gadget for each as follows. Our construction for starts with a base vertex . We add additional vertices adjacent to , which we call assignment vertices (recall that is the degree in the label-cover instance). To each assignment vertex in we identify a unique edge (where is the label cover edge set) incident to ; we call this assignment vertex . We then create paths, each with as an endpoint. We call these paths label paths. If , then each label path in contains edges; if , then each label path in contains edges. To each label path in we associate a unique , and denote this label path by .
If , then we call a left gadget; otherwise, we call a right gadget. We call an assignment vertex a left (resp. right) assignment vertex if it is in a left (resp. right) gadget. We denote the set of left gadgets by L and the set of right gadgets by R.
Whenever it is the case that the label pair satisfies the constraint , we add a path of edges connecting the endpoint of opposite with the endpoint of opposite . We call such a path a satisfaction path, and denote it by .

This gives our construction for . An illustration of a left and right gadget connected by a satisfaction path given in Figure 1. We construct and as follows. For each , the tokens on and wish to swap positions with each other. That is, , and .
We will refer to such a token as an assignment token. We will call an assignment token where is a left (resp. right) assignment vertex a left (resp. right) assignment token. For that are not assignment tokens, . That is, does not wish to move from its starting position.
The intuition behind the reduction is as follows: if there is a labelling satisfying every constraint in , then all the assignment tokens that start in can move to their destination along the single label path associated with . Then, any assignment token seeking to enter can travel along this path, and will in the process swap with many of the assignment tokens leaving , bringing them closer to their destination. If, on the other hand, no good labelling exists, then having so many efficient swaps becomes impossible.
We prove the following lemma.
Lemma 9.
Let be a label-cover instance whose graph is -regular. The following two claims hold:
-
If , then .
-
If , then .
Given a label-cover instance , the token swapping instance can be computed in polynomial time. We set to be a large constant and a small constant, and the hardness result of Theorem 1 follows from Lemma 9. In Section 3.2, we briefly discuss the proof of the first half of Lemma 9 (completeness), with a proof given in the full version. In Section 3.3, we prove the second half (soundness).
3.2 Completeness
3.3 Soundness
In this section, we will prove the second half of Lemma 9: if , then .
Let be a label-cover instance such that , and let denote the optimal sequence of swaps on . For a token , consider the subsequence of in which is one of the tokens being swapped. This subsequence traces out a walk in . Consider the path from to obtained by removing all the closed sub-walks from this walk. We denote this path .
We now partition the assignment tokens into two types: detour tokens and non-detour (assignment) tokens.
Definition 10 (Detour token).
A token is a detour token if:
-
is an assignment vertex.
-
has more than edges.
We will refer to all other assignment tokens as non-detour tokens. This allows us to introduce the following notation: (resp. ) is the number of detour tokens such that is a left (resp. right) assignment vertex. We will denote by the set of detour tokens, and the set of non-detour tokens.
We obtain lower bounds on two quantities: , the number of swaps occurring within satisfaction paths, and , the number of swaps occurring within gadgets.
| (1) | ||||
| (2) |
Combining these inequalities proves the second half of Lemma 9.
3.3.1 Swaps on satisfaction paths
First, we prove inequality 1.
Observation 11.
If is a detour token, then contains at least three satisfaction paths as subpaths.
Observation 11 follows from the construction of ; any path of length greater than with a left assignment vertex and a right assignment vertex as endpoints traverses at least three satisfaction paths. Therefore, we can associate to each detour token a sequence of at least three satisfaction paths. We refer to the path(s) in this sequence which are not the first or last path as the intermediate path(s) of . Each detour token has at least one intermediate path.
Claim 12.
contains at least swaps where at least one token is a detour token visiting one of its intermediate paths.
Proof.
There are detour tokens, each of which participates in at least swaps on intermediate paths. Each swap involves at most tokens, hence the bound of .
Furthermore, let denote the number of swaps that participates in on satisfaction paths that are not intermediate paths. For , . For , . Unfortunately, we cannot simply add these quantities together to obtain a lower bound on the number of swaps on satisfaction paths. This is because a swap may be between two different assignment tokens, so adding these quantities would risk double-counting. However, we can obtain an upper-bound on the amount of double-counting that can take place, using the following definition.
Definition 13 (Efficient satisfaction swap).
A swap between assignment tokens and is an efficient satisfaction swap if one of the following is the case:
-
1.
neither nor is a detour token,
-
2.
one of or is not a detour token, the other is a detour token not on an intermediate path, and the swap is contained in , where is the detour token, or
-
3.
and are detour tokens, neither is on an intermediate path, and the swap is contained in , where is or .
Let denote the number of efficient satisfaction swaps in . Combining Definition 13 with Claim 12, we obtain the following inequality:
which implies that
| (3) |
We give an upper bound on . We do so by proving individual upper bounds on each of the three types of efficient satisfaction swaps outlined in Definition 13.
Swaps of type 1: neither not is a detour token. Because the label-cover graph is simple, each edge is mapped by our reduction to a unique pair of assignment vertices, those being and . Therefore, any satisfaction path is traversed by at most two non-detour assignment tokens, those being and . It follows that any non-detour token can swap on a satisfaction path with at most one other non-detour token Because there are non-detour assignment tokens, we obtain the following upper bound on swaps of type 1:
Swaps of type 2: one of or is not a detour token, and the other is a detour token not on an intermediate path. Again, any satisfaction path is traversed by at most two non-detour assignment tokens, those being and . A detour token moving across can swap with only one, depending on the direction in which it is moving. Because each detour token traverses exactly two non-intermediate satisfaction paths, the number of swaps of type 2 is at most:
Swaps of type 3: and are detour tokens, but neither is on an intermediate path. Each detour token participates in at most a combined swaps on the first and last satisfaction paths that it visits. Each of these swaps involves at most such tokens, implying that the number of swaps of type 3 is at most:
Combining these bounds with inequality 3, we are left with the following lower bound on :
as desired.
3.3.2 Swaps on gadgets
Next, we prove inequality 2:
Any assignment token participates in at least swaps within label paths: swaps on a left label path and swaps on a right label path. Moreover, we can identify the two label paths, one in a left gadget and one in a right gadget, which come at either end of . We refer to these paths as the first and last legs of . Note that the first leg of comes in the gadget containing ’s start vertex, and the last leg comes in the gadget containing ’s target vertex.
A swap which corresponds to an edge in the first leg of one token and the last leg of another token we will call an efficient gadget swap. Note that such a swap appears in both and . We denote the number of efficient gadget swaps in by , and we denote the number of efficient gadget swaps occurring within the gadget by . We observe that
| (4) |
and we seek an upper bound on accordingly.
To this end, we define the outflow of a label path to be the number of tokens whose first leg is , and the inflow of to be the number of tokens whose last leg is . For , we call the label path in with the maximum outflow (resp. inflow) the out-dominant (resp. in-dominant) label path of . We denote by (resp. ) the outflow (resp. inflow) of the out-dominant (resp. in-dominant) label path in . We obtain two inequalities.
Claim 14.
For any gadget ,
-
-
.
Proof.
We prove the first inequality. Let be an assignment token. Suppose is in . Then participates in at most efficient gadget swaps on , as at most such swaps can occur on the label path taken by . There are tokens where is an assignment vertex in , hence the bound of . The proof of the second inequality is symmetric.
Claim 15.
If , then
Proof.
We prove the first half of the claim; the proof of the second half is symmetric. Suppose for contradiction the first inequality does not hold. The left side of the inequality counts two quantities: (a) the total outflow from the out-dominant label path of each left gadget, plus (b) the total inflow to the in-dominant label path of each right gadget. Each left assignment token can contribute at most 1 to (a) and at most 1 to (b). Because is the total number of assignment tokens and the graph is regular (so ), there are exactly left assignment tokens. As a result, even if the maximum number of left assignment tokens are contributing to only one of (a) or (b), at least contribute to both. Therefore, there are at least non-detour tokens starting in left gadgets which have an out-dominant label path as a first leg and an in-dominant label path as a last leg. Let be such a token. Because is a non-detour token, there is a satisfaction path between ’s first and last legs. By our construction, the constraint in the label cover instance associated with is satisfied by the labelling corresponding to ’s first and last legs. Consider a labelling of which assigns to the label corresponding to the out-dominant label path of , and to the label corresponding to the in-dominant label path of . There are at least constraints satisfied by this labelling, which is a contradiction. We average the inequalities in Claim 14 and rearrange some terms to obtain the new bound for any :
and we average the two inequalities in Claim 15 to obtain
Combining these bounds, we arrive at the following inequality:
which implies
which, combined with inequality 4:
implies inequality 2:
4 Hardness for 0/1-Weighted Token Swapping
We prove the following theorem: See 2 We proceed via a reduction from the Set Cover problem, defined below.
Definition 16 (Set Cover).
An instance of Set-Cover consists of a finite universe set , together with subsets . We seek to find the size of the smallest collection of subsets in so that each element of is in at least one subset.
Dinur and Steurer [13] prove the following theorem:
Theorem 17.
For any constant , it is NP-hard to approximate Set Cover within a factor of .
We give a gap-preserving reduction from Set Cover to Weighted Token Swapping. We describe the reduction in the full version, proving the desired lower-bound.
5 Additional barriers to improved algorithms
In this section, we discuss two barriers to obtaining a -approximation for unweighted token swapping on graphs. The first barrier (Theorem 3 is against a broad class of algorithms that encompasses all known approximation algorithms for token swapping. The second barrier (Theorem 4) shows that the technique used to prove approximation factors for existing algorithms cannot be used to prove an approximation factor of for any . The proof of Theorem 4 is given in the full version of the paper.
5.1 A barrier against a general class of algorithms
We define the following property for swap sequences on a Token Swapping instance.
Definition 18 (Local Optimality).
A swap sequence is locally optimal if every swap between tokens and does not move both and further from their destinations.
All known algorithms for token swapping on trees or on general graphs work by returning the length of a swap sequence that is locally optimal.
See 3 We construct a token swapping instance as follows. See Figure 2. Let and be parameters to be decided later. We can assume is even. We begin with a cycle of length . Starting with an arbitrary vertex, we label the vertices in one direction (say, clockwise) around the cycle. We partition the vertices of into consecutive “segments”. For any , the vertices form the -th segment. If is even, we call such a segment an even segment; else it is an odd segment. For any so that is in an even segment, the token starting on has target vertex . If is in an odd segment, the token starting on has target vertex . That is, each token in an even segment wants to move to the corresponding vertex in the next even segment in the clockwise direction, while each token in an odd segment wants to move to the next odd segment over in the counter-clockwise direction. For each , we add a path of edges between and . All the vertices on this path (except the endpoints in ) wish to stay on their start vertices. We call these paths inner paths. We call the vertices in outer vertices, and all other vertices inner vertices. Tokens that begin on outer vertices (which also have destinations on outer vertices) we call outer tokens; other tokens are inner tokens. Outer tokens with start and target vertices in even segments we will call even tokens; other outer tokens we will call odd tokens. Note that each outer token begins on a vertex connected to its target vertex by an inner cycle. The outer cycle, together with a single inner cycle, is depicted in Figure 2.

Claim 19.
.
Proof.
Here is a swap sequence bringing every token to its destination vertex:
-
1.
For :
-
(a)
If is an odd token, bubble it counter-clockwise around across edges.
-
(a)
-
2.
Again, for :
-
(a)
If is an odd token, bubble it counter-clockwise around across edges.
-
(a)
We check that the above swap sequence brings every token to its target vertex. No swap occurs on an edge in an inner cycle, so none of the inner tokens are displaced. Suppose (the token starting on ) is an odd outer token. It is not difficult to see that when is bubbled edges counter-clockwise, it only swaps with even tokens (this is because any odd token from the same segment was already bubbled edges counter-clockwise during a previous iteration). Thus, each odd token is bubbled counter-clockwise times, and each even token is bubbled clockwise times. This brings every token to its target node.
Claim 20.
Let be the shortest locally optimal swap sequence bringing every token to its destination, and let be the length of . Then .
We observe that for , the inner paths form a cycle, which we will call the -th inner cycle, denoted . Moreover, every token begins on a vertex in the same inner cycle as its target vertex. Claim 20 will follow from the next two claims.
Claim 21.
Let be in the same inner cycle , and let be a path from to containing at least one edge not in . Then , where is the number of edges in .
Proof.
We will prove the claim in two steps. First, we will modify to obtain a path which is the same length as and which does not contain any edges from inner cycles other than , but which contains at least one edge from . Then, we will show that any path from to which contains edges from (and only from) both and has length at least .
Suppose contains edges outside of . If does not contain edges from a different inner cycle, then we set to and move on to the argument in the next paragraph. Otherwise, contains an edge from a different inner cycle. Let be such that is the inner cycle containing . Suppose is, in particular, the first edge to appear in which is in an inner cycle other than . Therefore, is incident to a vertex so that , and is contained in either or . We can assume by symmetry that is contained in . Because is a shortest path, it is simple. By the construction of the graph then, contains the entirety of . Let be the last vertex in preceding in . Because is incident to an outer vertex, the path between and only has edges in . The length of the sub-path of from the appearance of to is then . We replace this sub-path with the following path: the shortest path in from to , then the shortest path in from to . The length of this path is at most , so we have not increased the length of , but we have decreased the number of edges from an inner cycle other than . We repeat this procedure until we obtain a path which does not contain any edges from inner cycles other than .
We have a simple path which contains edges only from and , and at least one edge from . Then there exists a consecutive sub-path in of edges from of length , as this is the number of edges needed to go from one vertex in to another while traversing . However, this sub-path can be replaced by the sub-path of length between its endpoints using only edges from . Therefore, . For in , and for not in which is a neighbor of , it is the case that . Otherwise, there would be a path from to containing the edge of length at most , even though is not in , which contradicts Claim 21. Because each token starts in the same inner cycle as its target vertex, this implies that any swap across an edge in is not locally optimal. We proceed by proving a lower bound on the number of swaps needed to bring all the tokens in to their target vertex without leaving .
Claim 22.
For any , the number of swaps needed to bring all of the tokens on to their target vertices while swapping only along edges in is greater than .
Proof.
Suppose without loss of generality that is in an even segment; by our construction, all the other outer vertices in are also in even segments. Moreover, each outer vertex in begins with a token which wants to move to the closest outer vertex in in the clockwise direction, of distance away. All inner tokens want to stay on their start vertices. Note that has length , and contains outer vertices.
In a given swap, one token in is moved clockwise, and the other counter-clockwise. For a token , let be the number of swaps in the optimal swap sequence on in which is moved clockwise, and the number of times its moved counter-clockwise.
Let be an inner token in . Because has the same start and target, . If is an outer vertex in , then . Because each swap moves one token clockwise and one token counter-clockwise, . It follows there is a token where (else, each token in would end on its start vertex). By our construction, the distance from ’s start vertex to its target in the counter-clockwise direction is at least , so .
If there is an additional token so that , then there are at least swaps in the optimal swap sequence, as desired. Otherwise, there are at least outer tokens in which are not moved counter-clockwise at least times. Each is involved in at least swaps where it is the token being moved clockwise. Moreover, at most 1 of these swaps is with , because if a pair of tokens swap at least twice, then both swaps can be removed to yield an equivalent swap sequence. This results in a total of at least
swaps, as desired. Because there are inner cycles, the total number of swaps taken by a sequence with only locally optimal swaps is at least , proving Claim 20. We set to be large enough so that overtakes the smaller-order terms, so that for the parameter ,
This proves Theorem 3.
References
- [1] Oswin Aichholzer, Erik D. Demaine, Matias Korman, Anna Lubiw, Jayson Lynch, Zuzana Masárová, Mikhail Rudoy, Virginia Vassilevska Williams, and Nicole Wein. Hardness of token swapping on trees. In 30th annual European Symposium on Algorithms, volume 244 of LIPIcs. Leibniz Int. Proc. Inform., pages Art. No. 3, 15. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2022. doi:10.4230/LIPIcs.ESA.2022.3.
- [2] S.B. Akers and B. Krishnamurthy. A group-theoretic model for symmetric interconnection networks. IEEE Transactions on Computers, 38(4):555–566, 1989. doi:10.1109/12.21148.
- [3] Noga Alon, F. R. K. Chung, and R. L. Graham. Routing permutations on graphs via matchings. SIAM J. Discrete Math., 7(3):513–530, 1994. doi:10.1137/S0895480192236628.
- [4] Sanjeev Arora and Carsten Lund. Hardness of approximation. In Dorit S. Hochbaum, editor, Approximation Algorithms for NP-Hard Problems, chapter 10, pages 399–446. PWS Publishing, Boston, 2004.
- [5] Avah Banerjee, Xin Liang, and Rod Tohid. Locality-aware qubit routing for the grid architecture. In 2022 IEEE International Parallel and Distributed Processing Symposium Workshops (IPDPSW), pages 607–613. IEEE, 2022.
- [6] Indranil Banerjee and Dana Richards. New results on routing via matchings on graphs. In Fundamentals of computation theory, volume 10472 of Lecture Notes in Comput. Sci., pages 69–81. Springer, Berlin, 2017. doi:10.1007/978-3-662-55751-8_7.
- [7] Aniruddha Bapat, Andrew M Childs, Alexey V Gorshkov, and Eddie Schoute. Advantages and limitations of quantum routing. PRX Quantum, 4(1):010313, 2023.
- [8] Ahmad Biniaz, Kshitij Jain, Anna Lubiw, Zuzana Masárová, Tillmann Miltzow, Debajyoti Mondal, Anurag Murty Naredla, Josef Tkadlec, and Alexi Turcotte. Token swapping on trees. Discrete Math. Theor. Comput. Sci., 24(2):Paper No. 9, 37, 2022. doi:10.46298/DMTCS.8383.
- [9] Édouard Bonnet, Tillmann Miltzow, and Paweł Rzążewski. Complexity of token swapping and its variants. Algorithmica, 80(9):2656–2682, 2018. doi:10.1007/s00453-017-0387-0.
- [10] Arthur Cayley. Lxxvii. note on the theory of permutations. The London, Edinburgh, and Dublin Philosophical Magazine and Journal of Science, 34(232):527–529, 1849.
- [11] Andrew M. Childs, Eddie Schoute, and Cem M. Unsal. Circuit transformations for quantum architectures. In 14th Conference on the Theory of Quantum Computation, Communication and Cryptography, volume 135 of LIPIcs. Leibniz Int. Proc. Inform., pages Art. No. 3, 24. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2019.
- [12] Erik D. Demaine, Sándor P. Fekete, Phillip Keldenich, Henk Meijer, and Christian Scheffer. Coordinated motion planning: reconfiguring a swarm of labeled robots with bounded stretch. SIAM J. Comput., 48(6):1727–1762, 2019. doi:10.1137/18M1194341.
- [13] Irit Dinur and David Steurer. Analytical approach to parallel repetition. In Proceedings of the Forty-Sixth Annual ACM Symposium on Theory of Computing, STOC ’14, pages 624–633, New York, NY, USA, 2014. Association for Computing Machinery. doi:10.1145/2591796.2591884.
- [14] Laurent Gourvès, Julien Lesca, and Anaëlle Wilczynski. Object allocation via swaps along a social network. In 26th International Joint Conference on Artificial Intelligence (IJCAI’17), pages 213–219, 2017. doi:10.24963/IJCAI.2017/31.
- [15] Takehiro Ito, Naonori Kakimura, Naoyuki Kamiyama, Yusuke Kobayashi, and Yoshio Okamoto. Algorithmic theory of qubit routing. In Algorithms and data structures, volume 14079 of Lecture Notes in Comput. Sci., pages 533–546. Springer, Cham, 2023. doi:10.1007/978-3-031-38906-1_35.
- [16] Mark R. Jerrum. The complexity of finding minimum-length generator sequences. Theoret. Comput. Sci., 36(2-3):265–289, 1985. doi:10.1016/0304-3975(85)90047-7.
- [17] Jun Kawahara, Toshiki Saitoh, and Ryo Yoshinaka. The time complexity of permutation routing via matching, token swapping and a variant. J. Graph Algorithms Appl., 23(1):29–70, 2019. doi:10.7155/jgaa.00483.
- [18] Tillmann Miltzow, Lothar Narins, Yoshio Okamoto, Günter Rote, Antonis Thomas, and Takeaki Uno. Approximation and hardness of token swapping. In 24th Annual European Symposium on Algorithms (ESA), volume 57 of LIPIcs. Leibniz Int. Proc. Inform., pages Art. No. 66, 15. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2016.
- [19] Abtin Molavi, Amanda Xu, Martin Diges, Lauren Pick, Swamit Tannu, and Aws Albarghouthi. Qubit mapping and routing via maxsat. In 2022 55th IEEE/ACM international symposium on Microarchitecture (MICRO), pages 1078–1091. IEEE, 2022. doi:10.1109/MICRO56248.2022.00077.
- [20] Igor Pak. Reduced decompositions of permutations in terms of star transpositions, generalized Catalan numbers and -ary trees. Discrete Math., 204(1-3):329–335, 1999. doi:10.1016/S0012-365X(98)00377-X.
- [21] Frederick J Portier and Theresa P Vaughan. Whitney numbers of the second kind for the star poset. European Journal of Combinatorics, 11(3):277–288, 1990. doi:10.1016/S0195-6698(13)80127-8.
- [22] Ran Raz. A parallel repetition theorem. SIAM Journal on Computing, 27(3):763–803, 1998. doi:10.1137/S0097539795280895.
- [23] Bruno Schmitt, Mathias Soeken, and Giovanni De Micheli. Symbolic algorithms for token swapping. In 2020 IEEE 50th International Symposium on Multiple-Valued Logic—ISMVL 2020, pages 28–33. IEEE Computer Soc., Los Alamitos, CA, 2020. doi:10.1109/ISMVL49045.2020.00-34.
- [24] Asim Sharma and Avah Banerjee. Noise-aware token swapping for qubit routing. In 2023 IEEE International Conference on Quantum Computing and Engineering (QCE), volume 1, pages 82–88. IEEE, 2023. doi:10.1109/QCE57702.2023.00018.
- [25] Zhizhang Shen and Ke Qiu. On the Whitney numbers of the second kind for the star poset: comment on [European J. Combin. 11 (1990), no. 3, 277–288; mr1059558] by F. J. Portier and T. P. Vaughan. European J. Combin., 29(7):1585–1586, 2008. doi:10.1016/j.ejc.2007.11.026.
- [26] Marcos Yukio Siraichi, Vinícius Fernandes dos Santos, Caroline Collange, and Fernando Magno Quintão Pereira. Qubit allocation as a combination of subgraph isomorphism and token swapping. Proceedings of the ACM on Programming Languages, 3(OOPSLA):1–29, 2019. doi:10.1145/3360546.
- [27] Pavel Surynek. Finding optimal solutions to token swapping by conflict-based search and reduction to sat. In 2018 IEEE 30th International Conference on Tools with Artificial Intelligence (ICTAI), pages 592–599. IEEE, 2018. doi:10.1109/ICTAI.2018.00096.
- [28] Pavel Surynek. Multi-agent path finding with generalized conflicts: An experimental study. In International Conference on Agents and Artificial Intelligence, pages 118–142. Springer, 2019. doi:10.1007/978-3-030-37494-5_7.
- [29] Caio Henrique Segawa Tonetti, Vinicius Fernandes dos Santos, and Sebastián Urrutia. Polynomial time algorithms for the token swapping problem on cographs. RAIRO Oper. Res., 58(1):441–455, 2024. doi:10.1051/ro/2023134.
- [30] Theresa P. Vaughan. Bounds for the rank of a permutation on a tree. J. Combin. Math. Combin. Comput., 10:65–81, 1991.
- [31] Theresa P. Vaughan. Factoring a permutation on a broom. J. Combin. Math. Combin. Comput., 30:129–148, 1999.
- [32] Theresa P. Vaughan and Frederick J. Portier. An algorithm for the factorization of permutations on a tree. J. Combin. Math. Combin. Comput., 18:11–31, 1995.
- [33] Friedrich Wagner, Andreas Bärmann, Frauke Liers, and Markus Weissenbäck. Improving quantum computation by optimized qubit routing. J. Optim. Theory Appl., 197(3):1161–1194, 2023. doi:10.1007/s10957-023-02229-w.
- [34] Katsuhisa Yamanaka, Erik D. Demaine, Takashi Horiyama, Akitoshi Kawamura, Shin-ichi Nakano, Yoshio Okamoto, Toshiki Saitoh, Akira Suzuki, Ryuhei Uehara, and Takeaki Uno. Sequentially swapping colored tokens on graphs. J. Graph Algorithms Appl., 23(1):3–27, 2019. doi:10.7155/jgaa.00482.
- [35] Katsuhisa Yamanaka, Erik D. Demaine, Takehiro Ito, Jun Kawahara, Masashi Kiyomi, Yoshio Okamoto, Toshiki Saitoh, Akira Suzuki, Kei Uchizawa, and Takeaki Uno. Swapping labeled tokens on graphs. Theoret. Comput. Sci., 586:81–94, 2015. doi:10.1016/J.TCS.2015.01.052.
- [36] Gaku Yasui, Kouta Abe, Katsuhisa Yamanaka, and Takashi Hirayama. Swapping labeled tokens on complete split graphs. Inf. Process. Soc. Japan. SIG Tech. Rep, 14:1–4, 2015.
- [37] Louxin Zhang. Optimal bounds for matching routing on trees. SIAM J. Discrete Math., 12(1):64–77, 1999. doi:10.1137/S0895480197323159.
