Solution (source code)

= Solution

A <variable-based grammar> is a tuple
$$
G=(\Sigma,V,P,S),
$$
where $\Sigma$ and $V$ are disjoint finite sets of terminals and variables, $S\in V$, and each production $\alpha\to\beta$ has $\alpha,\beta\in(\Sigma\cup V)^*$ with at least one variable in $\alpha$.