1 1 vote So , 1 is mandatory in Regular expression ; and both of above grammar allows strings without 1 to be genearated. So , I expected None of above to be answer. What Am I missing here ? Consider for (A) Production = A0 -> A1 A1-> 0 Theory of Computation theory-of-computation regular-expression context-free-language context-free-grammar regular-language + – vishal8492 2.1k views answer comment Share Follow Print See 1 comment 1 1 comment reply mohit chawla commented Dec 6, 2016 reply Follow flag I think you are right @vishal. it should be None of these as 0 or 00 or 0* is not in lang unless it conatins one 1 and both grammer are producing it. so it should be none of these. 1 1 replyShare Please log in or register to add a comment.
0 0 votes i think the grammar whould be S -> 0S | A A -> 1B B -> 0B | 1B B -> epsiloon Vishal Goyal answered Jun 22, 2017 Vishal Goyal comment Share Follow 0 reply Please log in or register to add a comment.
0 0 votes Create NFA for the given expression and from that grammer is as follows: replace A0 with S and A1 with A S->0S | 1A A -> 0A | 1A | epsilon the above grammer doesn't match with option A and B In the options A and B they have production rule A0 -> A1 (As mentioned by @vishal8492) which will produce string "0" which is not accepted by the regular expression. So the answer would D. akhileshreddy answered Jul 13, 2017 • edited Jul 13, 2017 by akhileshreddy akhileshreddy comment Share Follow See 1 comment 1 1 comment reply Ram Swaroop commented Dec 20, 2018 reply Follow flag Smallest string 1 cannot be generate by both so answer option d 0 0 replyShare Please log in or register to add a comment.