Back to the 2022 paper

Module 2: Context-free languages and pushdown automata

202214m

Begin with the grammar:
SASB/ϵS \to ASB / \epsilon
AaAS/aA \to aAS / a
BSbS/A/bbB \to SbS / A / bb

(i) Eliminate ϵ\epsilon-productions.
(ii) Eliminate unit productions in the resulting grammar.
(iii) Eliminate any useless symbol in the resulting grammar.
(iv) Put the resulting grammar into CNF.

Similar questions