Question

Construct a context-free grammar for the language L={ ababan> 1}.

which of these answers is correct?

NUMBER 1

S → AAa A → aB B → 6B|bb

NUMBER 2

S->ata T-> bCb C->bCba

also please give the reason.

Thank you!

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

Solution:-

Correct option - Number 1

Grammar represented by Number 2 is incorrect because it can generate string ababa which is not acceptable by the language L = { ab^nab^na | n>1}. The minimal length string produced by this language is abbabba which is not so the case in Number 2 the minimal length string produced by it is ababa.

Add a comment
Know the answer?
Add Answer to:
which of these answers is correct? NUMBER 1 NUMBER 2 also please give the reason. Thank...
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
Active Questions
ADVERTISEMENT