请输入您要查询的字词:

 

单词 PumpingLemmacontextfreeLanguages
释义

pumping lemma (context-free languages)


Let L be a context-free language (a.k.a. type 2 languagePlanetmathPlanetmath). Then there existtwo integers m and n such that, if the length of a word W is greaterthan m, then W=ABCDE where A,B,C,D,E are subwords such that

  1. 1.

    The length of the subword BCD is less than n.

  2. 2.

    BD is not be empty.

  3. 3.

    For all integers k>0, it is the case that ABkCDkE belongs to L,where exponentiation denotes repetition of a subword k times.

An important use of this lemma is that it allows one to show that a languageis not context-free. (Remember, just because a language happens to be describedin terms of a context-sensitive grammar does not automatically preclude thepossibility of describing the same language also by acontext-free language.) The idea is to assume that the language iscontext-free, then arrive at a contradictionMathworldPlanetmathPlanetmath via this lemma.

As an illustrative example, consider the following language, which consists ofbut one terminal symbol, ‘x’ and which consists of all strings of ‘x’ ’s whoselength is a perfect squareMathworldPlanetmath. Were this a context-free language, there wouldexist integers m and n as above. Choose an integer h such that h2>m.Then the word xh2 belongs to our language and the lemma tells us thatit can be written as ABCDE so as to satisfy the conditions enumerated above.Write A=xa, B=xb, C=xc, D=xd, E=xe for suitable nonnegative integers a,b,c,d,e. Then we have a+b+c+d+e=k2;by condition , b+d>0 and, by condition , a+kb+c+kd+e wouldhave to be a perfect square because ABkCDkE would be a word of thelanguage. This, however, leads to a contradiction: h2+k(b+d)could not possibly be a perfect square for all k unless b+d=0.

As an exercise, the reader may consider constructing a context-sensitivegrammar for this language and posting it as an attachment to this entry(at which time this sentenceMathworldPlanetmath will come down).

随便看

 

数学辞典收录了18232条数学词条,基本涵盖了常用数学知识及数学英语单词词组的翻译及用法,是数学学习的有利工具。

 

Copyright © 2000-2023 Newdu.com.com All Rights Reserved
更新时间:2025/5/5 0:14:23