Question

Let L be the language {0n 1m : n ≤ m ≤ 2n}. Is L regular?...

Let L be the language {0n 1m : n ≤ m ≤ 2n}. Is L regular? contextfree but not regular? or not context-free? Show that your answer is correct.

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

pumping lemma for regular languages:

1)assume given language is regular and there exist a finite automata with 2k states.

2)take a valid string z from L.

z=00111

3)divide the string z into 3 parts,U,V,W in such a way that |V|>=1 and |UV|<=2k

U=0

V=0

W=111

4)if for any value of i, UVIW belongs to L then L is regular otherwise L is not regular.

say i=3 then UViW becomes 0000111  this is not belongs to L

this is contradiction to given statement.

therefore L is not regular.

The given language is context free because we can able to write context free grammar for this:

cfg is

S-.>0S11 | A

A->0A1 | ϵ

Add a comment
Know the answer?
Add Answer to:
Let L be the language {0n 1m : n ≤ m ≤ 2n}. Is L regular?...
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