简体   繁体   English

我们如何使用抽水引理证明这种语言是不规则的?

[英]how do we prove that this language is irregular using the pumping lemma?

while solving, I came across a tricky question that asked me to prove that a certain language is irregular using the pumping lemma.在解决时,我遇到了一个棘手的问题,要求我使用抽水引理证明某种语言是不规则的。 that question is as follows:这个问题如下:

prove that the language L is irregular using the pumping lemma, where L is a language over the alphabet {0,1,$}.使用泵引理证明语言 L 是不规则的,其中 L 是字母表 {0,1,$} 上的语言。

L = { XW$WY | L = { XW$WY | X,Y ∈ {0,1} * , W ∈ {0,1} + } X,Y ∈ {0,1} * , W ∈ {0,1} + }

my approach was to pick a string the string S = 0 p $0 p where X and Y are equal to Э, and P is the pumping length.我的方法是选择一个字符串 S = 0 p $0 p其中 X 和 Y 等于 Э,P 是泵送长度。
Now, let's divide the string into 3 parts let's call them Y1,Y2,Y3.现在,让我们将字符串分成 3 部分,我们称它们为 Y1、Y2、Y3。

to fulfill the conditions of the pumping lemma, the concatenation of the 3 parts would have to have a length > P, and |Y2|为了满足抽水引理的条件,这 3 个部分的串联必须具有 > P 的长度,并且 |Y2| > 0, and |Y1Y2| > 0,并且 |Y1Y2| <= P. <= P。

so our Y1 and Y2 would consist of 0s only, and Y3 would be $0 p .所以我们的 Y1 和 Y2 将只包含 0,而 Y3 将是 $0 p so, our string would look like this: 0 i 0 j $0 p where i+j <= P. clearly pumping Y2(0 j ) would change the length of first W so the new string Y1Y2 i Y3 would not belong to L. but what's confusing me is the fact that we can always change X to make the first W equal to the second.所以,我们的字符串看起来像这样: 0 i 0 j $0 p其中 i+j <= P。显然抽 Y2(0 j ) 会改变第一个 W 的长度,所以新字符串 Y1Y2 i Y3 不属于 L。但令我困惑的是,我们总是可以改变 X 以使第一个 W 等于第二个。 so, whatever the i is, we can always assume that the difference in length is actually because of X. am I missing something?所以,无论 i 是什么,我们总是可以假设长度的差异实际上是因为 X。我错过了什么吗?

Yes, your choice of string is bad for the reason you explain: you cannot know for certain what X is.是的,由于您解释的原因,您选择的字符串是错误的:您无法确定 X 是什么。 We can force the choice of X, however.但是,我们可以强制选择 X。 Consider 1 0^p $ 1 0^p.考虑 1 0^p $ 1 0^p。 This can only be a string in the language for X = empty and Y = empty.这只能是 X = 空和 Y = 空的语言中的字符串。 Pumping v can only affect the prefix before $ and will always result in a string not in the language, a contradiction.抽 v 只能影响 $ 之前的前缀,并且总是会导致字符串不在语言中,这是矛盾的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM