[论文解读] A Dichotomy for Regular Expression Membership Testing
该论文在强指数时间假设(SETH)下建立了正则表达式成员资格测试的完整二分法,证明所有有界深度的同质正则表达式类型要么可在近乎线性时间内求解,要么需要二次时间,唯独单词拆分(Word Break)问题是例外。该论文提出了一个确定性 Õ(nm¹ᐟ³ + m) 算法用于解决单词拆分问题,并证明了匹配的条件下界,从而确立其为该分类中唯一的中间复杂度问题。
We study regular expression membership testing: Given a regular expression of size $m$ and a string of size $n$, decide whether the string is in the language described by the regular expression. Its classic $O(nm)$ algorithm is one of the big success stories of the 70s, which allowed pattern matching to develop into the standard tool that it is today. Many special cases of pattern matching have been studied that can be solved faster than in quadratic time. However, a systematic study of tractable cases was made possible only recently, with the first conditional lower bounds reported by Backurs and Indyk [FOCS'16]. Restricted to any "type" of homogeneous regular expressions of depth 2 or 3, they either presented a near-linear time algorithm or a quadratic conditional lower bound, with one exception known as the Word Break problem. In this paper we complete their work as follows: 1) We present two almost-linear time algorithms that generalize all known almost-linear time algorithms for special cases of regular expression membership testing. 2) We classify all types, except for the Word Break problem, into almost-linear time or quadratic time assuming the Strong Exponential Time Hypothesis. This extends the classification from depth 2 and 3 to any constant depth. 3) For the Word Break problem we give an improved $ ilde{O}(n m^{1/3} + m)$ algorithm. Surprisingly, we also prove a matching conditional lower bound for combinatorial algorithms. This establishes Word Break as the only intermediate problem. In total, we prove matching upper and lower bounds for any type of bounded-depth homogeneous regular expressions, which yields a full dichotomy for regular expression membership testing.
研究动机与目标
- 在强指数时间假设(SETH)下,完成对有界深度同质正则表达式成员资格问题的分类,划分为近乎线性时间或二次时间复杂度。
- 通过提供更快的确定性算法并证明匹配的条件下界,解决单词拆分问题的开放状态。
- 将二分法从深度 2 和 3 扩展到任意常数深度,填补先前研究留下的空白。
- 确立单词拆分问题是近线性和二次时间复杂度之间唯一中间复杂度类的问题。
提出的方法
- 开发了两种新的近乎线性时间算法,推广了现有特殊情形下正则表达式成员资格测试的解决方案。
- 使用细粒度归约,证明任意类型 t 的成员资格问题要么可在近乎线性时间内求解,要么在 SETH 下为难解,通过归约到已知的难解类型(如 ∘⋆、∘|∘ 或 ∘+∘)。
- 提出一种新颖的确定性算法用于单词拆分问题,时间复杂度为 Õ(nm¹ᐟ³ + m),优于先前的随机化 Õ(nm¹ᐟ²⁻¹ᐟ¹⁸ + m) 上界。
- 证明了单词拆分问题在组合算法上的匹配条件下的界,表明除非 SETH 失效,否则不存在更快的组合算法。
- 应用简化规则以消除冗余类型,将问题空间缩减为最小的难解和易解情形。
- 构建所有可能类型的树状图,系统地根据深度和操作序列对成员资格问题进行分类,每类均标记其时间复杂度或难解性。
实验结果
研究问题
- RQ1在 SETH 下,有界深度同质正则表达式成员资格测试是否存在一个完整的二分法,将问题划分为近乎线性时间或二次时间复杂度?
- RQ2单词拆分问题能否比已知的随机化 Õ(nm¹ᐟ²⁻¹ᐟ¹⁸ + m) 上界更快求解,且该改进是否可实现为确定性算法?
- RQ3单词拆分问题是否代表了正则表达式成员资格测试中近线性和二次时间复杂度之间的唯一中间情况?
- RQ4该成员资格问题的分类能否从深度 3 扩展到任意常数深度?
- RQ5是否存在单词拆分问题的匹配条件下的下界,以排除更快的组合算法?
主要发现
- 单词拆分问题存在一个确定性 Õ(nm¹ᐟ³ + m) 算法,优于先前的随机化 Õ(nm¹ᐟ²⁻¹ᐟ¹⁸ + m) 上界。
- 证明了单词拆分问题在组合算法上的匹配条件下的下界,表明除非强指数时间假设(SETH)失效,否则不存在更快的组合算法。
- 所有有界深度同质正则表达式成员资格问题在 SETH 下被划分为两类:要么可在近乎线性时间内求解,要么需要 (nm)¹⁻ᵒ⁽¹⁾ 时间。
- 单词拆分问题是唯一处于中间复杂度类的问题,因此是该二分法的唯一例外。
- 该分类可扩展至所有常数深度,完成了正则表达式成员资格测试的二分法。
- 研究结果基于系统化的归约框架和所有可能类型的基于树的枚举,结合简化规则和通过归约传播的难解性。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。