Skip to main content

Sequentially Swapping Tokens: Further on Graph Classes

  • Conference paper
  • First Online:
SOFSEM 2023: Theory and Practice of Computer Science (SOFSEM 2023)

Abstract

We study the following variant of the 15 puzzle. Given a graph and two token placements on the vertices, we want to find a walk of the minimum length (if any exists) such that the sequence of token swappings along the walk obtains one of the given token placements from the other one. This problem was introduced as Sequential Token Swapping by Yamanaka et al. [JGAA 2019], who showed that the problem is intractable in general but polynomial-time solvable for trees, complete graphs, and cycles. In this paper, we present a polynomial-time algorithm for block-cactus graphs, which include all previously known cases. We also present general tools for showing the hardness of problem on restricted graph classes such as chordal graphs and chordal bipartite graphs. We also show that the problem is hard on grids and king’s graphs, which are the graphs corresponding to the 15 puzzle and its variant with relaxed moves.

Partially supported by JSPS KAKENHI Grant Numbers JP17H01698, JP17K19960, JP18H04091, JP20H05793, JP20H05967, JP21K11752, JP21K19765, JP21K21283, JP22H00513. The full version is available at https://arxiv.org/abs/2210.02835.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 64.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 84.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    By a coloring, we mean a mapping from the vertex set to a color set, which is not necessarily a proper coloring.

  2. 2.

    The proofs of the statements marked with \(\bigstar \) are omitted in this short version and can be found in the full version.

References

  1. Aichholzer, O., et al.: Hardness of token swapping on trees. In: ESA 2022. LIPIcs, vol. 244, pp. 3:1–3:15 (2022). https://doi.org/10.4230/LIPIcs.ESA.2022.3

  2. Demaine, E.D., Rudoy, M.: A simple proof that the \((n^{2} - 1)\)-puzzle is hard. Theor. Comput. Sci. 732, 80–84 (2018). https://doi.org/10.1016/j.tcs.2018.04.031

    Article  MATH  Google Scholar 

  3. Diestel, R.: Graph Theory. GTM, vol. 173. Springer, Heidelberg (2017). https://doi.org/10.1007/978-3-662-53622-3

    Book  MATH  Google Scholar 

  4. Garey, M.R., Johnson, D.S.: The rectilinear Steiner tree problem is NP-complete. SIAM J. Appl. Math. 32(4), 826–834 (1977). https://doi.org/10.1137/0132071

    Article  MathSciNet  MATH  Google Scholar 

  5. GungHo Online Entertainment America, Inc.: Puzzle & Dragons, official website. https://www.puzzleanddragons.us/. Accessed 22 July 2022

  6. van den Heuvel, J.: The complexity of change. In: Blackburn, S.R., Gerke, S., Wildon, M. (eds.) Surveys in Combinatorics 2013, London Mathematical Society Lecture Note Series, vol. 409, pp. 127–160. Cambridge University Press (2013). https://doi.org/10.1017/CBO9781139506748.005

  7. Hopcroft, J.E., Tarjan, R.E.: Algorithm 447: efficient algorithms for graph manipulation. Commun. ACM 16(6), 372–378 (1973). https://doi.org/10.1145/362248.362272

    Article  Google Scholar 

  8. Itai, A., Papadimitriou, C.H., Szwarcfiter, J.L.: Hamilton paths in grid graphs. SIAM J. Comput. 11(4), 676–686 (1982). https://doi.org/10.1137/0211056

    Article  MathSciNet  MATH  Google Scholar 

  9. Johnson, W.W., Story, W.E.: Notes on the “15’’ puzzle. Am. J. Math. 2(4), 397–404 (1879). https://doi.org/10.2307/2369492

    Article  MathSciNet  MATH  Google Scholar 

  10. Knuth, D.E., Jr., J.H.M., Pratt, V.R.: Fast pattern matching in strings. SIAM J. Comput. 6(2), 323–350 (1977). https://doi.org/10.1137/0206024

  11. Müller, H.: Hamiltonian circuits in chordal bipartite graphs. Discret. Math. 156(1–3), 291–298 (1996). https://doi.org/10.1016/0012-365X(95)00057-4

    Article  MathSciNet  MATH  Google Scholar 

  12. Müller, H., Brandstädt, A.: The NP-completeness of steiner tree and dominating set for chordal bipartite graphs. Theor. Comput. Sci. 53, 257–265 (1987). https://doi.org/10.1016/0304-3975(87)90067-3

    Article  MathSciNet  MATH  Google Scholar 

  13. Nishimura, N.: Introduction to reconfiguration. Algorithms 11(4), 52 (2018). https://doi.org/10.3390/a11040052

    Article  MathSciNet  MATH  Google Scholar 

  14. Ratner, D., Warmuth, M.K.: The (\(n^{2}-1\))-puzzle and related relocation problems. J. Symb. Comput. 10(2), 111–138 (1990). https://doi.org/10.1016/S0747-7171(08)80001-6

    Article  MATH  Google Scholar 

  15. Trakultraipruk, S.: Connectivity properties of some transformation graphs, Ph. D. thesis, London School of Economics and Political Science, London, UK (2013)

    Google Scholar 

  16. White, K., Farber, M., Pulleyblank, W.R.: Steiner trees, connected domination and strongly chordal graphs. Networks 15(1), 109–124 (1985). https://doi.org/10.1002/net.3230150109

    Article  MathSciNet  MATH  Google Scholar 

  17. Yamanaka, K., et al.: Sequentially swapping colored tokens on graphs. J. Graph Algorithms Appl. 23(1), 3–27 (2019). https://doi.org/10.7155/jgaa.00482

    Article  MathSciNet  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Yota Otachi .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Kiya, H., Okada, Y., Ono, H., Otachi, Y. (2023). Sequentially Swapping Tokens: Further on Graph Classes. In: Gąsieniec, L. (eds) SOFSEM 2023: Theory and Practice of Computer Science. SOFSEM 2023. Lecture Notes in Computer Science, vol 13878. Springer, Cham. https://doi.org/10.1007/978-3-031-23101-8_15

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-23101-8_15

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-23100-1

  • Online ISBN: 978-3-031-23101-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics