edited by
656 views
2 votes
2 votes

I'm getting 4, can someone verify

edited by

1 Answer

0 votes
0 votes
Elimination of useless symbol

using bottom up then top down approach we get

S->B

B->a | bC

C-> a | $\epsilon$

Now we remove unit production  we get

S->a | bC

C->a | $\epsilon$

Now we remove null production we get

S-> a | b | bC

C-> a

Total production 4

Related questions

3 votes
3 votes
0 answers
1
0 votes
0 votes
1 answer
2
1 votes
1 votes
1 answer
3
2 votes
2 votes
1 answer
4