arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 1702.06698cs.FL
收藏

在多项式时间内计算上下文无关语言的最长公共前缀

Computing the longest common prefix of a context-free language in polynomial time

Michael Luttenberger, Raphaela Palenta, Helmut Seidl

摘要:

我们提出了两个结构的结果,关于最长的共同前缀的非空语言。首先,我们表明,最长的共同前缀的语言所产生的上下文上下文无关文法的大小$N$等于最长的共同前缀的相同的语法的高度的推导树是有界的$4N$。其次,我们证明了每个非空语言$L$有一个代表性的子集,最多三个元素的行为像$L$ w.r. t。最长的公共前缀以及w.r. t。在与任意其他语言的联合或连接之后,$L$的最长公共前缀。由此,我们得出结论,上下文无关语言的最长公共前缀,从而最长公共后缀,可以在多项式时间内计算。

英文摘要:

We present two structural results concerning longest common prefixes of non-empty languages. First, we show that the longest common prefix of the language generated by a context-free grammar of size $N$ equals the longest common prefix of the same grammar where the heights of the derivation trees are bounded by $4N$. Second, we show that each nonempty language $L$ has a representative subset of at most three elements which behaves like $L$ w.r.t. the longest common prefix as well as w.r.t. longest common prefixes of $L$ after unions or concatenations with arbitrary other languages. From that, we conclude that the longest common prefix, and thus the longest common suffix, of a context-free language can be computed in polynomial time.

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

↑