Question

4. (Non-CFLs) Prove that the following languages are not context-free. (b) The following language over the...

4. (Non-CFLs) Prove that the following languages are not context-free.

(b) The following language over the alphabet {a, b, c}:

B = {aix | i ≥ 0, x ∈ {b, c}* , and if i = 1 then x = ww for some string w}.

(Careful: B satisfies the pumping lemma for CFLs! Make sure you understand why, but you don’t need to write it down.)

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

If you take   i=1    x= aww , It is not CFL .

Example L = { WW | W belongs to {a, b}* } is not context free.

One might think to draw a non-deterministic push down automaton, but it will not help as first symbol will be at

bottom of the stack and when the second W starts, we will not be able to compare it with the bottom of stack.

Because CFL is accept by PDA(push down automata)   and PDA use stack .

stack can accept W W^r   where   W^r is reverse/palindrome of W , but not WW.

-> Stack is LIFO(last in first out ) means what's we push in stack , we pop out reverse of it .

And ww is a subset of B(B=aix i>=0 as given in question) . So if subset is not CFL , then its superset also not CFL.

Add a comment
Know the answer?
Add Answer to:
4. (Non-CFLs) Prove that the following languages are not context-free. (b) The following language over the...
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