= Solution
A <context-free grammar> is a quadruple $G=(V,\Sigma,P,S)$ consisting of a finite set $V$ of <nonterminal symbol>[nonterminal symbols], a disjoint finite <alphabet> $\Sigma$ of <terminal symbol>[terminal symbols], a start symbol $S\in V$, and a finite set $P$ of <production rule>[productions] $A\to\alpha$ with $A\in V$ and $\alpha\in(V\cup\Sigma)^*$. A sentence is a terminal <word over an alphabet> $w\in\Sigma^*$ with $S\Rightarrow^*w$, and the generated <formal language> is $\mathcal L(G)=\{w\in\Sigma^*:S\Rightarrow^*w\}$.
The first language is <context-free language>[context-free]. For example, the productions
$$
S\to aaSbb\mid\varepsilon
$$
generate exactly $\{a^{2m}b^{2m}:m\geq0\}$: each recursive production adds two $a$s to the left and two $b$s to the right.
Back to article page