简体   繁体   English

上下文无关语言(泵引理a ^ nb ^ mc ^ min(n,m))

[英]Context free language (Pumping lemma a^n b^m c^min(n,m))

I'm struggling to solve the following problem. 我正在努力解决以下问题。 I'm supposed to use the pumping lemma. 我应该使用抽水引理。

To prove {a^nb^mc^min(n,m) | 证明{a ^ nb ^ mc ^ min(n,m)| m,n >= 0 } is not Context Free. m,n> = 0}不是上下文无关的。

Consider the string a^pb^pc^p in the language. 考虑该语言中的字符串a^pb^pc^p By the pumping-lemma for context-free languages, this string can be written as uvxyz such that: 通过无上下文语言的泵送引理,可以将该字符串写为uvxyz,使得:

  • |vxy| | vxy | < p <p
  • |vy| | vy | > 0 > 0
  • u(v^n)x(y^n)z is also in the language for all natural numbers n u(v ^ n)x(y ^ n)z也是所有自然数n的语言

There are five cases to consider for the placement of vxy in our string: 将vxy放置在我们的字符串中有五种情况需要考虑:

  1. vxy is entirely in the first section of a's only. vxy完全在a的第一部分中。 If we choose n = 0 and pump down, we lose a's, but then the number of c's would need to be reduced as well to remain in the language. 如果我们选择n = 0并抽水,我们将输掉a,但随后也需要减少c的数量以保留在语言中。 This placement of vxy does not work. vxy的此放置不起作用。

  2. vxy spans the a's and the b's. vxy跨越a和b。 Choosing n = 0 and pumping down will lose a's and b's. 选择n = 0并抽空将丢失a和b。 Since the number of c's isn't being decreased commensurately, this choice for vxy doesn't work either. 由于c的数量没有相应减少,因此vxy的选择也不起作用。

  3. vxy is entirely in the section of b's only. vxy完全在b的部分中。 The same argument from case 1 applies here as well. 案例1中的相同论点也适用于此。

  4. vxy spans the a's ad the c's. vxy跨越a的广告和c的广告。 Choosing n > 0 and pumping up will add b's and c's. 选择n> 0并泵浦将增加b和c。 Now the number of c's will be strictly greater than the number of a's, which means this choice doesn't work either. 现在,c的数量将严格大于a的数量,这意味着该选择也不起作用。

  5. vxy is entirely in the section of c's only. vxy完全在c的部分中。 Pumping in either direction will make the number of c's different from the number of a's and from the number of b's, so that choice fails as well. 向任一方向泵送都会使c的数量与a的数量和b的数量不同,因此选择也会失败。

There were five possible places to put vxy in our string, and all of them failed. 将vxy放在我们的字符串中可能有五个位置,但所有这些都失败了。 That means our string cannot be written according to the requirements of the pumping lemma and, as a result, our language cannot be context-free. 这意味着我们的字符串不能根据泵送引理的要求来编写,因此,我们的语言也不能与上下文无关。

暂无
暂无

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

相关问题 抽引引理以显示`{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 语言L = {a ^(n)b ^(m)c ^(k)的无上下文语法:m = | i-k |} - Context-free grammar for the language L = {a^(n)b^(m)c^(k): m = |i - k|} L = {a^na^nb^m |m, n ≥ 0} 是规则语言还是不规则语言? - Is L = {a^n a^n b^m |m, n ≥ 0} a regular or irregular language? 使用抽水引理表明以下语言不是正则语言 L = {anbm | n = 2m} - Use the pumping lemma to show that the following languages are not regular languages L = {anbm | n = 2m} 这是普通语言吗? {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 是L = {a ^ nb ^ m | n&gt; m}常规或不规则的语言? - Is L = {a^n b^m | n>m} a regular or irregular language? 为什么 a^mb^n where m,n &gt; 0 是常规语言但 a^nb^n where n &gt; 0 是非常规语言 - why a^m b^n where m,n > 0 is a regular language but a^n b^n where n > 0 is non regular language L = {a ^ nb ^ nc ^ md ^ m:n&gt; = 1,m&gt; = 1} U {a ^ nb ^ mc ^ md ^ n:n&gt; = 1,m&gt; = 1} isRegular? - L = { a^n b^n c^m d^m : n >= 1, m >= 1 } U { a^n b^m c^m d^n : n >= 1, m >= 1 } isRegular? 语言0 ^ m.0 ^ n是否为0 &lt;= m &lt;= n常规语言? - Is the language 0^m.0^n , 0<=m<=n regular? Pumping lemma(常规语言) - Pumping lemma (Regular language)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM