• retagged by
2,142 views
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

2 Answers

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.
• edited by
Position:
Show:

Related questions

1 1 vote
2 answers 2 answers
3.5k
3.5k views
2 2 votes
1 1 answer
2.4k
2.4k views
rahuljai asked Dec 13, 2018
2,414 views
Which of the following languages is regular? L = { bba (ba)* a^n-1 | n 0 }L = {a^nb^n | n < 1000 }L = {a^nb^k | n is odd or k is even }L = {wxw^R | w,x ∈(0+1)* }1, 3 and...
0 0 votes
1 1 answer
805
805 views
1 1 vote
2 2 answers
1.4k
1.4k views
vishal8492 asked Dec 6, 2016
1,404 views
Having hard time , to understand why (A) isn't the answer ? Looking at DFA it looks , 2* is good starting state ; then there are two paths 0 first path good enough ; for ...