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

枚举正则表达式及其语言

Enumerating regular expressions and their languages

Hermann Gruber, Jonathan Lee, Jeffrey Shallit

摘要:

在本章中,我们将讨论按大小枚举不同正则表达式的问题以及它们所代表的正则语言。我们讨论了文献中出现的正则表达式大小的各种概念及其优缺点。我们考虑使用上下文无关文法的正则表达式的正式定义。然后,我们将展示如何使用Chomsky-Schützenberger定理枚举由明确的上下文无关文法生成的字符串。这个定理允许人们构造一个代数方程,其幂级数展开提供了枚举。来自复分析的经典工具,例如奇异性分析,可以用来确定枚举的渐近行为。我们使用这些代数和分析方法来获得大小为n的正则表达式的数量的渐近估计。单个正则语言通常可以由几个正则表达式描述,我们估计了由大小为n的正则表达式表示的不同语言的数量。我们也给出了这些量的渐近估计。对于前几个值,我们提供精确的枚举结果。

英文摘要:

In this chapter we discuss the problem of enumerating distinct regular expressions by size and the regular languages they represent. We discuss various notions of the size of a regular expression that appear in the literature and their advantages and disadvantages. We consider a formal definition of regular expressions using a context-free grammar. We then show how to enumerate strings generated by an unambiguous context-free grammar using the Chomsky-Schützenberger theorem. This theorem allows one to construct an algebraic equation whose power series expansion provides the enumeration. Classical tools from complex analysis, such as singularity analysis, can then be used to determine the asymptotic behavior of the enumeration. We use these algebraic and analytic methods to obtain asymptotic estimates on the number of regular expressions of size n. A single regular language can often be described by several regular expressions, and we estimate the number of distinct languages denoted by regular expressions of size n. We also give asymptotic estimates for these quantities. For the first few values, we provide exact enumeration results.

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

↑