3
L = { w | w in {0,1}* and w has equal number of 0s and 1s }

Let n be the number of the pumping lemma.

I pick s = 0n 1n and y = 0t where 1 <= t <= n.

Which gives xyz = 0(n-t) 0t 1n= 0n 1n which is in L.

But xz = 0(n-t) 1n is not in L. Contradiction.

Did I apply it correct?

4

1 回答 1

2

嗯......你几乎!那里。就在最后一条语句中,您没有将字符串抽到w = xyz.y

现在我们首先假设 L 是规则的 whereL = { w | w in {0,1}* and w has equal number of 0s and 1s }然后我们将继续证明对于任何泵送字符串i >= 0,即w = xy i z不包含相等数量的 0 和 1(本身是矛盾的)因此,语言不规则:

L 由 给出:

L = {0 n 1 n | n >= 0}

如果 y = 0 t => w = 0 n-t 0 t 1 n

现在在为 i >= 0 抽 y 之后,我们得到

xyz = 0 n-t 01 n

-> xy i z = 0 n+(i-1)t 1 n

现在因为 n+(i-1)t 不等于 n 这与我们的假设相矛盾, L = { w | w in {0,1}* and w has equal number of 0s and 1s }因此xy i z不属于L

注意-您还需要考虑其他情况,例如y = 0 t 1 1、 y = 1 t等,稍后证明这些确实意味着矛盾。

于 2013-09-01T05:48:50.733 回答