{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# l5 - Lecture 5 Pumping Lemma and Closure Properties David...

This preview shows pages 1–6. Sign up to view the full content.

Lecture 5: Pumping Lemma and Closure Properties David Dill Department of Computer Science 1

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Outline Pumping Lemma Closure properties. 2
Pumping Lemma Primary application: Proving that certain languages are not regular. Lemma: For every regular language L , there exists a positive constant n such that for every string w in L such that | w | ≥ n , there exist strings x, y, z such that w = xyz with the following properties: y negationslash = ǫ • | xy | ≤ n xy k z L for all k 0 . 3

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Understanding the Pumping Lemma The pumping lemma is a little difficult to understand because of all the “alternating quantifiers” ( L n w x, y, z k . . . ) With such theorems, it is often helpful to think of a game with two players. Player is trying to make the theorem true, player is trying to falsify it. For applications of the Pumping Lemma, it’s most useful to treat L as the “game board,” which is given, and take the game from there. Player : Chooses the constant n . player : Chooses w L such that | w | ≥ n . Player : Chooses xyz = w such that y negationslash = ǫ and | xy | ≤ n . player : Chooses k . player wins if xy k z negationslash∈ L . The pumping lemma says: If L is regular, Player has a winning strategy. (Important note: If L is not regular, Player may still have a winning strategy. This version of the Pumping Lemma is only necessary for regularity, not sufficient.) 4
Example Application of Pumping Lemma Theorem: L = “All strings over Σ = { 0 , 1 } with the same number of 0’s and 1’s” is not regular. Proof: We prove by contradiction, using the PL. Suppose L were regular. Let n be the “pumping constant” of the PL. [This is Player ’s move. player has no idea what n is, but gives a general rule for the next move for any n .] Consider the string w = 0 n 1 n L . [This is player ’s move, which works for any n .] By the PL, there must be xyz = 0 n 1 n , such that | xy | ≤ n and y negationslash = ǫ , and xy k z L for all k 0 . [Player ’s move.] So xy will consist of all 0 s and y will be a string of at least one 0 . [We don’t know what xyz are, but we know these properties hold if Player made a legal move.] If k negationslash = 1 , then xy k z will have a different number of 0 s than xyz and the same number of 1 s, so xy k z negationslash∈ L , contradicting the previous statement above. [player

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 20

l5 - Lecture 5 Pumping Lemma and Closure Properties David...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online