Solution

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

This language is context-free. Let
The nonterminal produces exactly with . The base production for supplies one leading and one trailing zero, and each recursive production supplies one more of each. Thus produces exactly

New to topics? Read the docs here!