The Gateway to Computer Science Excellence
0 votes
250 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)
in Theory of Computation by Active (1.4k points)
retagged by | 250 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

3 Answers

+1 vote
Best answer
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.5k points)
selected by
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
0 votes
yes A produces epsilon because B and C produce epsilon.
by Active (1.3k points)
0 votes

Solution:

S -> Abac | baC | Aba | ba

A -> BC | B | C

B -> b

C -> D

D ->d

by (145 points)

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,645 questions
56,587 answers
195,788 comments
101,841 users