Homework 5 Solutions - University of Toronto

(b)Show that Lis context-free by giving a grammar for L. Solution. There are di erent ways of doing this; here is one (let us call this grammar G): S!BjA1BjB1AjA1B1A B!0B0 j010 j01A10 A!1Aj0Aj (c)Prove that your grammar of part (b) is correct. Solution. The goal is to prove that L= L(G). We will do this by showing the following two subgoals: ................
................