Paper 3, Section I, G

Automata and Formal Languages
Part II, 2018

(a) Define what it means for a context-free grammar (CFG) to be in Chomsky normal form ( CNF)\mathrm{CNF}).

(b) Give an algorithm for converting a CFG GG into a corresponding CFG GChom G_{\text {Chom }} in CNF satisfying L(GChom )=L(G){ϵ}\mathcal{L}\left(G_{\text {Chom }}\right)=\mathcal{L}(G)-\{\epsilon\}. [You need only outline the steps, without proof.]

(c) Convert the following CFGG\mathrm{CFG} G :

SAScB,Aa,BbS \rightarrow A S c \mid B, \quad A \rightarrow a, \quad B \rightarrow b

into a grammar in CNF.