简体   繁体   English

这是普通语言吗? {0 ^ n 1 ^ m | m!= n},我不理解抽水长度的直接证明

[英]Is this language regular? {0^n 1^m | m != n}, I don't understand the direct proof by pumping length

There is a direct way to prove it: If p is the pumping length and we take the string s = 0 p 1 p+p! 有一个直接的方法可以证明这一点:如果p是抽水长度,我们将字符串s = 0 p 1 p+p!取为整数s = 0 p 1 p+p! , then no matter what the decomposition s = xyz is the string xy 1+p!/|y| z ,那么不管分解s = xyz是字符串xy 1+p!/|y| z xy 1+p!/|y| z will equal 0 p+p! 1 p+p! xy 1+p!/|y| z等于0 p+p! 1 p+p! 0 p+p! 1 p+p! which is not in the language. 这不是语言。

I don't understand the value y given here. 我不明白这里给定的价值。

y is some substring that can be "pumped" - repeated * times - and still keep the language regular. y是可以“抽出”的子字符串-重复*次-仍然保持语言规则。 Basically, we have to find a loop in there somewhere, and that loop is what y represents. 基本上,我们必须在某处找到一个循环,而该循环就是y代表的。

Basically, if the language is of the form 0 m 1 m! 基本上,如果语言的形式为0 m 1 m! ( m zeroes followed by m! ones) then there can't be a loop in there. m零后跟m!个),那么那里就不可能有循环。

In this case, y represents "the hypothetical pump string for the subset language {0 m 1 m! } " - hypothetical because it cannot exist! 在这种情况下, y表示“子集语言{0 m 1 m! }的假设泵字符串”-假设因为它不存在! Clearly, no pumping is possible for this smaller language, since repetition will take us out of the language immediately. 显然,这种较小的语言不可能抽水,因为重复会立即使我们脱离该语言。 (consider the example 00111111 - can we find a pump string for this?) Therefore, we have a special case of the language which is not regular, therefore the language generally is not regular. (考虑示例00111111我们可以为此找到一个泵字符串吗?)因此,我们有一种特殊情况,该语言是不规则的,因此该语言通常是不规则的。 (though it certainly contains special cases which are regular, but this is not in dispute) (尽管它当然包含常规的特殊情况,但这没有争议)

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

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