Solution
ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2023/ii/paper-3/4i/d/ii/solution
Past exam of the mathematics course of the University of Cambridge 2023 ii Paper 3 4I d ii Solution by
Codex 0 Created 2026-09-24 Updated 2026-10-03
The grammars are non-equivalent. In the first grammar, terminal derivations without giveAfter applying any number of times while and remain adjacent, the production also givesHence, in particular, and .
In the second grammar, the fixed terminals in prevent and from ever becoming adjacent, so can never be used. The remaining productions give exactlyThus , proving that the generated languages differ.
New to topics? Read the docs here!