Abstract

In a typical regular expression (regex) crossword puzzle, you are given two nonempty lists R1,…,RmR_1,\ldots,R_m and C1,…,CnC_1,\ldots,C_n of regular expressions over some alphabet, and your goal is to fill in an m×nm\times n grid with letters from that alphabet so that the string formed by the iith row is in L(Ri)L(R_i), and the string formed by the jjth column is in L(Cj)L(C_j), for all 1≤i≤m1\le i\le m and 1≤j≤n1\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 RiR_i are equal to some regular expression RR, and all the CjC_j are equal to some regular expression CC. We call the solution to such a puzzle an (R,C)(R,C)-crossword. Our main results are the following: 1. There exists a fixed regular expression CC over the alphabet {0,1}\{0,1\} such that the following problem is NP-complete: "Given a regular expression RR over {0,1}\{0,1\} and positive integers mm and nn given in unary, does an m×nm\times n (R,C)(R,C)-crossword exist?" This improves the result mentioned above. 2. The following problem is NP-hard: "Given a regular expression EE over {0,1}\{0,1\} and positive integers mm and nn given in unary, does an m×nm\times n (E,E)(E,E)-crossword exist?" 3. There exists a fixed regular expression CC over {0,1}\{0,1\} such that the following problem is undecidable (equivalent to the Halting Problem): "Given a regular expression RR over {0,1}\{0,1\}, does an (R,C)(R,C)-crossword exist (of any size)?" 4. The following problem is undecidable (equivalent to the Halting Problem): "Given a regular expression EE over {0,1}\{0,1\}, does an (E,E)(E,E)-crossword exist (of any size)?"

Explore this paper’s authors, topics and related work.

Building this map preview

BZPEER is loading the nearby papers, people, topics and institutions for this page.

Reviews 0

Write a reviewWrite

No reviews yet.

Discussion 0

Add a commentWrite

No comments yet.