lil pumping lemma

Ace your homework & exams now with Quizwiz!

Let C = { a ^i b ^j c ^k | 0 <= i <= j <= k }

Assume that C is a CFL and obtain a contradiction. Let p be the pumping length given by the pumping lemma. We use the string s = a p b p c p that we used earlier, but this time we must "pump down" as well as "pump up." Let s = uvxyz and again consider the two cases that occurred in Example 2.36. When both v and y contain only one type of alphabet symbol, v does not contain both a 's and b 's or both b 's and c 's, and the same holds for y . Note that the reasoning used previously in case 1 no longer applies. The reason is that C contains strings with unequal numbers of a 's, b 's, and c 's as long as the numbers are not decreasing. We must analyze the situation more carefully to show that s cannot be pumped. Observe that because v and y contain only one type of alphabet symbol, one of the symbols a , b , or c doesn't appear in v or y . We further subdivide this case into three subcases according to which symbol does not appear. he a 's do not appear . Then we try pumping down to obtain the string uv 0 xy 0 z = uxz . That contains the same number of a 's as s does, but it contains fewer b 's or fewer c 's. Therefore, it is not a member of C , and a contradiction occurs. The b 's do not appear. Then either a 's or c 's must appear in v or y be- cause both can't be the empty string. If a 's appear, the string uv 2 xy 2 z contains more a 's than b 's, so it is not in C . If c 's appear, the string uv 0 xy 0 z contains more b 's than c 's, so it is not in C . Either way, a contradiction occurs. The c 's do not appear. Then the string uv 2 xy 2 z contains more a 's or more b 's than c 's, so it is not in C , and a contradiction occurs. 2. When either v or y contains more than one type of symbol, uv 2 xy 2 z will not contain the symbols in the correct order. Hence it cannot be a member of C , and a contradiction occurs.

use the pumping lemma to show that E = { 0^i 1^j | i > j } is not regular

Assume that E is regular. Let p be the pumping length for E given by the pumping lemma. Let s = 0^(p+1) 1^p. Then s can be split into xyz , satisfying the conditions of the pumping lemma Consider the string xy^0z. By condition 3 y must consist of only 0's. Removing string y decreases the number of 0 s in s . Recall that s has just one more 0 than 1 . Therefore, xz cannot have more 0 s than 1 s, so it cannot be a member of E . Thus we obtain a contradiction.

Let B be the language { 0^n 1^n | n = 0 } . Prove B is not regular

Assume to the contrary that B is regular. Let p be the pumping length given by the pumping lemma. Choose s to be the string 0^p 1^p . Because s is a member of B and s has length more than p , the pumping lemma guarantees that s can be split into three pieces, s = xyz , where for any i >= 0 the string xy^iz is in B. Note that y can contain only 0's by condition 3. If this is the case then xyyz cannot be in B, since there will be more 0's than 1's in the string.

Let F = { ww | w consists of { 0 , 1 } * } . Show that F is nonregular, using the pumping lemma

Assume to the contrary that F is regular. Let p be the pumping length given by the pumping lemma. Let s be the string 0^p 1 0^p 1 . Because s is a member of F and s has length more than p , the pumping lemma guarantees that s can be split into three pieces, s = xyz , satisfying the three conditions of the lemma. By condition 3, y must consist of only 0's, so the string xyyz cannot be in F as it has an non-matching number of 0's

Pumping lemma for context-free languages

If A is a context-free language, then there is a number p (the pumping length) where, if s is any string in A of length at least p , then s may be divided into five pieces s = uvxyz satisfying the conditions 1. for each i >= 0 , uv^i xy^i z is in A , 2. |vy| > 0 , and 3. |vxy| <= p .

Pumping lemma for regular languages:

If A is a regular language, then there is a number p (the pumping length) where if s is any string in A of length at least p , then s may be divided into three pieces, s = xyz , satisfying the following conditions: 1. for each i >= 0 , xy^i z is in A , 2. |y| > 0 3. |xy| <= p .

Let D = { ww | w consists of { 0 , 1 } * } . Use the pumping lemma to show that D is not a CFL .

We show that the string s = 0 p 1 p 0 p 1 p cannot be pumped. This time we use condition 3 of the pumping lemma to restrict the way that s can be divided. It says that we can pump s by dividing s = uvxyz , where | vxy |= p . First, we show that the substring vxy must straddle the midpoint of s . Otherwise, if the substring occurs only in the first half of s , pumping s up to uv 2 xy 2 z moves a 1 into the first position of the second half, and so it cannot be of the form ww . Similarly, if vxy occurs in the second half of s , pumping s up to uv 2 xy 2 z moves a 0 into the last position of the first half, and so it cannot be of the form ww . But if the substring vxy straddles the midpoint of s , when we try to pump s down to uxz it has the form 0 p 1 i 0 j 1 p , where i and j cannot both be p . This string is not of the form ww . Thus s cannot be pumped, and D is not a CFL .


Related study sets

Biology - Photosynthesis: A Closer Look

View Set

Module 10 - Multiple Trauma Chest/Abdomen

View Set

Soci3501: Race & Ethnicity CH 1-10 M.C. & T/F Questions

View Set

Gram stain/ Acid-fast / Endospores

View Set

History Chapter 11 Key Terms and Names

View Set

Jazz History Chapter 11 Study Guide

View Set

Writing an E-mail about an Important Issue

View Set

MKT Consumer Behavior Exam 2 Short Answer Qs

View Set

Anthropology Midterm (Ch. 5 and 6)

View Set