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

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Lecture 5: Pumping Lemma and Closure Properties David Dill Department of Computer Science 1 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 . 3 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, its 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 = { , 1 } with the same number of 0s and 1s 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 . [Player s move.] So xy will consist of all s and y will be a string of at least one . [We dont 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 s than xyz and the same number of 1...
View Full Document

This note was uploaded on 01/12/2010 for the course CS 154 at Stanford.

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 Right Arrow Icon
Ask a homework question - tutors are online