简体   繁体   中英

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) | m,n >= 0 } is not Context Free.

Consider the string a^pb^pc^p in the language. By the pumping-lemma for context-free languages, this string can be written as uvxyz such that:

  • |vxy| < p
  • |vy| > 0
  • u(v^n)x(y^n)z is also in the language for all natural numbers n

There are five cases to consider for the placement of vxy in our string:

  1. vxy is entirely in the first section of a's only. 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. This placement of vxy does not work.

  2. vxy spans the a's and the b's. Choosing n = 0 and pumping down will lose a's and b's. Since the number of c's isn't being decreased commensurately, this choice for vxy doesn't work either.

  3. vxy is entirely in the section of b's only. The same argument from case 1 applies here as well.

  4. vxy spans the a's ad the c's. Choosing n > 0 and pumping up will add b's and c's. Now the number of c's will be strictly greater than the number of a's, which means this choice doesn't work either.

  5. vxy is entirely in the section of c's only. 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.

There were five possible places to put vxy in our string, and all of them failed. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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