形式语言的子序列匹配与分析问题
Subsequence Matching and Analysis Problems for Formal Languages
AI总结:
本文研究由文法或自动机表示的语言中的子序列匹配与分析问题,扩展了正则语言的高效算法,为上下文无关语言提供了高效算法,并证明了上下文敏感语言的不可判定性。
摘要:
在本文中,我们研究了一系列与给定语言字符串中出现的子序列相关的算法问题,假设该语言由生成它的文法或接受它的自动机简洁地表示。特别地,我们关注以下问题:给定字符串 $w$ 和语言 $L$,是否存在 $L$ 中的一个词将 $w$ 作为子序列?$L$ 中的所有词是否都将 $w$ 作为子序列?给定整数 $k$ 和 $L$,是否存在 $L$ 中的一个词将字母表上长度为 $k$ 的所有字符串作为子序列?$L$ 中的所有词是否都将长度为 $k$ 的所有字符串作为子序列?对于最后两个问题,[Adamson et al., ISAAC 2023] 已经针对 $L$ 是正则语言的情况提出了高效算法,且前两个问题也很容易得到高效解决方案。我们对该工作进行如下扩展:给出了输入语言类需满足的充分条件,在此条件下这些问题是可判定的;当输入语言是上下文无关时,我们为所有这些问题提供了高效算法;我们证明了对于上下文敏感语言,所有问题都是不可判定的。最后,我们提供了一系列初步结果,涉及一个严格包含正则语言且严格包含在上下文敏感语言类中,但与上下文无关语言类不可比的语言类;这些结果与 Chomsky 层级中报告的语言类结果有显著偏差。
英文摘要:
In this paper, we study a series of algorithmic problems related to the subsequences occurring in the strings of a given language, under the assumption that this language is succinctly represented by a grammar generating it, or an automaton accepting it. In particular, we focus on the following problems: Given a string $w$ and a language $L$, does there exist a word of $L$ which has $w$ as subsequence? Do all words of $L$ have $w$ as a subsequence? Given an integer $k$ alongside $L$, does there exist a word of $L$ which has all strings of length $k$, over the alphabet of $L$, as subsequences? Do all words of $L$ have all strings of length $k$ as subsequences? For the last two problems, efficient algorithms were already presented in [Adamson et al., ISAAC 2023] for the case when $L$ is a regular language, and efficient solutions can be easily obtained for the first two problems. We extend that work as follows: we give sufficient conditions on the class of input-languages, under which these problems are decidable; we provide efficient algorithms for all these problems in the case when the input language is context-free; we show that all problems are undecidable for context-sensitive languages. Finally, we provide a series of initial results related to a class of languages that strictly includes the regular languages and is strictly included in the class of context-sensitive languages, but is incomparable to the of class context-free languages; these results deviate significantly from those reported for language-classes from the Chomsky hierarchy.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。