Paper 3, Section II, 12F12 F

Automata and Formal Languages
Part II, 2021

Suppose that GG is a context-free grammar without ϵ\epsilon-productions. Given a derivation of some word ww in the language LL of GG, describe a parse tree for this derivation.

State and prove the pumping lemma for LL. How would your proof differ if you did not assume that GG was in Chomsky normal form, but merely that GG has no ϵ\epsilon - or unit productions?

For the alphabet Σ={a,b}\Sigma=\{a, b\} of terminal symbols, state whether the following languages over Σ\Sigma are context free, giving reasons for your answer. (i) {aibiaii0}\left\{a^{i} b^{i} a^{i} \mid i \geqslant 0\right\}, (ii) {aibjij0}\left\{a^{i} b^{j} \mid i \geqslant j \geqslant 0\right\}, (iii) {wabww{a,b}}\left\{w a b w \mid w \in\{a, b\}^{*}\right\}.