42 Slides--The Pumping Lemma

42 Slides--The Pumping Lemma - CS103 HO#42 Slides-The...

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

View Full Document Right Arrow Icon
CS103 HO#42 Slides--The Pumping Lemma 5/7/2010 1 Generalized nondeterministic finite automaton ab* a ab ba b* b a* (aa)* The plan: convert the DFA to a GNFA, then remove states until only two are left, while always recognizing the same language. The arrow between the last states will be labeled with the equivalent regular expression. Kleene's Theorem Theorem 1.54 : A language is regular if and only if some regular expression describes it. Lemma 1.55 : If a language is described by a regular expression, then it is regular. Lemma 1.60 : If a language is regular, then it is described by a regular expression. Non-Regular Languages q 1 q 2 q 3 q 4 q 5 a a a a a b b b b b b b b b b a,b Suppose we want to recognize B = { a n b n | n 0 } q 0 q 12 q 13 q 14 q 15 q 9 q 10 q 11 q 7 q 8 q 6 Non-Regular Languages We will show that regular languages have a particular property. To show that a language L is not regular: Assume that L is regular. Thus it has the property. Derive a contradiction. Thus L is not regular. Note that this approach is only useful in proving that L is not regular. Having the property doesn't guarantee that a language is regular. Long Strings Force Repeated States Suppose M = (Q, , δ , q 1 , F). Suppose s is a string of length at least |Q| that is accepted by M. Then M must visit some state more that once when s is the input. PROOF: M starts in some state, and each time it reads a character, it visits some state. So if |s| = |Q|, M will visit |Q| + 1 states (the initial one plus one for each character in s). Since there more visits than states, the pigeonhole principle tells us that at least one state is visited more than once. This will be true for any accepted string s such that |s| Q. b a a c b d a (Assume transitions not shown in this DFA lead to a dead state.) What is the longest string M can accept without repeating a state? Any accepted string of 6 or more symbols must contain cd one or more times. L(M) = ba(cd)*(ca a)b Examples: baab bacab ba cd ab ba cdcdcd ab ba cdcdcdcd cab M
Background image of page 1

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

View Full DocumentRight Arrow Icon
CS103 HO#42 Slides--The Pumping Lemma 5/7/2010 2 The Pumping Lemma If A is a regular language, then there is a number p (the pumping length) such that, if s is any string in A of length at least p, then s may be divided into three pieces, s = xyz satisfying the following three conditions:
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 02/08/2011.

Page1 / 3

42 Slides--The Pumping Lemma - CS103 HO#42 Slides-The...

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

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