262 views
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)

retagged | 262 views
0
it may be the case when both of them B and C are not Epsilon at same time.

A-> b | D | bD
0
Yes you are right in elimination of epsilon you will get A->epsilon .No doubt about it
0
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
I don't know why they have not written it ...The grammar definetly consists A->epsilon after epsilon elimination

+1 vote
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
by Boss (12.6k points)
selected
0
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
Corrected . prajwal now check
yes A produces epsilon because B and C produce epsilon.
by Active (1.3k points)

Solution:

S -> Abac | baC | Aba | ba

A -> BC | B | C

B -> b

C -> D

D ->d

by (145 points)

+1 vote