带反向引用的正则表达式:多项式时间匹配技术
Regular Expressions with Backreferences: Polynomial-Time Matching Techniques
AI总结:
针对带反向引用的正则表达式匹配的NP完全问题,提出活跃变量度参数和记忆确定性概念,实现多项式时间匹配。
摘要:
支持反向引用的正则表达式(简称regex),正如大多数现代正则表达式匹配库所支持的那样,其匹配问题是NP完全的。我们定义了一个正则表达式的复杂度参数,称为活跃变量度,当该参数被常数界定时,此类正则表达式可以在多项式时间内匹配。此外,我们提出了一种新型的正则表达式确定性(在自动机理论层面),由此产生了一类记忆确定性正则表达式,它们可以在时间O(|w|p(|r|))内匹配,其中p是多项式(r为正则表达式,w为单词)。这些概念的自然扩展导致了难以检查的正则表达式性质。
英文摘要:
Regular expressions with backreferences (regex, for short), as supported by most modern libraries for regular expression matching, have an NP-complete matching problem. We define a complexity parameter of regex, called active variable degree, such that regex with this parameter bounded by a constant can be matched in polynomial-time. Moreover, we formulate a novel type of determinism for regex (on an automaton-theoretic level), which yields the class of memory-deterministic regex that can be matched in time O(|w|p(|r|)) for a polynomial p (where r is the regex and w the word). Natural extensions of these concepts lead to properties of regex that are intractable to check.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。