Solution

ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2022/ii/paper-3/4i/ii/solution

The language in (ii) is context-free. The grammar
generates exactly
The recursive uses of the first rule match the numbers of 's and 's, while independently generates any even number of 's.

New to topics? Read the docs here!