Question

CONSTRUCT A CFG for the following language= A = 2 bi #bire lixo be denotes binary representation of an integerk, where, witho

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

ANSWER

S -> 1B1 | 0A1

B -> 0B0 | 1B1 | 0A1

A -> 1A0 | #

EXPLANATION

To avoid leading zeros, taken 1B1 to let the string start with 1

S -> 0A1 is the base case where 0#1 can be formed

B is for matching numbers

B -> 0A1 is for i+1th string check

Add a comment
Know the answer?
Add Answer to:
CONSTRUCT A CFG for the following language= A = 2 bi #bire lixo be denotes binary...
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