= Solution
The first grammar generates
$$
L(G_0)=\{ab^{2r+1}a:r\geq0\},
$$
because $A\to bAb$ adds two $b$'s and $A\to b$ terminates the derivation.
In the second grammar, $Z$ is a <nonproductive nonterminal>: every right-hand side of a $Z$-production still contains a $Z$. Consequently the branch $Y\to ZZ$ never yields a terminal word. Every terminal derivation from $Y$ instead uses $Y\to bYb$ repeatedly and ends with $Y\to b$, so
$$
L(G_1)=\{ab^{2r+1}a:r\geq0\}=L(G_0).
$$
The grammars are therefore <equivalent grammar>[equivalent], although they are not <isomorphic grammar>[isomorphic].
Back to article page