Question

Construct a context-free grammar for the language L={ ab”ab”a | n> 1}.

With Proper explanation and example.

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

Answer

S -> aAa
A -> bAb | bbabb

Explanation

S -> aAa
Above is for first a and last a

We are left with b^n a b^n


n>1 which means n should be 2, 3, 4, etc

Minimum of 2 should be there for n.


So, bbabb is there

To have 0/more b's, we have b -> bAb

Please up vote

Add a comment
Know the answer?
Add Answer to:
With Proper explanation and example. Construct a context-free grammar for the language L={ ab”ab”a | n>...
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