简体   繁体   English

抽引引理以显示`{a ^ nb ^ m | n = km对于N中的k是不规则的

[英]Pumping lemma to show that `{a^n b^m | n=km for k in N}` is not regular

How am I supposed to prove that L={a^nb^m | n=km for k in N} 我应该如何证明L={a^nb^m | n=km for k in N} L={a^nb^m | n=km for k in N} is not a regular language using the pumping lemma? L={a^nb^m | n=km for k in N}不是使用抽水引理的常规语言?

I started with taking a word w in L , w=a^nb^m with n=km for some k in N . 我首先在L取一个词w ,对于N一些kw=a^nb^mn=km There are three possible decompositions for w : w有三种可能的分解:

  1. a^i * a^j * a^(nij) b^m
  2. a^i * a^(ni) b^j * b^(mj)
  3. a^nb^i * b^j * b^(mij)

Pumping the middle part in point 2) will result in a mixed up word, which is clearly not in L , but I can't figure out why 1) can't give you a good decomposition: 在点2)中抽取中间部分将导致单词混淆,这显然不在L ,但我不知道为什么1)无法给您带来良好的分解:

Let's say you pump a^j x times. 假设您将a^ja^j x次。 Then the amount of a's in the new word will be i+xj+nij = n+(x-1)j . 那么新单词中a的数量将为i+xj+nij = n+(x-1)j We know n=km for some m . 我们知道n=km大约m We have to show that there exists an x such that the new word is not in L . 我们必须证明存在x使得新单词不在L But let's assume j=m (This is certainly possible, since n=km there is always a sufficient amount of a's, except when k=0 , but then we get a trivial case). 但是让我们假设j=m (这当然是可能的,因为n=km总是有足够数量的a,除了k=0 ,但是得到的情况很简单)。 Then n+(x-1)j = km+(x-1)m = m(n+x-1) which is of the form {a^nb^m | n=km for k in N} n+(x-1)j = km+(x-1)m = m(n+x-1) ,形式为{a^nb^m | n=km for k in N} {a^nb^m | n=km for k in N} for all x . 对于所有x {a^nb^m | n=km for k in N} So for each w we have a decomposition uvz such that uv^iz is in L for all i . 因此,对于每个w我们都有一个分解uvz ,使得uv^iz对于所有i都在L中。 Thus, by the pumping lemma, L is regular. 因此,通过抽运引理, L是规则的。

What am I missing? 我想念什么?

EDIT: The formulation of the Pumping lemma given: 编辑:给出抽水引理的公式:

Let L be a regular language accepted by a DFA with k states. L为DFA接受k个状态的常规语言。 Let w be any word in L with length >= k . wL中长度>= k任何单词。 Then w can be written as uvz with |uv| <=k 然后可以用|uv| <=kw编写为uvz |uv| <=k |uv| <=k , v>0 and uv^iz in L for all i>=0 所有i>=0 |uv| <=kv>0L uv^iz

A perhaps easier way to proof this is first modifying the language. 一种可能更简单的证明方法是首先修改语言。

Since regular languages are closed under complement and the intersection with another regular expression. 由于正则语言在补码和与另一个正则表达式的交集下是封闭的

This means that you can proof L is not a regular language by proving complement(L) is not a regular language, because if L' is a regular language, L is and vice versa. 这意味着,你可以证明L是不是证明一个正规语言complement(L)是不是一个正规的语言,因为如果L'是一个普通的语言, L的,反之亦然。 The same holds for the intersection. 交叉口也是如此。

It is sufficient to proof that L' is not regular as well: 足以证明L'也不规则:

L' = intersection(complement(L),a*b*})

Thus 从而

L'={a^nb^m|n != k*m, for any k in N}

Then the proof becomes way easier because you can show for whatever part you use as the pumping lemma, if it has length l , you can pump it enough times to reach a multiple. 然后,证明就变得更加容易了,因为您可以显示用作抽出引理的任何部分,如果长度为l ,则可以抽出足够的次数以达到倍数。

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

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