[论文解读] The complexity of some regex crossword problems
本文研究在结构限制下,正则表达式填字游戏的计算复杂性,证明即使所有行和列的正则表达式相同,解的存在性仍取决于输入编码方式,可能为 NP-完全或不可判定。主要成果包括:当列的正则表达式固定且维度以一元编码时,问题为 NP-完全;对称填字游戏问题为 NP-难;通过二维表格模拟图灵机,证明在任意大小下解的存在性问题不可判定。
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)?"
研究动机与目标
- 分析在所有行和列正则表达式相同这一结构约束下,正则表达式填字游戏的计算复杂性。
- 确定在这些限制下,解的存在性是否仍为 NP-难,或变为不可判定。
- 研究输入编码(一元与二进制)对问题复杂性的影响。
- 探讨任意大小填字游戏解的存在性可判定性,特别是与停机问题的关系。
- 将结果扩展至对称情形(行与列表达式相同),并探讨其在双人游戏和无界网格变体中的影响。
提出的方法
- 将单带图灵机的计算过程直接编码为二维表格,其中行表示配置,列用于强制执行转换的合法性。
- 使用固定正则表达式 $ C $ 在 $ \{0,1\} $ 上,以在填字网格中模拟转换函数和磁头移动。
- 采用类似 Cook-Levin 定理的构造方法,将 SAT 归约至 $(R,C)$-填字问题,证明在一元编码下问题为 NP-完全。
- 证明当维度以一元编码给出时,即使所有行和列表达式相同,问题仍为 NP-完全。
- 表明若维度以二进制编码,则问题变为 NEXP-完全;若维度混合使用一元与二进制编码,则问题变为 PSPACE-完全。
- 通过从停机问题的归约,证明在任意大小网格下解的存在性问题不可判定,即使 $ C $ 固定。
实验结果
研究问题
- RQ1当所有行表达式相同且所有列表达式固定为单一 $ C $,且维度以一元编码时,$(R,C)$-填字游戏的解是否存在问题是否为 NP-完全?
- RQ2确定是否存在 $(E,E)$-填字游戏的问题是否为 NP-难,即使所有表达式相同?
- RQ3对于哪些固定正则表达式 $ C $,$(R,C)$-填字游戏的存在性问题为不可判定?
- RQ4当维度以二进制而非一元编码时,$(R,C)$-填字游戏存在性问题的复杂性如何?
- RQ5是否存在 $(E,E)$-填字游戏的解不可判定,即使 $ E $ 固定?
主要发现
- 存在一个固定的正则表达式 $ C $,其定义在 $ \{0,1\} $ 上,使得在维度以一元编码时,$(R,C)$-填字游戏的存在性问题为 NP-完全。
- 即使所有表达式相同,确定是否存在 $(E,E)$-填字游戏的问题仍为 NP-难。
- 对于固定的 $ C $,是否存在任意大小的 $(R,C)$-填字游戏的问题不可判定,且等价于停机问题。
- 是否存在任意大小的 $(E,E)$-填字游戏的问题也不可判定,且等价于停机问题。
- 当维度以二进制编码时,$(R,C)$-填字游戏存在性问题在多项式时间归约下变为 NEXP-完全。
- 当一维以一元编码,另一维以二进制编码时,问题变为 PSPACE-完全。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。