简体   繁体   English

为什么为CFG抽引引理不起作用

[英]Why pumping lemma for CFG doesn't work

Language: 语言:

{(a^i)(b^j)(c^k)(d^l) : i = 0 or j = k = l}

We take word 我们相信

w = a^0 b^n c^n d^n

Which obviously belongs to the language because j = k = l 显然属于语言,因为j = k = l

w = uvxyz w = uvxyz

  1. |vxy| | vxy | <= n <= n

  2. |vy| | vy | > 1 > 1

and now v and y can be: 现在v和y可以是:

  1. just a single character and if we pump single character the word is no longer in the language 只是一个字符,如果我们抽单个字符,该单词将不再是该语言

  2. two characters, count of the third will be lower so the word is not in the language 两个字符,第三个字符的数量会减少,因此该单词不在语言中

So, the proof that this language is not CF is not supposed to be do-able with standard pumping lemma, just with the ogdens lemma, but I don't understand why the proof above is invalid. 因此,该语言不是CF的证明不应与ogdens引理一起用于标准泵送引理,但我不理解为什么以上证明无效。

It doesn't work because in fact every pumped string is in the language, because you still have no a s (that is, i=0). 它不会因为其实每个泵串在语言的工作,因为你还没有a S(即,I = 0)。

And if you choose a string where i > 0, then you can't guarantee that v isn't just some number of a s, and x is the empty string. 而且,如果您选择i> 0的字符串,则无法保证v不仅a s的某个数字,而且x是空字符串。

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

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