Abstract
In a regular expression crossword puzzle, one is given two non-empty lists \(\langle {} \langle {} R_1,\ldots , R_m \rangle {}\) and \(\langle {} C_1, \ldots , C_n \rangle {} \rangle {}\) over some alphabet, and the challenge is to fill in an \(m\times n\) grid of characters such that the string formed by the \(i^\text {th}\) row is in \(L(R_i)\) and the string in the \(j^\text {th}\) column is in \(L(C_j)\). We consider a restriction of this puzzle where all the \(R_i\) are equal to one another and similarly the \(C_j\). We consider a 2-player version of this puzzle, showing it to be -complete. Using a reduction from
, we also give a new, simple proof of the known result that the existence problem of a solution for the restricted (1-player) puzzle is
-complete.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
Glen Takahashi posted this question to Stack Exchange in 2012 [13], but it has been asked by others independently.
- 2.
In the same paper, a restriction of
where the unique row and column regexes are equal to each other was also shown
-complete.
- 3.
More precisely, the question is whether the sentence \(\exists x_0 \forall y_0 \cdots \exists x_{k-1} \forall y_{k-1}\exists x_k [\tilde{\varphi }(x_0, y_0, \ldots , x_{k-1}, y_{k-1}, x_k) = \textsc {True}]\) holds in the two-element Boolean algebra \((\{\textsc {False},\textsc {True}\},\mathrel {\wedge },\mathrel {\vee },\lnot )\).
- 4.
For the last move of the game, Rose or Colin may encounter a row or column, respectively, that is already completely filled in. In this case, she or he wins if and only if the row or column matches the corresponding regular expression.
References
MIT Mystery Hunt. http://www.mit.edu/~puzzle
Royal dinner. http://regexcrossword.com/challenges/experienced/puzzles/1
Slashdot discussion, February 2013. http://games.slashdot.org/story/13/02/13/2346253/can-you-do-the-regular-expression-crossword
Berger, R.: The undecidability of the domino problem. No. 66 in memoirs of the American Mathematical Society. American Mathematical Society, Providence, Rhode Island (1966). mR0216954
Black, L.: Can you do the regular expression crossword? I programmer, February 2013. http://www.i-programmer.info/news/144-graphics-and-games/5450-can-you-do-the-regular-expression-crossword.html
Fenner, S.: The complexity of some regex crossword problems (2014)
Giammarresi, D., Restivo, A.: Recognizable picture languages. Int. J. Pattern Recogn. Artif. Intell. 31–46 (1992)
Giammarresi, D., Restivo, A.: Two-dimensional languages. In: Rozenberg, G., Salomaa, A. (eds.) Handbook of Formal Languages, vol. 3, pp. 215–267. Springer, Heidelberg (1997). https://doi.org/10.1007/978-3-642-59126-6_4. Chap. 96
Latteux, M., Simplot, D.: Recognizable picture languages and domino tiling. Theor. Comput. Sci. 178(1–2), 275–283 (1997). Note
Rosenfeld, A., Rheinboldt, W.: Picture Languages: Formal Models for Picture Recognition. Computer Science and Applied Mathematics. Elsevier Inc., Academic Press Inc., New York (1979)
Takahashi, G.: Are regex crosswords NP-hard? cS Stack Exchange question 30143, answered by FrankW, September 2014. http://cs.stackexchange.com/questions/30143/are-regex-crosswords-np-hard
Takahashi, G.: Are regex crosswords NP-hard? CS Stack Exchange question 30143, answered by FrankW (2014). http://cs.stackexchange.com/questions/30143/are-regex-crosswords-np-hard
Acknowledgments
We would like to thank Thomas Thierauf for several interesting discussions on this topic and to Joshua Cooper for finding for us a particularly challenging and fun regex crossword puzzle. We are also grateful to Klaus-Jörn Lange for suggesting the connection between our work and the theory of picture languages.
Author information
Authors and Affiliations
Corresponding authors
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2019 Springer Nature Switzerland AG
About this paper
Cite this paper
Fenner, S., Padé, D. (2019). Complexity of Regex Crosswords. In: MartÃn-Vide, C., Okhotin, A., Shapira, D. (eds) Language and Automata Theory and Applications. LATA 2019. Lecture Notes in Computer Science(), vol 11417. Springer, Cham. https://doi.org/10.1007/978-3-030-13435-8_16
Download citation
DOI: https://doi.org/10.1007/978-3-030-13435-8_16
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-13434-1
Online ISBN: 978-3-030-13435-8
eBook Packages: Computer ScienceComputer Science (R0)