1 research outputs found
The complexity of some regex crossword problems
In a typical regular expression (regex) crossword puzzle, you are given two
nonempty lists and of regular expressions
over some alphabet, and your goal is to fill in an grid with
letters from that alphabet so that the string formed by the th row is in
, and the string formed by the th column is in , for all
and . 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 are
equal to some regular expression , and all the are equal to some
regular expression . We call the solution to such a puzzle an
-crossword. Our main results are the following:
1. There exists a fixed regular expression over the alphabet
such that the following problem is NP-complete: "Given a regular expression
over and positive integers and given in unary, does an
-crossword exist?" This improves the result mentioned above.
2. The following problem is NP-hard: "Given a regular expression over
and positive integers and given in unary, does an
-crossword exist?"
3. There exists a fixed regular expression over such that the
following problem is undecidable (equivalent to the Halting Problem): "Given a
regular expression over , does an -crossword exist (of any
size)?"
4. The following problem is undecidable (equivalent to the Halting Problem):
"Given a regular expression over , does an -crossword exist
(of any size)?"Comment: 25 pages, 3 figures; three references added with explanation,
citation added to Corollary 5, more detail in proof of Theorem 8, other minor
corrections (results unchanged