CSE322 PUMPING LEMMA FOR REGULAR SETS AND ITS APPLICATIONS

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.
Nonregular languages Sipser 1.4 (pages 77-82). CS 311 Mount Holyoke College 2 Nonregular languages? We now know: –Regular languages may be specified either.
1 Introduction to Computability Theory Lecture4: Non Regular Languages Prof. Amos Israeli.
Nonregular languages Sipser 1.4 (pages 77-82). CS 311 Fall Nonregular languages? We now know: –Regular languages may be specified either by regular.
Courtesy Costas Busch - RPI1 More Applications of the Pumping Lemma.
1 More Properties of Regular Languages. 2 We have proven Regular languages are closed under: Union Concatenation Star operation Reverse.
1 Regular Expressions. 2 Regular expressions describe regular languages Example: describes the language.
Costas Busch - RPI1 Standard Representations of Regular Languages Regular Languages DFAs NFAs Regular Expressions Regular Grammars.
Courtesy Costas Busch - RPI1 The Pumping Lemma for Context-Free Languages.
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.
1 Introduction to Computability Theory Lecture4: Non Regular Languages Prof. Amos Israeli.
1 Single Final State for NFAs and DFAs. 2 Observation Any Finite Automaton (NFA or DFA) can be converted to an equivalent NFA with a single final state.
1 The Pumping Lemma for Context-Free Languages. 2 Take an infinite context-free language Example: Generates an infinite number of different strings.
Costas Busch - RPI1 Standard Representations of Regular Languages Regular Languages DFAs NFAs Regular Expressions Regular Grammars.
Costas Busch - RPI1 The Pumping Lemma for Context-Free Languages.
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.
Fall 2003Costas Busch1 More Applications of The Pumping Lemma.
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.
Fall 2004COMP 3351 A Universal Turing Machine. Fall 2004COMP 3352 Turing Machines are “hardwired” they execute only one program A limitation of Turing.
Lecture 8 Sept 29, 2011 Regular expressions – examples Converting DFA to regular expression. (same works for NFA to r.e. conversion.) Converting R.E. to.
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 Pumping Lemma for Context-free Languages.
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.
Costas Busch - RPI1 More Applications of the Pumping Lemma.
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.
Costas Busch1 More Applications of The Pumping Lemma.
1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 5 School of Innovation, Design and Engineering Mälardalen University 2012.
Class Discussion Can you draw a DFA that accepts the language {a k b k | k = 0,1,2,…} over the alphabet  ={a,b}?
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 9 Mälardalen University 2006.
Costas Busch - LSU1 Pumping Lemma for Context-free Languages.
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.
Nonregular Languages How do you prove a language to be regular? How do you prove a language to be nonregular? A Pumping Lemma.
Equivalence with FA * Any Regex can be converted to FA and vice versa, because: * Regex and FA are equivalent in their descriptive power ** Regular language.
CSE 105 Theory of Computation Alexander Tsiatas Spring 2012 Theory of Computation Lecture Slides by Alexander Tsiatas is licensed under a Creative Commons.
Lecture 8UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 8.
1 A Universal Turing Machine. 2 Turing Machines are “hardwired” they execute only one program A limitation of Turing Machines: Real Computers are re-programmable.
Nonregular Languages Section 2.4 Wed, Oct 5, 2005.
A Universal Turing Machine
Non-regular languages - The pumping lemma
Formal Language & Automata Theory
Non-regular languages
Standard Representations of Regular Languages
More Applications of the Pumping Lemma
PROPERTIES OF REGULAR LANGUAGES
Busch Complexity Lectures: Reductions
Nonregular Languages Section 2.4 Wed, Oct 5, 2005.
Single Final State for NFA
COSC 3340: Introduction to Theory of Computation
Infiniteness Test The Pumping Lemma Nonregular Languages
DPDA Deterministic PDA
Deterministic PDAs - DPDAs
Pumping Lemma for Context-free Languages
Elementary Questions about Regular Languages
Non-regular languages
More Applications of the Pumping Lemma
DPDA Deterministic PDA
Applications of Regular Closure
COSC 3340: Introduction to Theory of Computation
CSCI 2670 Introduction to Theory of Computing
Presentation transcript:

CSE322 PUMPING LEMMA FOR REGULAR SETS AND ITS APPLICATIONS Lecture #11

Non-regular languages

Problem: this is not easy to prove How can we prove that a language is not regular? Prove that there is no DFA that accepts Problem: this is not easy to prove Solution: the Pumping Lemma !!!

The Pigeonhole Principle

pigeons pigeonholes

A pigeonhole must contain at least two pigeons

pigeons ........... pigeonholes ...........

The Pigeonhole Principle pigeons pigeonholes There is a pigeonhole with at least 2 pigeons ...........

The Pigeonhole Principle and DFAs

DFA with states

In walks of strings: no state is repeated

In walks of strings: a state is repeated

If string has length : Then the transitions of string are more than the states of the DFA Thus, a state must be repeated

In general, for any DFA: String has length number of states A state must be repeated in the walk of walk of ...... ...... Repeated state

In other words for a string : transitions are pigeons states are pigeonholes walk of ...... ...... Repeated state

The Pumping Lemma

Take an infinite regular language There exists a DFA that accepts states

Take string with There is a walk with label : ......... walk

then, from the pigeonhole principle: a state is repeated in the walk If string has length (number of states of DFA) then, from the pigeonhole principle: a state is repeated in the walk ...... ...... walk

Let be the first state repeated in the walk of ...... ...... walk

Write ...... ......

Observations: length number of states of DFA length ...... ......

Observation: The string is accepted ...... ......

Observation: The string is accepted ...... ......

Observation: The string is accepted ...... ......

In General: The string is accepted ...... ......

In General: Language accepted by the DFA ...... ......

In other words, we described: The Pumping Lemma !!!

The Pumping Lemma: Given a infinite regular language there exists an integer for any string with length we can write with and such that:

Applications of the Pumping Lemma

Theorem: The language is not regular Proof: Use the Pumping Lemma

Assume for contradiction that is a regular language Since is infinite we can apply the Pumping Lemma

Let be the integer in the Pumping Lemma Pick a string such that: length We pick

Write: From the Pumping Lemma it must be that length Thus:

From the Pumping Lemma: Thus:

From the Pumping Lemma: Thus:

BUT: CONTRADICTION!!!

Conclusion: Therefore: Our assumption that is a regular language is not true Conclusion: is not a regular language

Non-regular languages

More Applications of the Pumping Lemma

The Pumping Lemma: Given a infinite regular language there exists an integer for any string with length we can write with and such that:

Non-regular languages

Theorem: The language is not regular Proof: Use the Pumping Lemma

Assume for contradiction that is a regular language Since is infinite we can apply the Pumping Lemma

Let be the integer in the Pumping Lemma Pick a string such that: and length We pick

Write From the Pumping Lemma it must be that length Thus:

From the Pumping Lemma: Thus:

From the Pumping Lemma: Thus:

BUT: CONTRADICTION!!!

Conclusion: Therefore: Our assumption that is a regular language is not true Conclusion: is not a regular language

Non-regular languages

Theorem: The language is not regular Proof: Use the Pumping Lemma

Assume for contradiction that is a regular language Since is infinite we can apply the Pumping Lemma

Let be the integer in the Pumping Lemma Pick a string such that: and length We pick

Write From the Pumping Lemma it must be that length Thus:

From the Pumping Lemma: Thus:

From the Pumping Lemma: Thus:

BUT: CONTRADICTION!!!

Conclusion: Therefore: Our assumption that is a regular language is not true Conclusion: is not a regular language

Non-regular languages

Theorem: The language is not regular Proof: Use the Pumping Lemma

Assume for contradiction that is a regular language Since is infinite we can apply the Pumping Lemma

Let be the integer in the Pumping Lemma Pick a string such that: length We pick

Write From the Pumping Lemma it must be that length Thus:

From the Pumping Lemma: Thus:

From the Pumping Lemma: Thus:

Since: There must exist such that:

However: for for any

BUT: CONTRADICTION!!!

Conclusion: Therefore: Our assumption that is a regular language is not true Conclusion: is not a regular language