CS 310 – Fall 2006 Pacific University CS310 Pumping Lemma Sections:1.4 page 77 September 27, 2006.

Slides:



Advertisements
Similar presentations
Properties of Regular Sets
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.
FORMAL LANGUAGES, AUTOMATA, AND COMPUTABILITY
CSCI 2670 Introduction to Theory of Computing September 13, 2005.
CSCI 2670 Introduction to Theory of Computing September 15, 2004.
CS21 Decidability and Tractability
NFAs Sipser 1.2 (pages 47–54). CS 311 Fall Recall… Last time we showed that the class of regular languages is closed under: –Complement –Union.
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.
Intro to DFAs Readings: Sipser 1.1 (pages 31-44) With basic background from Sipser 0.
Intro to DFAs Readings: Sipser 1.1 (pages 31-44) With basic background from Sipser 0.
Nonregular languages Sipser 1.4 (pages 77-82). CS 311 Fall Nonregular languages? We now know: –Regular languages may be specified either by regular.
1 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY (For next time: Read Chapter 1.3 of the book)
CS 310 – Fall 2006 Pacific University CS310 Regular Expressions Sections:1.3 page 63 September 18, 2006 September 20, 2006.
Lecture 3: Closure Properties & Regular Expressions Jim Hook Tim Sheard Portland State University.
CS5371 Theory of Computation Lecture 5: Automata Theory III (Non-regular Language, Pumping Lemma, Regular Expression)
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.
Courtesy Costas Busch - RPI1 Non-regular languages.
Fall 2004COMP 3351 Standard Representations of Regular Languages Regular Languages DFAs NFAs Regular Expressions Regular Grammars.
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.
1 Regular Languages Finite Automata eg. Supermarket automatic door: exit or entrance.
CS 310 – Fall 2006 Pacific University CS310 Homework 2 & JFLAP September 22, 2006.
Prof. Busch - LSU1 Non-regular languages (Pumping Lemma)
1 Non-regular languages. 2 Regular languages Non-regular languages.
Today Chapter 1: RE = Regular Languages, nonregular languages RL pumping lemma Chapter 2: Context-Free Languages (CFLs)
Extra on Regular Languages and 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.
Introduction to CS Theory
Cs3102: Theory of Computation Class 6: Pushdown Automata Spring 2010 University of Virginia David Evans TexPoint fonts used in EMF. Read the TexPoint manual.
Solution Exercise 1.43 a A r r s q q > b b e b s’ q r q’ b r’ a A’
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
Cs3102: Theory of Computation Class 5: Non-Regular Languages Spring 2010 University of Virginia David Evans TexPoint fonts used in EMF. Read the TexPoint.
CS355 - Theory of Computation Regular Expressions.
Conversions & Pumping Lemma CPSC 388 Fall 2001 Ellen Walker Hiram College.
CSCI 2670 Introduction to Theory of Computing September 13.
CS 203: Introduction to Formal Languages and Automata
Non-Context-Free Languages Section 2.3 CSC 4170 Theory of Computation.
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich Faculty of Computer Sciences Izmir University of Economics.
CSCI 3130: Formal languages and automata theory Tutorial 3 Chin.
Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1 Chapter 1 Regular Languages Some slides are in courtesy.
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.
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.
Regular Languages Chapter 1 Giorgi Japaridze Theory of Computability.
Nonregular Languages Section 2.4 Wed, Oct 5, 2005.
Complexity and Computability Theory I
Foundations of Computing Science
Formal Language & Automata Theory
Non-regular languages
Standard Representations of Regular Languages
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
Lecture5 Non-regular languages
Infiniteness Test The Pumping Lemma Nonregular Languages
Elementary Questions about Regular Languages
Non-regular languages
Pumping Lemma September 29, 2006
Properties of Regular Languages (part 1)
CS21 Decidability and Tractability
Chapter 1 Regular Language - 02
CHAPTER 1 Regular Languages
CSCI 2670 Introduction to Theory of Computing
Presentation transcript:

CS 310 – Fall 2006 Pacific University CS310 Pumping Lemma Sections:1.4 page 77 September 27, 2006

CS 310 – Fall 2006 Pacific University Quick Review DFA to Regular Expression DFA -> GNFA -> Reduce to 2 state GNFA –Regular Expression R4 R2 R1 R3 Rip this out! (R1(R2)*R3) U R4

CS 310 – Fall 2006 Pacific University Non-Regular Languages Languages that cannot be represented by a finite automaton B = { 0 n 1 n | n >= 0 } What makes this hard (impossible) for an NFA to represent? ► hint: What does the F stand for in NFA? How do we prove a language is not regular? Intuition may be wrong; which is not regular? C = { w | w has an equal number of 0s and 1s} D = { w | w has an equal number of occurrences of 01 and 10 as substrings }

CS 310 – Fall 2006 Pacific University Pumping Lemma We can use the Pumping Lemma to show that a language is not regular All regular languages have a particular property –For strings over a certain length (the pumping length, p) there must be some repetition within the string F stands for Finite number of states –If a language does not have this property: not regular Not represented by a FA

CS 310 – Fall 2006 Pacific University Pumping Lemma (Informal) All regular languages are represented by an FA The result of pushing a string of length n through a FA is a sequence of (n+1) states If (n+1) > number of states in FA, there must be some repetition: must visit the same state twice p = number of states in FA repetition Pumping: The length of the string could be ‘pumped’ up by repeating the cycle, and the string would still be accepted.

CS 310 – Fall 2006 Pacific University Pumping Lemma (Formally) DFA: M= ( Q, ∑, δ, q 0, F) If |Q| = p and s є L(M) and |s| >= p then there exists at least one state that was visited twice within the first p input symbols (p input symbols takes you through p+1 states) x y z s = xyz

CS 310 – Fall 2006 Pacific University Pumping Lemma (Formally) If A is a regular language, then there is a number p where, 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 conditions: x y z s = xyz 1. i >= 0, xy i z є L(M) 2. |y| > 0 3. |xy| <= p (x, z may be ε)

CS 310 – Fall 2006 Pacific University Pumping Lemma In Action Find a string, s є L, |s| >= p, that cannot be pumped to show language L is not regular. –Proof by contradiction –Find a string that exhibits the “essence” of nonregularity L = { w | w contains equal number of 0s and 1s } let s = 0 p 1 p where p is the pumping length s є L, |s| >= p, so we can write s = xyz What does this imply about y? Is xy 2 z є L? Is xy 0 z є L?

CS 310 – Fall 2006 Pacific University Pumping Lemma in Action L = { w | w contains equal number of 0s and 1s } What if we chose the string (01) p ? Can that be pumped? x = y = z =

CS 310 – Fall 2006 Pacific University Practice L = { ww | w є {0, 1}* } What string should we chose? what does ww mean? Can that be pumped?