跳到正文
研踪PaperTrail
← 研踪 PaperTrail

arXiv:2609.16914 · v2

Regular Expression Matching with Ordered Linear Backreferences

首次提交 2026-09-15 17:51
版本更新 2026-11-16 17:51
雷达观测 2026-11-17 17:11
arXiv ↗PDF ↗

摘要

A regular expression with backreferences (rewb) specifies a set of strings formed by characters combined with concatenation, union, star operators, and backreferences. A backreference consists of a capturing group (⋅)i(\cdot)_i and one or more references \i\backslash i. The substring matched by the reference must match the same substring that was matched by the corresponding capturing group. We focus on a subclass, which we call ordered linear rewbs where the references and capturing groups occur only outside star and union operators. Furthermore, we require that all references to a capturing group occur before the next capturing group in the rewb. In full generality, rewb matching is NP-complete, but efficient solutions exist for various subclasses. For linear rewbs with one capturing group and kk references, Uezato~[CPM 2026] gave an O(kn2m2)O(k n^2 m^2) time and O(n2m2)O(n^2m^2) space algorithm, where mm is the length of the regular expression RR and nn is the length of the string QQ. For the special case of k=1k=1, Nogami and Terauchi~[MFCS 2025] gave an O(n2m2)O(n^2m^2) time and O(n+m2)O(n+ m^2) space algorithm. On the other hand, Nogami, Nakamura, and Terauchi~[arXiv 2026] gave a conditional lower bound, showing that we cannot solve the problem in O(n2−εpoly(m))O(n^{2-ε} \mathrm{poly}(m)) for any ε>0ε> 0 assuming the orthogonal vector hypothesis. Our main result is a new improved algorithm that runs in O(n2m+n2klog⁡n)O(n^2m+n^2k\log n) time and uses O(nm)O(nm) space, and handles the more general case of ordered linear rewbs with multiple capturing groups.

AI 论文解读

基于摘要 · 非全文审阅

此版本尚未生成 AI 解读。解读由后台任务生成并按论文版本保存,登录后共享已有结果。

版本差异

本站首次收录为 v2,暂无更早版本可对照。

观测到的版本

相邻记录可能跳过中间版本;首次发现 v2 及以上也会标为版本更新。

v2 · 2026-11-16 17:51 · 最新观测版本

Regular Expression Matching with Ordered Linear Backreferences

A regular expression with backreferences (rewb) specifies a set of strings formed by characters combined with concatenation, union, star operators, and backreferences. A backreference consists of a capturing group (⋅)i(\cdot)_i and one or more references \i\backslash i. The substring matched by the reference must match the same substring that was matched by the corresponding capturing group. We focus on a subclass, which we call ordered linear rewbs where the references and capturing groups occur only outside star and union operators. Furthermore, we require that all references to a capturing group occur before the next capturing group in the rewb. In full generality, rewb matching is NP-complete, but efficient solutions exist for various subclasses. For linear rewbs with one capturing group and kk references, Uezato~[CPM 2026] gave an O(kn2m2)O(k n^2 m^2) time and O(n2m2)O(n^2m^2) space algorithm, where mm is the length of the regular expression RR and nn is the length of the string QQ. For the special case of k=1k=1, Nogami and Terauchi~[MFCS 2025] gave an O(n2m2)O(n^2m^2) time and O(n+m2)O(n+ m^2) space algorithm. On the other hand, Nogami, Nakamura, and Terauchi~[arXiv 2026] gave a conditional lower bound, showing that we cannot solve the problem in O(n2−εpoly(m))O(n^{2-ε} \mathrm{poly}(m)) for any ε>0ε> 0 assuming the orthogonal vector hypothesis. Our main result is a new improved algorithm that runs in O(n2m+n2klog⁡n)O(n^2m+n^2k\log n) time and uses O(nm)O(nm) space, and handles the more general case of ordered linear rewbs with multiple capturing groups.

查看此版本解读 →查看此版本原文 ↗