Non-Regular Languages

Slides:



Advertisements
Similar presentations
Properties of Regular Sets
Advertisements

Chapter Eleven: Non-Regular Languages
Fall 2006Costas Busch - RPI1 Non-regular languages (Pumping Lemma)
CSCI 2670 Introduction to Theory of Computing September 13, 2005.
CS21 Decidability and Tractability
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.
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.
1 Introduction to Computability Theory Lecture4: Non Regular Languages Prof. Amos Israeli.
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.
Transparency No. 7-1 Formal Language and Automata Theory Chapter 7 Limitations of Finite Automata (lecture 11 and 12)
Homework 4 Solutions.
Fall 2004COMP 3351 Standard Representations of Regular Languages Regular Languages DFAs NFAs Regular Expressions Regular Grammars.
Prof. Busch - LSU1 Non-regular languages (Pumping Lemma)
1 Non-regular languages. 2 Regular languages Non-regular languages.
1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 5 School of Innovation, Design and Engineering Mälardalen University 2012.
Tutorial CSC3130 : Formal Languages and Automata Theory Haifeng Wan ( )
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Closure.
TK PrasadPumping Lemma1 Nonregularity Proofs. TK PrasadPumping Lemma2 Grand Unification Regular Languages: Grand Unification (Parallel Simulation) (Rabin.
Class Discussion Can you draw a DFA that accepts the language {a k b k | k = 0,1,2,…} over the alphabet  ={a,b}?
Conversions & Pumping Lemma CPSC 388 Fall 2001 Ellen Walker Hiram College.
CS 203: Introduction to Formal Languages and Automata
CSCI 3130: Formal languages and automata theory Tutorial 3 Chin.
1 Applications of pumping lemma(Dr. Torng) Applications of Pumping Lemma –General proof template What is the same in every proof What changes in every.
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.
Cs466(Prasad)L11PLEG1 Examples Applying 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.
Nonregular Languages Section 2.4 Wed, Oct 5, 2005.
Context-Free Languages
CSE 105 theory of computation
Non-regular languages - The pumping lemma
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
CSE 3813 Introduction to Formal Languages and Automata
Nonregular Languages Section 2.4 Wed, Oct 5, 2005.
Intro to Theory of Computation
Pumping Lemma for Regular Languages some languages are not regular!
Properties of Regular Languages
Infiniteness Test The Pumping Lemma Nonregular Languages
Hopcroft, Motawi, Ullman, Chap 4, sections 4.1 and 4.2
Deterministic PDAs - DPDAs
Properties of Regular Languages
The Pumping Lemma for CFL’s
Elementary Questions about Regular Languages
Non-regular languages
Pumping Lemma September 29, 2006
Pumping Lemma.
Chapter 4 Properties of Regular Languages
Nonregular languages & the pumping lemma
Are all Languages Regular
CS21 Decidability and Tractability
More Applications of the Pumping Lemma
Properties of Regular Sets
Non-regular languages
Non-regular languages
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
Presentation transcript:

Non-Regular Languages All finite languages are regular.  {a} {abaabb,b,baabbbbb,bb} So, only infinite languages are interesting for this discussion.

Lemma: Idea Any DFA has finite number of states. Let n = |Q|. Consider any accepted input x=a1…am, such that m > n. DFA follows a path of states q0…qm: This state numbering has nothing to do with state names in Q. May repeat states in this path. q0 a1 q1 … qm-1 qm a2 am am-1

Idea Since |x| > n, path must contain at least one loop. Consider any one such loop. Break string & path: before, during, & after loop. In fact, must exist loop such that k<n. Given other inputs, could loop an arbitrary number of times. (a1…aj)(aj+1…ak)*(ak+1…am) also accepted. q0 a1 qj=qk … qm aj am aj+1 ak+1 ak

Lemma: Summary If language L is regular, then for any xL that is longer than |Q|, there is a substring of x than can be “pumped” that provides other strings in L. Not claiming that pumping x gives all sufficiently long strings in L. For that, would need to look at all loops in all strings.

Lemma: Formal Statement If L is a regular language, then n such that n is lower bound of #states in DFA. if xL and |x|n, x is a sufficiently long string.  strings u,v,w such that x=uvw, u,v,w are a way to split up x. |uv|  n, Looping not necessary in 1st part. |v|  1, The piece we loop on isn’t e. uviw  L, i0

How to use lemma to prove some L isn’t regular? Lemma: Usage How to use lemma to prove some L isn’t regular? Lemma describes a property of regular languages. Use proof by contradiction: If L doesn't have this property, it isn't regular.

Lemma: Usage Can view as game between you & adversary. Your goal is to prove L non-regular. You choose/given L. Adversary picks n. You choose x. xL, |x|n. Adversary picks u,v,w. x=uvw, |uv|n, |v|1. You choose i such that uviw  L. Each choice can depend on previous ones.

Lemma: Example 1 L1 = {0k 1k | k0} x = 0n 1n For whatever n is picked. x = uvw u & v contain only 0’s. Since |uv|n. Pick i=2. uv2w contains more 0’s than 1’s, since |v|1. uv2w  L1.

Lemma: Lessons Choice of x is important. Different x’s may lead to different proofs, or none being possible. RLs can “match up” parts of strings only in limited ways. In particular, can’t do the unbounded counting needed in previous examples.

Lemma: Non-example L = {(01)i | i0} L is regular: L = (01)*. I.e., for any x, there is some split u,v,w that allows pumping.

Lemma: Limitations Lemma is of the form “If L regular, then a certain property holds.” Some non-RLs also have this property! Stronger versions of the lemma exist. This version is usually sufficient. This version is the most common.