0 votes 0 votes Consider the following CFG, find the number of productions in the minimized grammar after it was convert it into Greibach normal form. S → AA| 0, A → SS | 1 plzzz explain how to convert the given grammer into gnf in detail. RISHI GUPTA 1 asked Nov 16, 2016 RISHI GUPTA 1 1.8k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
1 votes 1 votes The grammar is already in CNF so need of conversion. GNF IS LOOKS LIKE or S->1A | SSA| 0 A->0S |AAS | 1. it is left recursive so eliminate left recursion S->0S' |1AS' S'->SAA' | $\epsilon$ // substitute 's' by previous productions. S'->0S'AA' | 1AS'SAA' A->0SA' |1A' A'->ASA' | $\epsilon$ A'->0SA'SA' | 1A'SA'. SO FINAL GNF IS S->0S' |1AS' S'->0S'AA' | 1AS'SAA' |$\epsilon$ A->0SA' |1A' A'->0SA'SA' | 1A'SA'. |$\epsilon$ santhoshdevulapally answered Dec 2, 2016 santhoshdevulapally comment Share Follow See 1 comment See all 1 1 comment reply Pranav Kant Gaur commented Jan 3, 2017 reply Follow Share $S'->SAS'$ instead of $S'->SAA'$ 0 votes 0 votes Please log in or register to add a comment.