Question: Eliminate the variable B from the grammar S aSB | bB , B aA | b 2 . ( 1 5 pts ) Show that

Eliminate the variable B from the grammar
S aSB | bB,
B aA | b
2.(15pts) Show that the two grammars
S abAB | ba,
A aaa,
B aA | bb
and
S abAaA | abAbb | ba,
A aaa
are equivalent.
3.(15pts) Eliminate all useless productions from the grammar
S aS | AB |,
A bA,
B AA
What language does this grammar generate?
4.(15pts) Eliminate all -productions from
S AaB | aaB,
A ,
B bbA |

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!