0 votes 0 votes S->AbaC A->BC B->b/epsilon C->D/epsilon D->d I want to know that will A contain epsilon as B and C both are null variables???(In Elimination of epsilon-production) Theory of Computation theory-of-computation context-free-grammar context-free-language grammar + – Anmol Verma asked Nov 30, 2016 • retagged Jul 4, 2017 by Arjun Anmol Verma 2.3k views answer comment Share Follow See all 4 Comments See all 4 4 Comments reply Prabhanjan_1 commented Nov 30, 2016 reply Follow Share it may be the case when both of them B and C are not Epsilon at same time. A-> b | D | bD 0 votes 0 votes Prajwal Bhat commented Nov 30, 2016 reply Follow Share Yes you are right in elimination of epsilon you will get A->epsilon .No doubt about it 0 votes 0 votes Anmol Verma commented Nov 30, 2016 reply Follow Share but in video lecture it is not given as A->epsilon.... That's why i got confused.... can anyone show me the productions after elimination of epsilon...?? 0 votes 0 votes Prajwal Bhat commented Nov 30, 2016 reply Follow Share I don't know why they have not written it ...The grammar definetly consists A->epsilon after epsilon elimination 0 votes 0 votes Please log in or register to add a comment.
Best answer 1 votes 1 votes On eliminating Epsilon productions we have S->AbaC | Aba A->B | C | BC | epsilon Here A-> epsilon So again put that in 1st production. we get S->baC | ba | BbaC | CbaC | BCbac | Bba | Cba | BCba B->b C->D D->b Prabhanjan_1 answered Nov 30, 2016 • selected Oct 18, 2018 by Anmol Verma Prabhanjan_1 comment Share Follow See all 2 Comments See all 2 2 Comments reply Prajwal Bhat commented Nov 30, 2016 reply Follow Share It is not correct S->AbaC | Aba A->B | C | BC | epsilon (Here you have considered when one symbol is epsilon thats fine but you should also consider when both the symbols are epsilon thats where epsilon will be generated) B->b C->D D->b 0 votes 0 votes Prabhanjan_1 commented Nov 30, 2016 reply Follow Share Corrected . prajwal now check 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes yes A produces epsilon because B and C produce epsilon. RAJESHWAR YADAV answered Nov 30, 2016 RAJESHWAR YADAV comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes Solution: S -> Abac | baC | Aba | ba A -> BC | B | C B -> b C -> D D ->d Krishankant Ray answered Apr 1, 2017 Krishankant Ray comment Share Follow See all 0 reply Please log in or register to add a comment.