2,463 views
2 votes
2 votes
Remove all unit-productions, all useless productions, and all λ-productions from the grammar

$S\rightarrow aA|aBB,$

$A\rightarrow aaA|\lambda,$

$B\rightarrow bB|bbC,$

$C\rightarrow B.$
What language does this grammar generate?

1 Answer

0 votes
0 votes

After removing Epsilon production

S ->aA/a/aBB

A->aaA/aa

B->bB/bbC

C->B

--------------------------------------------------------------------------

After removing Unit production

S->aA/a/aBB
A->aaA/aa

B->bB/bbB

--------------------------------------------------------------------------

After removing Useless symbol 

S->aA/a/aBB

A->aaA/aa

Related questions

0 votes
0 votes
0 answers
1
0 votes
0 votes
0 answers
4