1 Find as many examples as you can of w, x, y, z so that w is accepted by this DFA, w = x y z, y ≠ ε, | x y | ≤ 7, and x y n z is in L for all n ≥ 0.

Slides:



Advertisements
Similar presentations
1 Let’s Recapitulate. 2 Regular Languages DFAs NFAs Regular Expressions Regular Grammars.
Advertisements

Fall 2006Costas Busch - RPI1 Non-regular languages (Pumping Lemma)
3.2 Pumping Lemma for Regular Languages Given a language L, how do we know whether it is regular or not? If we can construct an FA to accept the language.
CSCI 2670 Introduction to Theory of Computing September 13, 2005.
Lecture 3UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 3.
Courtesy Costas Busch - RPI1 More Applications of the Pumping Lemma.
CS 310 – Fall 2006 Pacific University CS310 Pumping Lemma Sections:1.4 page 77 September 27, 2006.
1 More Properties of Regular Languages. 2 We have proven Regular languages are closed under: Union Concatenation Star operation Reverse.
Costas Busch - RPI1 Standard Representations of Regular Languages Regular Languages DFAs NFAs Regular Expressions Regular Grammars.
CS5371 Theory of Computation Lecture 5: Automata Theory III (Non-regular Language, Pumping Lemma, Regular Expression)
Costas Busch - RPI1 Standard Representations of Regular Languages Regular Languages DFAs NFAs Regular Expressions Regular Grammars.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Limitations.
1 More Applications of the Pumping Lemma. 2 The Pumping Lemma: Given a infinite regular language there exists an integer for any string with length we.
Courtesy Costas Busch - RPI1 Non-regular languages.
Homework 4 Solutions.
Fall 2004COMP 3351 Standard Representations of Regular Languages Regular Languages DFAs NFAs Regular Expressions Regular Grammars.
Fall 2006Costas Busch - RPI1 More Applications of the Pumping Lemma.
FSA Lecture 1 Finite State Machines. Creating a Automaton  Given a language L over an alphabet , design a deterministic finite automaton (DFA) M such.
Lecture 7UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 7.
Prof. Busch - LSU1 Non-regular languages (Pumping Lemma)
Prof. Busch - LSU1 More Applications of the Pumping Lemma.
1 Non-regular languages. 2 Regular languages Non-regular languages.
1 Applications of Regular Closure. 2 The intersection of a context-free language and a regular language is a context-free language context free regular.
INHERENT LIMITATIONS OF COMPUTER PROGAMS CSci 4011.
1 Problems of the day: 1. Let P= {(b, acbb), (aac, a), (b, ca)}. Prove that P has a match. 2. How many ways can aab be factored as x y z such that |y|≥
1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 5 School of Innovation, Design and Engineering Mälardalen University 2012.
1 Let L= { w= u v : u  {a, b}*, v  {c, d}* and |u|= |v|} 1.Design a context-free grammar that generates L. 2.Use your grammar and the construction from.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Closure.
1 Problem of the Day: Factor (ab) k as xyz in all ways such that y ≠ ε.
TK PrasadPumping Lemma1 Nonregularity Proofs. TK PrasadPumping Lemma2 Grand Unification Regular Languages: Grand Unification (Parallel Simulation) (Rabin.
1 L= { w c w R : w  {a, b}* } is accepted by the PDA below. Use a construction like the one for intersection for regular languages to design a PDA that.
Chapter 4 Pumping Lemma Properties of Regular Languages Decidable questions on Regular Languages.
CS 3240 – Chapter 4.  Closure Properties  Algorithms for Elementary Questions:  Is a given word, w, in L?  Is L empty, finite or infinite?  Are L.
Class Discussion Can you draw a DFA that accepts the language {a k b k | k = 0,1,2,…} over the alphabet  ={a,b}?
Properties of Regular Languages
Conversions & Pumping Lemma CPSC 388 Fall 2001 Ellen Walker Hiram College.
CS 203: Introduction to Formal Languages and Automata
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 9 Mälardalen University 2006.
CSCI 3130: Formal languages and automata theory Tutorial 3 Chin.
Critique this PDA for L= { u u R v v R : u ∈ {0,1}* and v ∈ {0,1}+ } u0εu0 u1εu1 uεεvε v00vε v11vε vεεfε sεεtε t0εt0 t1εt1 t00tε t11tε tεεuε After you.
5-5 Indirect Proof. Indirect Reasoning: all possibilities are considered and then all but one are proved false. The remaining possibility must be true.
Cs466(Prasad)L11PLEG1 Examples Applying Pumping Lemma.
CSE 105 Theory of Computation Alexander Tsiatas Spring 2012 Theory of Computation Lecture Slides by Alexander Tsiatas is licensed under a Creative Commons.
1 Closure E.g., we understand number systems partly by understanding closure properties: Naturals are closed under +, , but not -, . Integers are closed.
Lecture 8UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 8.
1 Use the pumping theorem for context-free languages to prove that L= { a n b a n b a p : n, p ≥ 0, p ≥ n } is not context-free. Hint: For the pumping.
Nonregular Languages Section 2.4 Wed, Oct 5, 2005.
Formal Language & Automata Theory
Non-regular languages
Standard Representations of Regular Languages
CSE322 PUMPING LEMMA FOR REGULAR SETS AND ITS APPLICATIONS
PROPERTIES OF REGULAR LANGUAGES
PDAs Accept Context-Free Languages
Nonregular Languages Section 2.4 Wed, Oct 5, 2005.
COSC 3340: Introduction to Theory of Computation
Infiniteness Test The Pumping Lemma Nonregular Languages
DPDA Deterministic PDA
COSC 3340: Introduction to Theory of Computation
Hopcroft, Motawi, Ullman, Chap 4, sections 4.1 and 4.2
Deterministic PDAs - DPDAs
Elementary Questions about Regular Languages
Non-regular languages
FORMAL LANGUAGES, AUTOMATA, AND COMPUTABILITY
Pumping Lemma September 29, 2006
Closure Properties of Regular Languages
More Applications of the Pumping Lemma
DPDA Deterministic PDA
Applications of Regular Closure
CSCI 2670 Introduction to Theory of Computing
Presentation transcript:

1 Find as many examples as you can of w, x, y, z so that w is accepted by this DFA, w = x y z, y ≠ ε, | x y | ≤ 7, and x y n z is in L for all n ≥ 0.

2 CSC 320 midterm: Friday October 22 Midterm tutorial possible dates: Mon. Oct. 18 Tues. Oct. 19 Thurs. Oct. 21

3 Proof of the Pumping Lemma The pumping lemma is a statement about regular languages used to show using a proof by contradiction that languages are not regular. The goal today is to prove it and show further illustrations of how it can be used.

4 The Pumping Lemma for Regular Languages: If L is a language accepted by a DFA with k states, and w  L, |w| ≥ k, then there exists x, y, z such that 1. w = x y z, 2. y ≠ ε, 3. | x y | ≤ k, and 4. x y n z is in L for all n ≥ 0.

5 Proof. Consider w· L, |w| ≥ k. Isolate the first k symbols in w: w= σ 1 σ 2 σ 3 … σ k-1 σ k w’. Consider the computation of M on w: (q 0, σ 1 σ 2 σ 3 … σ k-1 σ k w’) ├ (q 1, σ 2 σ 3 … σ k-1 σ k w’) ├ (q 2, σ 3 … σ k-1 σ k w’) ├ * (q k-1, σ k w’) ├ * (q k, w’) ├ * (f, e) for some final state f.

6 After reading σ 1 σ 2 σ 3 … σ k-1 σ k k+1 states have been visited: q 0, q 1, q 2, … q k. The computation: (q 0, σ 1 σ 2 σ 3 … σ k-1 σ k w’) ├ (q 1, σ 2 σ 3 … σ k-1 σ k w’) ├ (q 2, σ 3 … σ k-1 σ k w’) ├ * (q k-1, σ k w’) ├ * (q k, w’) ├ * (f, e) for some final state f. By the pigeonhole principle, some state has been repeated.

7 By the pigeonhole principle, some state has been repeated. Suppose q i is the first time we see the repeated state and q j is the second time. Rewriting the computation: (q 0, σ 1 σ 2 σ 3 … σ i σ i+1 … σ j σ j+1 … σ k-1 σ k w’) ├ * (q i, σ i+1 … σ j σ j+1 … σ k-1 σ k w’ ) ├ * (q j, σ j+1 … σ k-1 σ k w’ ) ├ * (f, e) for some final state f.

8 Digression from Proof: (q 0, σ 1 σ 2 σ 3 … σ i σ i+1 … σ j σ j+1 … σ k-1 σ k w’ ) ├ * (q i, σ i+1 … σ j σ j+1 … σ k-1 σ k w’ ) ├ * (q j, σ j+1 … σ k-1 σ k w’ ) ├ * (f, e) We can pump 0 times because: (q 0, σ 1 σ 2 σ 3 … σ i σ j+1 … σ k-1 σ k w’ ) ├ * ( q i = q j, σ j+1 … σ k-1 σ k w’ ) ├ * (f, e)

9 Digression from Proof: We can pump 2 times because: (q 0, σ 1 σ 2 σ 3 … σ i (σ i+1 … σ j ) 2 σ j+1 … σ k w’ ) ├ * (q i, (σ i+1 … σ j ) 2 σ j+1 … σ k w’ ) ├ * (q j = q i, (σ i+1 … σ j ) σ j+1 … σ k w’ ) ├ * (q j, σ j+1 … σ k w’ ) ├ * (f, e)

10 Let x= σ 1 σ 2 σ 3 … σ i, y = σ i+1 … σ j, and z= σ j+1 … σ k w’. The string x y n z is in L for all values of n ≥ 0 since (q 0, σ 1 σ 2 σ 3 … σ i (σ i+1 … σ j ) n σ j+1 … σ k w’ ) ├ * (q j = q i, (σ i+1 … σ j ) n σ j+1 … σ k w’ ) ├ * (q j = q i, (σ i+1 … σ j ) n-1 σ j+1 … σ k w’ ) ├ * … (q j = q i, (σ i+1 … σ j ) σ j+1 … σ k w’ ) ├ * (q j, σ j+1 … σ k w’ ) ├ * (f, e). End of Proof.

11 The Pumping Lemma for Regular Languages: If L is a language accepted by a DFA with k states, and w  L, |w| ≥ k, then there exists x, y, z such that 1. w = x y z, 2. y ≠ ε, 3. | x y | ≤ k, and 4. x y n z is in L for all n ≥ 0.

12 L= { a n b n : n ≥ 0 } is not a regular language. Proof (by contradiction) Assume L is regular. Then L is accepted by a DFA M with k states for some integer k. Since L is accepted by a DFA M with k states, the pumping lemma holds. Let w = a r b r where r = ⌈ k/2⌉.

13 Consider all possibilities for y: Case 1: a i (a j ) a r-i-j b r j ≥ 1. Pump zero times: a r-j b r ∉ L since r-j < r. Case 2: a r b i (b j ) b r-i-j j ≥ 1. Pump zero times: a r b r-j ∉ since r-j < r. Case 3: a r-i ( a i b j ) b r-j i, j ≥ 1. Pump 2 times: a r-i a i b j a i b j b r-j ∉ L because it is not of the form a * b * Therefore, L is not regular.

14 Using closure properties: L= {w  {a, b} * : w has the same number of a’s as b’s} is not regular. Proof (by contradiction) Assume L is regular. The language a* b* is regular since it has a regular expression. Because regular languages are closed under intersection, L ⋂ a* b* is regular. But L ⋂ a* b* = { a n b n : n ≥ 0} which is not regular. Therefore, L is not regular.

15 Problem of the Day (next class): Factor (ab) k as xyz in all ways such that y ≠ ε.