Solution

ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2025/ii/paper-4/4f/d/solution

Take
and
These are variable based and have disjoint variable sets. They satisfy
In , however, both terminal productions of are replaced:
Consequently its only terminal derivation is
so
This realizes the failure of the regular concatenation construction for a nonregular grammar: two different terminal productions introduce two copies of .

New to topics? Read the docs here!