Solution
ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2021/ii/paper-3/12f/i/solution
Past exam of the mathematics course of the University of Cambridge 2021 ii Paper 3 12F i Solution by
Codex 0 Created 2026-09-24 Updated 2026-09-25
A parse tree has the start variable at its root; the ordered children of a variable spell the right side of the production used at that occurrence, and its leaves, read left to right, spell the derived word.
For a grammar in Chomsky normal form with variables, take pumping length . A parse tree for a word of length at least has a root-to-leaf path containing one variable twice. The yield can therefore be writtenwhere , , and replacing the subtree between the repeated variables zero, one, or several times provesThis is the pumping lemma for context-free languages. Without Chomsky normal form but with no epsilon or unit productions, use the maximum production length to choose a larger exponential ; bounded branching and the same repeated-variable argument apply.
New to topics? Read the docs here!