Solution (source code)

= Solution

A variable-based grammar is $(N,\Sigma,P,S)$ with disjoint nonterminals and terminals, productions between words over $N\cup\Sigma$, and start variable $S$. Its language is $\{w\in\Sigma^*:S\Rightarrow^*w\}$.