Past exam of the mathematics course of the University of Cambridge 2018 ii Paper 3 4G a Solution Created 2026-09-24 Updated 2026-10-03
A context-free grammar is in Chomsky normal form when every production rule has one of the formswhere are nonterminal symbols and is a terminal symbol. If the language contains the empty word, one may additionally permit , with the start symbol absent from all right-hand sides.
Past exam of the mathematics course of the University of Cambridge 2020 ii Paper 3 4F i Solution Created 2026-09-24 Updated 2026-09-29
A context-free grammar is a quadruple consisting of a finite set of nonterminal symbols, a disjoint finite alphabet of terminal symbols, a start symbol , and a finite set of productions with and . A sentence is a terminal word over an alphabet with , and the generated formal language is .
The first language is context-free. For example, the productionsgenerate exactly : each recursive production adds two s to the left and two s to the right.