arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 1408.1258cs.FL
收藏

实用正则表达式

On Practical Regular Expressions

Holger Petersen

摘要:

我们报告的模拟,层次结构和可判定性结果的实用正则表达式(PRE),其中可能包括反向引用,除了标准的操作联盟,串联,和明星。结果表明:PRE可以用具有单向传感头的非确定有限自动机的经典模型来模拟。头的数量取决于表达式中不同变量的数量。一个空间限制O(n log m),用于匹配长度为m的文本和基于先前模拟的具有n个变量的PRE。这改进了来自(Câmpeanu和Santean 2009)的结合O(nm)。PRE不能被最多具有三个感知单向头的确定性有限自动机或具有任意数量的非感知单向头的确定性有限自动机模拟。任意匹配中变量出现次数有界的PRE可以用单向头的非确定有限自动机来模拟。PRE有一个紧密的层次结构,在一个固定的字母表上有越来越多的非嵌套变量。以前已知的层次结构是基于嵌套变量和不断增长的字母表(Larsen 1998)。在单字母表上不带星号的PRE匹配是NP完全的。这加强了对较大字母表和带有星号的表达式的相应结果(Aho 1990)。不带闭包算子的PRE不等式是Sigma^P_2-完全的。PRE在单个字母表上的普适性的可判定性与费马素数的存在有关。格雷巴赫定理适用于以PRE为特征的语言。

英文摘要:

We report on simulation, hierarchy, and decidability results for Practical Regular Expressions (PRE), which may include back references in addition to the standard operations union, concatenation, and star. The following results are obtained: PRE can be simulated by the classical model of nondeterministic finite automata with sensing one-way heads. The number of heads depends on the number of different variables in the expressions. A space bound O(n log m) for matching a text of length m with a PRE with n variables based on the previous simulation. This improves the bound O(nm) from (Câmpeanu and Santean 2009). PRE cannot be simulated by deterministic finite automata with at most three sensing one-way heads or deterministic finite automata with any number of non-sensing one-way heads. PRE with a bounded number of occurrences of variables in any match can be simulated by nondeterministic finite automata with one-way heads. There is a tight hierarchy of PRE with a growing number of non-nested variables over a fixed alphabet. A previously known hierarchy was based on nested variables and growing alphabets (Larsen 1998). Matching of PRE without star over a single-letter alphabet is NP-complete. This strengthens the corresponding result for expressions over larger alphabets and with star (Aho 1990). Inequivalence of PRE without closure operators is Sigma^P_2-complete. The decidability of universality of PRE over a single letter alphabet is linked to the existence of Fermat Primes. Greibach's Theorem applies to languages characterized by PRE.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑