Skip to main content

On the Computational Complexity of Generalized Common Shape Puzzles

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

Abstract

In this study, we investigate the computational complexity of some variants of generalized puzzles. We are provided with two sets \(\mathcal{S}_1\) and \(\mathcal{S}_2\) of polyominoes. The first puzzle asks us to form the same shape using polyominoes in \(\mathcal{S}_1\) and \(\mathcal{S}_2\). We demonstrate that this is polynomial-time solvable if \(\mathcal{S}_1\) and \(\mathcal{S}_2\) have constant numbers of polyominoes, and it is strongly NP-complete in general. The second puzzle allows us to make copies of the pieces in \(\mathcal{S}_1\) and \(\mathcal{S}_2\). That is, a polyomino in \(\mathcal{S}_1\) can be used multiple times to form a shape. This is a generalized version of the classical puzzle known as the common multiple shape puzzle. For two polyominoes P and Q, the common multiple shape is a shape that can be formed by many copies of P and many copies of Q. We show that the second puzzle is undecidable in general. The undecidability is demonstrated by a reduction from a new type of undecidable puzzle based on tiling. Nevertheless, certain concrete instances of the common multiple shape can be solved in a practical time. We present a method for determining the common multiple shape for provided tuples of polyominoes and outline concrete results, which improve on the previously known results in the puzzle community.

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 59.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 79.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.

    https://www.thinkfun.com/about-us/awards/.

  2. 2.

    https://www.iread.it/Poly/.

  3. 3.

    https://sicherman.net/polycur.html.

  4. 4.

    In Japan, we use (least common multiple shape) following (least common multiple number).

  5. 5.

    http://hp.vector.co.jp/authors/VA003988/gpcc/gpcc.htm.

  6. 6.

    http://deepgreen.game.coocan.jp/MCFG/MCFG_index.htm.

  7. 7.

    A polygon P is called a rep-tile if it can be divided into congruent polygons with each other similar to P.

  8. 8.

    https://www.iread.it/Poly/ and https://sicherman.net/polycur.html.

References

  1. Banbara, M., et al.: Solving rep-tile by computers: performance of solvers and analyses of solutions. arXiv:2110.05184 (2021)

  2. Bosboom, J., Demaine, E.D., Demaine, M.L., Hesterberg, A., Manurangsi, P., Yodpinyanee, A.: Even \(1\times n\) edge matching and jigsaw puzzles are really hard. J. Inf. Process. 25, 682–694 (2017)

    Google Scholar 

  3. Demaine, E.D., Demaine, M.L.: Jigsaw puzzles, edge matching, and polyomino packing: connections and complexity. Graphs Combin. 23(Suppl 1), 195–208 (2007). https://doi.org/10.1007/s00373-007-0713-4

    Article  MathSciNet  Google Scholar 

  4. Demaine, E.D., et al.: Symmetric assembly puzzles are hard, beyond a few pieces. Comput. Geom.: Theory Appl. 90, 101648, 1–11 (2020). https://doi.org/10.1016/j.comgeo.2020.101648

  5. Flake, G.W., Baum, E.B.: Rush hour is PSPACE-complete, or “why you should generously tip parking lot attendants’’. Theoret. Comput. Sci. 270, 895–911 (2002)

    Article  MathSciNet  Google Scholar 

  6. Garey, M.R., Johnson, D.S.: Computers and Intractability—A Guide to the Theory of NP-Completeness. Freeman (1979)

    Google Scholar 

  7. Golomb, S.W.: Polyominoes. Princeton University Press, Princeton (1994)

    Book  Google Scholar 

  8. Hearn, R.A., Demaine, E.D.: Games, Puzzles, and Computation. A K Peters Ltd. (2009)

    Google Scholar 

  9. Hearn, R.A., Demaine, E.D.: PSPACE-completeness of sliding-block puzzles and other problems through the nondeterministic constant logic model of computation. Theoret. Comput. Sci. 343(1–2), 72–96 (2005)

    Article  MathSciNet  Google Scholar 

  10. Ito, T., et al.: On the complexity of reconfiguration problems. Theoret. Comput. Sci. 412, 1054–1065 (2011)

    Article  MathSciNet  Google Scholar 

  11. Minamisawa, K., Uehara, R., Hara, M.: Mathematical characterizations and computational complexity of anti-slide puzzles. Theor. Comput. Sci. 939, 216–226 (2023). https://doi.org/10.1016/j.tcs.2022.10.026

    Article  MathSciNet  Google Scholar 

  12. Post, E.L.: A variant of a recursively unsolvable problem. Bull. Amer. Math. Soc. 52, 264–268 (1946). https://doi.org/10.1090/S0002-9904-1946-08555-9

    Article  MathSciNet  Google Scholar 

  13. Uehara, R.: Computational complexity of puzzles and related topics. Interdisc. Inf. Sci. 29(2), 119–140 (2023). https://doi.org/10.4036/iis.2022.R.06

    Article  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Ryuhei Uehara .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2024 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

Banbara, M., Minato, Si., Ono, H., Uehara, R. (2024). On the Computational Complexity of Generalized Common Shape Puzzles. In: Fernau, H., Gaspers, S., Klasing, R. (eds) SOFSEM 2024: Theory and Practice of Computer Science. SOFSEM 2024. Lecture Notes in Computer Science, vol 14519. Springer, Cham. https://doi.org/10.1007/978-3-031-52113-3_4

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-52113-3_4

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-52112-6

  • Online ISBN: 978-3-031-52113-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics