arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1109.5615cs.FLcs.CCcs.DS
收藏

上下文无关文法的正则性度量

A Regularity Measure for Context Free Grammars

M. Praveen

摘要:

Parikh定理指出,每一个上下文无关语言(CFL)都有与正则语言相同的Parikh图像。接受这样一种正则语言的有限状态自动机称为Parikh等价自动机。在最坏的情况下,任何非确定性Parikh等价自动机中的状态数在上下文无关文法(CFG)的大小上是指数级的。我们将正则性宽度d与度量CFL与正则语言的接近度的CFG相关联。CFG的次数m比任何产生式的右侧变量出现的最大数量小1。给定一个n元的CFG,构造一个Parikh等价的非确定自动机,其状态数的上界为$n(d^{2d(m+1)})中的多项式,多项式的次数为一个小的固定常数.我们的程序是建设性的,并运行在时间多项式的大小的自动机。在参数化复杂性的术语中,我们证明了当度m和正则性宽度d为参数时,为给定的CFG构造Parikh等价自动机是固定参数可处理的(FPT)。我们还给出了一个例子,从程序验证域的程度和规律性相比,语法的大小是小的。

英文摘要:

Parikh's theorem states that every Context Free Language (CFL) has the same Parikh image as that of a regular language. A finite state automaton accepting such a regular language is called a Parikh-equivalent automaton. In the worst case, the number of states in any non-deterministic Parikh-equivalent automaton is exponentially large in the size of the Context Free Grammar (CFG). We associate a regularity width d with a CFG that measures the closeness of the CFL with regular languages. The degree m of a CFG is one less than the maximum number of variable occurrences in the right hand side of any production. Given a CFG with n variables, we construct a Parikh-equivalent non-deterministic automaton whose number of states is upper bounded by a polynomial in $n (d^{2d(m+1)}), the degree of the polynomial being a small fixed constant. Our procedure is constructive and runs in time polynomial in the size of the automaton. In the terminology of parameterized complexity, we prove that constructing a Parikh-equivalent automaton for a given CFG is Fixed Parameter Tractable (FPT) when the degree m and regularity width d are parameters. We also give an example from program verification domain where the degree and regularity are small compared to the size of the grammar.

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

↑