This preview shows pages 1–15. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: 1 Module 26 • Pumping Lemma – A technique for proving a language L is NOT regular – What does the Pumping Lemma mean? – Proof of Pumping Lemma 2 Pumping Lemma How do we use it? 3 Pumping Condition • A language L satisfies the pumping condition if: – there exists an integer n > 0 such that – for all strings x in L of length at least n – there exist strings u, v, w such that • x = uvw and • uv ≤ n and • v ≥ 1 and • For all k ≥ 0, uv k w is in L 4 Pumping Lemma • All regular languages satisfy the pumping condition All languages over {a,b} Regular languages “Pumping Languages” 5 Implications • We can use the pumping lemma to prove a language L is not regular – How? • We cannot use the pumping lemma to prove a language is regular – How might we try to use the pumping lemma to prove that a language L is regular and why does it fail? Regular Pumping 6 Pumping Lemma What does it mean? 7 Pumping Condition • A language L satisfies the pumping condition if: – there exists an integer n > 0 such that – for all strings x in L of length at least n – there exist strings u, v, w such that • x = uvw and • uv ≤ n and • v ≥ 1 and • For all k ≥ 0, uv k w is in L 8 v can be pumped • Let x = abcdefg be in L • Then there exists a substring v in x such that v can be repeated (pumped) in place any number of times and the resulting string is still in L – u v k w is in L for all k ≥ 0 • For example – v = cde • uv w = uw = abfg is in L • uv 1 w = uvw = ab cde fg is in L • uv 2 w = uvvw = ab cde cde fg is in L • uv 3 w = uvvvw = ab cde cde cde fg is in L • … 1) x in L 2) x = u v w 3) For all k ≥ 0, u v k w is in L 9 What the other parts mean • A language L satisfies the pumping condition if: – there exists an integer n > 0 such that • defer what n is till later – for all strings x in L of length at least n • x must be in L and have sufficient length – there exist strings u, v, w such that • x = uvw and • uv ≤ n and – v occurs in the first n characters of x • v ≥ 1 and – v is not λ • For all k ≥ 0, uv k w is in L 10 Example 1 • Let L be the set of even length strings over {a,b} • Let x = abaa • Let n = 2 • What are the possibilities for v? – a baa, a b aa – ab aa • Which one satisfies the pumping lemma? 11 Examples 2 * • Let L be the set of strings over {a,b} where the number of a’s mod 3 is 1 • Let x = abbaaa • Let n = 3 • What are the possibilities for v? – a bbaaa, a b baaa, ab b aaa – ab baaa, a bb aaa – abb aaa • Which ones satisfy the pumping lemma? 12 Pumping Lemma Proof 13 High Level Outline • Let L be an arbitrary regular language • Let M be an FSA such that L(M) = L – M exists by definition of LFSA and the fact that regular languages and LFSA are identical • Show that L satisfies the pumping condition – Use M in this part 14 First step: n+1 prefixes of x • Let n be the number of states in M •...
View
Full
Document
This note was uploaded on 07/25/2008 for the course CSE 460 taught by Professor Torng during the Fall '07 term at Michigan State University.
 Fall '07
 TORNG

Click to edit the document details