Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
195 views
in Technique[技术] by (71.8m points)

formal languages - Show is not regular with pumping lemma

I need help on this pumping lemma case:

L_1 :={a^n b^m c^k | n = m or k = 0}

Can someone explain how to handle k=0?

I started with abc^n, but I don't know how to split this in uvw.

question from:https://stackoverflow.com/questions/65644457/show-is-not-regular-with-pumping-lemma

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Assume the language is regular. Then, by the pumping lemma for regular languages, strings in the language of length at least p can be written as uvx where |uv| <= p, |v| > 0 and for all n >= 0, u(v^n)x is also a string in the language. Let's choose the string a^p b^p c. This string is in the language because, while k is not equal to zero, it is the case that n = m. If we write uvx = a^p b^p c, the constraints tell us that the prefix uv can consist only of the symbol a (since |uv| <= p). But it also says we can pump some substring of this and get other strings in the language; this is a contradiction since changing the number of a without changing the number of b will make it so that n is not equal to m. Our assumption that the language was regular, and that the pumping lemma for regular languages applied to it, must have been incorrect. Ergo, the language is not regular.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...