Abstract
We investigate the computational complexity of the following problem. We are given a graph in which each vertex has the current and target colors. Each pair of adjacent vertices can swap their current colors. Our goal is to perform the minimum number of swaps so that the current and target colors agree at each vertex. When the colors are chosen from \(\{1,2,\dots ,c\}\), we call this problem \(c\) -Colored Token Swapping since the current color of a vertex can be seen as a colored token placed on the vertex. We show that \(c\) -Colored Token Swapping is NP-complete for every constant \(c \ge 3\) even if input graphs are restricted to connected planar bipartite graphs of maximum degree 3. We then show that \(2\) -Colored Token Swapping can be solved in polynomial time for general graphs and in linear time for trees.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Cayley, A.: Note on the theory of permutations. Philosophical Magazine 34, 527–529 (1849)
Dyer, M.E., Frieze, A.M.: Planar 3DM is NP-complete. Journal of Algorithms 7, 174–184 (1986)
Feng, X., Meng, Z., Sudborough, I.H.: Improved upper bound for sorting by short swaps. In: Proc. IEEE Symposium on Parallel Architectures, Algorithms and Networks, pp. 98–103 (2004)
Feng, X., Sudborough, I.H., Lu, E.: A fast algorithm for sorting by short swap. In: Proc. IASTED International Conference Computational and Systems Biology, pp. 62–67 (2006)
Garey, M.R., Johnson, D.S.: Computers and Intractability: A Guide to the Theory of NP-Completeness. Freeman (1979)
Heath, L.S., Vergara, J.P.C.: Sorting by short swaps. Journal of Computational Biology 10(5), 775–789 (2003)
Jerrum, M.R.: The complexity of finding minimum-length generator sequence. Theoretical Computer Science 36, 265–289 (1985)
Knuth, D.E.: The art of computer programming, 2nd edn., vol. 3. Addison-Wesley (1998)
Korte, B., Vygen, J.: Combinatorial Optimization: Theory and Algorithms, 2nd edn. Springer (2005)
Pak, I.: Reduced decompositions of permutations in terms of star transpositions, generalized catalan numbers and \(k\)-ary trees. Discrete Mathematics 204, 329–335 (1999)
Yamanaka, K., Demaine, E.D., Ito, T., Kawahara, J., Kiyomi, M., Okamoto, Y., Saitoh, T., Suzuki, A., Uchizawa, K., Uno, T.: Swapping labeled tokens on graphs. Theoretical Computer Science (2015) (accepted)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2015 Springer International Publishing Switzerland
About this paper
Cite this paper
Yamanaka, K. et al. (2015). Swapping Colored Tokens on Graphs. In: Dehne, F., Sack, JR., Stege, U. (eds) Algorithms and Data Structures. WADS 2015. Lecture Notes in Computer Science(), vol 9214. Springer, Cham. https://doi.org/10.1007/978-3-319-21840-3_51
Download citation
DOI: https://doi.org/10.1007/978-3-319-21840-3_51
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-21839-7
Online ISBN: 978-3-319-21840-3
eBook Packages: Computer ScienceComputer Science (R0)