Question

Consider the language L _ {w E {a,b) : the longest run of as in u, is longer than any run of bs in w} For example, abbbbaabbbaaaaa E L because the longest run of bs in it has length four, while the longest run of as has length six. Prove that L is not context-free.

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

To Prove a language is not Context Free we use Pumping Lemma for CFL.

If L is any CFL and z \small \epsilon L such that |z| \tiny \geq n, if z = uvwxy \small \epsilon L ( |uvx| \tiny \leq |z| , |vx| != 0)

then uviwxiy \small \epsilon L , \small \forall i \tiny \geq 0.

Every CFL satisfies pumping lemma.

Now consider z = abbbbaabbbaaaaaa

take u = a, v = bbbb, w = aa, x = bbb, y = aaaaaa

Here in uviwxiy take i = 2 now it will bw uv2wx2y

Hence uv2wx2y = a(bbbb)2aa(bbb)2aaaaaa = abbbbbbbbaabbbbbbaaaaaa

Now in this string it is saying that longest run of a's in w is shorter than any run of b's in w.

This is a contradiction, Hence this Language is not CFL.

Add a comment
Know the answer?
Add Answer to:
Consider the language L _ {w E {a,b)' : the longest run of a's in u,...
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