Probabilistic context-free grammars (PCFGs) are used to define distributions over strings, and are powerful modelling tools in a number of areas, including natural language processing, software engineering, model checking, bio-informatics, and pattern recognition. A common important question is that of comparing the distributions generated or modelled by these grammars: this is done through checking language equivalence and computing distances. Two PCFGs are language equivalent if every string has identical probability with both grammars. This also means that the distance (whichever norm is used) is null. It is known that the language equivalence problem is interreducible with that of multiple ambiguity for context-free grammars, a long-standing open question. In this work, we prove that computing distances corresponds to solving undecidable questions: this is the case for the L1, L2 norm, the variation distance and the Kullback-Leibler divergence. Two more results are less negative: 1. The most probable string can be computed, and, 2. The Chebyshev distance (where the distance between two distributions is the maximum difference of probabilities over all strings) is interreducible with the language equivalence problem.
Describing the syntax of programming languages using conjunctive and Boolean grammars
Floyd的一个经典结果(“On the non-existence of a phrase structure grammar for ALGOL 60”,1962)指出,任何合理的程序设计语言的完整语法都不能用普通的形式语法(乔姆斯基的"context-free“)来描述。本文使用的语法扩展与合取和否定运算符,被称为合取语法和布尔语法,描述了一个简单的无类型的过程程序设计语言的一组格式良好的程序。一个完整的布尔文法,它定义了这样的概念,作为声明的变量和函数之前,他们的使用,构造和解释。使用用于布尔文法的广义LR解析算法,然后可以在时间上解析程序的长度$O(n^4)$,而另一已知算法允许子时间解析。接下来,它是如何将这种语法转换为一个明确的合取语法,平方时间解析。这显然成为完全由计算上可行的形式文法对程序设计语言的语法的第一个规范。
Lecture Notes on Automata, Languages, and Grammars
这些课堂讲稿旨在作为Moore和Mertens的《计算的本质》的补充,或者作为一个独立的资源,任何想要使用它们的人都可以使用。欢迎评论,如果你在课程中使用这些笔记,请告诉我。有61个练习。我强调,自动机是我们可以探索确定性和非确定性计算问题的基本游乐场。与P vs. NP不同的是,我们可以证明非确定性等价于确定性,或者严格地比确定性更强大,分别在有限状态和下推自动机中。我还纠正了一些历史和美学上的不公正:特别是,Myhill-Nerode定理和从前缀的等价类构建最小DFA的想法被恢复到正则语言的泵引理之上。我还讨论了上下文无关语言的泵引理,并简要讨论计数器自动机,队列自动机,以及明确的上下文无关语言和代数生成函数之间的联系。