Solution

ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2018/ii/paper-3/4g/c/solution

The original grammar generates
because each use of adds one on the left and one on the right, and terminates the derivation.
Introduce nonterminals and use
Every production is in Chomsky normal form. The production completes one matched pair, while either start-like symbol terminates with , so the grammar generates exactly the same language. These productions are a valid .

New to topics? Read the docs here!