Coursepack3-6 - Module 26 Pumping Lemma A technique for...

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

View Full Document Right Arrow Icon
1 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 wis ±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?
Background image of page 1

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

View Full DocumentRight Arrow Icon
2 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 •| u v | n and v | 1 and For all k 0, uv k wisinL 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 •u v 0 w = uw = abfg is in L v 1 w = uvw = ab cde fg is in L v 2 w = uvvw = ab cde cde fg is in L v 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 wis ±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 u v | n and v occurs in the first n characters of x v | 1 and v is not λ •F o r a l l k 0, uv k ±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? bbaaa, a b baaa, ab b aaa baaa, a bb aaa –abb aaa • Which ones satisfy the pumping lemma? 12 Pumping Lemma Proof
Background image of page 2
3 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 • Let x be an arbitrary string in L of length at least n –L e t x i denote the ith character of string x
Background image of page 3

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

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

Page1 / 26

Coursepack3-6 - Module 26 Pumping Lemma A technique for...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online