Question

Prove the following languages are not context-free by using the pumping
lemma.

{b(n) #6(n + 1) | n є N, n-1} where b(n) is binary representation of n with no leading 0

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

Pumping Lemma for CFL states that for any Context Free Language L, it is possible to find two substrings that can be ‘pumped’ any number of times and still be in the same language. For any language L, we break its strings into five parts and pump second and fourth substring.
Pumping Lemma, here also, is used as a tool to prove that a language is not CFL. Because, if any one string does not satisfy its conditions, then the language is not CFL.
Thus, if L is a CFL, there exists an integer n, such that for all x ∈ L with |x| ≥ n, there exists u, v, w, x, y ∈ Σ∗, such that x = uvwxy, and
(1) |vwx| ≤ n
(2) |vx| ≥ 1
(3) for all i ≥ 0: uviwxiy ∈ L

Let us assume that n = 8.

Then, b(n) = 1000 and b(n+1) = 1001

Hence, x = 1000#1001

Let

u = 1000#, v = 1, w = 0, x = 0 and y = 1

Clearly, |vwx| ≤ n and |vx| ≥ 1

And, uviwxiy = 1000#1i00i1

Clearly, 1i00i1 does not represent b(n+1) and hence, L is not context free.

Add a comment
Know the answer?
Add Answer to:
Prove the following languages are not context-free by using the pumping lemma. {b(n) #6(n + 1) | n є N, n-1} where b(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