Question

5. (10 points) Convert the following grammar G over Σ-{a, b} into Chomsky normal form. Note that G already satisfies the cond

0 0
Add a comment Improve this question Transcribed image text
Answer #1

1. Add anew start symbol S0.

Hence grammar becomes

S0->S

S->bT

T->aAA|AbAT

A->aT|bT|a

2.no null productions and no unit productions are there . Hence skip to next step by removing unit production S0->S

3.Remove terminals on right side that exists with non terminals.

S0->S

S->YT

T->XAA|AYAT

A->XT|YT|a

X-> a

Y-> b

4.Reduce productions that has more than 2 non terminals. In this case T->XAA and T->AYAT

Hence reduced form can be given by:

S0->S

S->YT

T->XZ|AL

A->XT|YT|a

X-> a

Y-> b

Z-> AA

L->YM

M->AT

Add a comment
Know the answer?
Add Answer to:
5. (10 points) Convert the following grammar G over Σ-{a, b} into Chomsky normal form. Note that ...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT