Infiniteness Test The Pumping Lemma Nonregular Languages

Slides:



Advertisements
Similar presentations
Properties of Regular Sets
Advertisements

1 Let’s Recapitulate. 2 Regular Languages DFAs NFAs Regular Expressions Regular Grammars.
Lecture 9,10 Theory of AUTOMATA
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.
1 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY (For next time: Read Chapter 1.3 of the book)
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.
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.
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.
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.
CS5371 Theory of Computation Lecture 4: Automata Theory II (DFA = NFA, Regular Language)
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.
Definitions Equivalence to Finite Automata
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.
Decision Properties of Regular Languages
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 5 School of Innovation, Design and Engineering Mälardalen University 2012.
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}?
Chapter 6 Properties of Regular Languages. 2 Regular Sets and Languages  Claim(1). The family of languages accepted by FSAs consists of precisely the.
Conversions & Pumping Lemma CPSC 388 Fall 2001 Ellen Walker Hiram College.
CS 203: Introduction to Formal Languages and Automata
1 Decision Properties of Regular Languages General Discussion of “Properties” The Pumping Lemma Minimizing DFA.
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.
Lecture 8UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 8.
General Discussion of “Properties” The Pumping Lemma Membership, Emptiness, Etc.
Nonregular Languages Section 2.4 Wed, Oct 5, 2005.
CSE 105 theory of computation
Complexity and Computability Theory I
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
Nonregular Languages Section 2.4 Wed, Oct 5, 2005.
COSC 3340: Introduction to Theory of Computation
Lecture5 Non-regular languages
Regular Expression We shall build expressions from the symbols using simple operations include concatenation, union and kleen closure. Several intuitive.
4. Properties of Regular Languages
Introduction to Finite Automata
The Pumping Lemma for CFL’s
Elementary Questions about Regular Languages
Non-regular languages
FORMAL LANGUAGES, AUTOMATA, AND COMPUTABILITY
Pumping Lemma September 29, 2006
Recap lecture 26 Example of nonregular language, pumping lemma version I, proof, examples,
More Applications of the Pumping Lemma
Recap lecture 25 Intersection of two regular languages is regular, examples, non regular languages, example.
The Pumping Lemma for CFL’s
The Pumping Lemma for CFL’s
CHAPTER 1 Regular Languages
COSC 3340: Introduction to Theory of Computation
CSCI 2670 Introduction to Theory of Computing
Presentation transcript:

Infiniteness Test The Pumping Lemma Nonregular Languages

The Infiniteness Problem Is a given regular language infinite? Start with a DFA for the language. Key idea: if the DFA has n states, and the language contains any string of length n or more, then the language is infinite. Otherwise, the language is surely finite. Limited to strings of length n or less.

Proof of Key Idea If an n-state DFA accepts a string w of length n or more, then there must be a state that appears twice on the path labeled w from the start state to a final state. Because there are at least n+1 states along the path.

Proof – (2) w = xyz x y z Then xyiz is in the language for all i > 0. Since y is not ε, we see an infinite number of strings in L.

Infiniteness Test: Finding a Cycle Eliminate states not reachable from the start state. Eliminate states that do not reach a final state. Test if the remaining transition graph has any cycles.

The Pumping Lemma We have, almost accidentally, proved a statement that is quite useful for showing certain languages are not regular. Called the pumping lemma for regular languages.

Statement of the Pumping Lemma Number of states of DFA for L For every regular language L There is an integer n, such that For every string w in L of length > n We can write w = xyz such that: |xy| < n. |y| > 0. For all i > 0, xyiz is in L. Labels along first cycle on path labeled w

Example: Use of Pumping Lemma We have claimed {0k1k | k > 1} is not a regular language. Suppose it were. Then there would be an associated n for the pumping lemma. Let w = 0n1n. We can write w = xyz, where x and y consist of 0’s, and y  ε. But then xyyz would be in L, and this string has more 0’s than 1’s.