[Paper Review] The complexity of some regex crossword problems
This paper investigates the computational complexity of regex crossword puzzles under structural restrictions, proving that even when all row and column regular expressions are identical, the existence of a solution remains NP-complete or undecidable depending on input encoding. It establishes key results: NP-completeness for fixed-column regex puzzles with unary dimensions, NP-hardness for symmetric puzzles, and undecidability for existence over arbitrary sizes using a Turing machine simulation via two-dimensional tableaux.
In a typical regular expression (regex) crossword puzzle, you are given two nonempty lists $R_1,\ldots,R_m$ and $C_1,\ldots,C_n$ of regular expressions over some alphabet, and your goal is to fill in an $m imes n$ grid with letters from that alphabet so that the string formed by the $i$th row is in $L(R_i)$, and the string formed by the $j$th column is in $L(C_j)$, for all $1\le i\le m$ and $1\le j\le n$. Such a grid is a solution to the puzzle. It is known that determining whether a solution exists is NP-complete. We consider a number of restrictions and variants to this problem where all the $R_i$ are equal to some regular expression $R$, and all the $C_j$ are equal to some regular expression $C$. We call the solution to such a puzzle an $(R,C)$-crossword. Our main results are the following: 1. There exists a fixed regular expression $C$ over the alphabet $\{0,1\}$ such that the following problem is NP-complete: "Given a regular expression $R$ over $\{0,1\}$ and positive integers $m$ and $n$ given in unary, does an $m imes n$ $(R,C)$-crossword exist?" This improves the result mentioned above. 2. The following problem is NP-hard: "Given a regular expression $E$ over $\{0,1\}$ and positive integers $m$ and $n$ given in unary, does an $m imes n$ $(E,E)$-crossword exist?" 3. There exists a fixed regular expression $C$ over $\{0,1\}$ such that the following problem is undecidable (equivalent to the Halting Problem): "Given a regular expression $R$ over $\{0,1\}$, does an $(R,C)$-crossword exist (of any size)?" 4. The following problem is undecidable (equivalent to the Halting Problem): "Given a regular expression $E$ over $\{0,1\}$, does an $(E,E)$-crossword exist (of any size)?"
Motivation & Objective
- To analyze the computational complexity of regex crossword puzzles under structural constraints where all row and column regular expressions are identical.
- To determine whether the existence of a solution remains NP-hard or becomes undecidable under such restrictions.
- To investigate the impact of input encoding (unary vs. binary) on the complexity of the problem.
- To explore the decidability of existence for crosswords of arbitrary size, particularly in relation to the Halting Problem.
- To extend results to symmetric cases where row and column expressions are the same, and to consider implications for two-player games and unbounded grid variants.
Proposed method
- Uses a direct encoding of a one-tape Turing machine’s computation as a two-dimensional tableau, where rows represent configurations and columns enforce transition legality.
- Employs a fixed regular expression $ C $ over $ \{0,1\} $ to simulate the transition function and tape head movement in the crossword grid.
- Applies the Cook-Levin theorem-style construction to reduce SAT to the $(R,C)$-crossword problem, proving NP-completeness under unary encoding.
- Demonstrates that when dimensions are given in unary, the problem remains NP-complete even with identical row and column expressions.
- Shows that if dimensions are given in binary, the problem becomes NEXP-complete, and with mixed unary/binary, it becomes PSPACE-complete.
- Uses a reduction from the Halting Problem to prove undecidability for existence of solutions over arbitrary-sized grids, even with fixed $ C $.
Experimental results
Research questions
- RQ1Is the existence of an $(R,C)$-crossword NP-complete when all row expressions are identical and all column expressions are fixed to a single $ C $, with dimensions given in unary?
- RQ2Is the problem of determining whether an $(E,E)$-crossword exists NP-hard, even when all expressions are the same?
- RQ3For which fixed regular expressions $ C $ is the problem of existence of an $(R,C)$-crossword undecidable?
- RQ4What is the complexity of the $(R,C)$-crossword existence problem when dimensions are given in binary rather than unary?
- RQ5Can the existence of a solution for an $(E,E)$-crossword be undecidable, even when $ E $ is fixed?
Key findings
- There exists a fixed regular expression $ C $ over $ \{0,1\} $ such that the $(R,C)$-crossword existence problem with dimensions in unary is NP-complete.
- The problem of determining whether an $(E,E)$-crossword exists is NP-hard, even when all expressions are identical.
- For a fixed $ C $, the problem of whether an $(R,C)$-crossword exists of any size is undecidable and equivalent to the Halting Problem.
- The problem of whether an $(E,E)$-crossword exists of any size is also undecidable and equivalent to the Halting Problem.
- When dimensions are given in binary, the $(R,C)$-crossword existence problem becomes NEXP-complete under polynomial-time reductions.
- With one dimension in unary and the other in binary, the problem becomes PSPACE-complete.
Better researchstarts right now
From reading papers to final review, dramatically reduce your research time.
No credit card · Free plan available
This review was created by AI and reviewed by human editors.