Coursepack3-6

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

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

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?

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

View Full Document
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
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

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.

## 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
Ask a homework question - tutors are online