1 The Pumping Lemma for Context-Free Languages. 2 Take an infinite context-free language Example: Generates an infinite number of different strings.

Slides:



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

4.5 Inherently Ambiguous Context-free Language For some context-free languages, such as arithmetic expressions, may have many different CFG’s to generate.
Turing machines Sipser 2.3 and 3.1 (pages )
Lecture 15UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 15.
Courtesy Costas Busch - RPI1 More Applications of the Pumping Lemma.
1 Module 33 Non-context free languages –Intuition and Examples CFL Pumping Lemma –Comparison to regular language pumping lemma –What it means –Proof overview.
1 More Properties of Regular Languages. 2 We have proven Regular languages are closed under: Union Concatenation Star operation Reverse.
Costas Busch - RPI1 NPDAs Accept Context-Free Languages.
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.
The Pumping Lemma for CFL’s
Fall 2006Costas Busch - RPI1 The Post Correspondence Problem.
Fall 2004COMP 3351 NPDA’s Accept Context-Free Languages.
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 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.
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.
1 More Applications of The Pumping Lemma. 2 The Pumping Lemma: there exists an integer such that for any string we can write For infinite context-free.
1 Context-Free Languages. 2 Regular Languages 3 Context-Free Languages.
1 Background Information for the Pumping Lemma for Context-Free Languages Definition: Let G = (V, T, P, S) be a CFL. If every production in P is of the.
Fall 2006Costas Busch - RPI1 PDAs Accept Context-Free Languages.
Prof. Busch - LSU1 Pumping Lemma for Context-free Languages.
Prof. Busch - LSU1 More Applications of the Pumping Lemma.
Homework #7 Solutions. #1. Use the pumping lemma for CFL’s to show L = {a i b j a i b j | i, j > 0} is not a CFL. Proof by contradiction using the Pumping.
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.
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
Costas Busch1 More Applications of The Pumping Lemma.
1 PDAs Accept Context-Free Languages. 2 Context-Free Languages (Grammars) Languages Accepted by PDAs Theorem:
1 Context-Free Languages. 2 Regular Languages 3 Context-Free Languages.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
Context-Free Grammars – Chomsky Normal Form Lecture 16 Section 2.1 Wed, Sep 26, 2007.
CSCI 2670 Introduction to Theory of Computing September 21, 2004.
1 Context-Free Languages. 2 Regular Languages 3 Context-Free Languages.
CS 3240: Languages and Computation Context-Free Languages.
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.
Section 12.4 Context-Free Language Topics
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 11 Midterm Exam 2 -Context-Free Languages Mälardalen University 2005.
Cs3102: Theory of Computation Class 8: Non-Context-Free Languages Spring 2010 University of Virginia David Evans.
Review for final pm. 2 Review for Midterm Induction – On integer: HW1, Ex 2.2.9b p54 – On length of string: Ex p53, HW2, HW3.
Grammars CS 130: Theory of Computation HMU textbook, Chap 5.
Pumping Lemma for CFLs. Theorem 7.17: Let G be a CFG in CNF and w a string in L(G). Suppose we have a parse tree for w. If the length of the longest path.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 9 Mälardalen University 2006.
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.
Costas Busch - LSU1 Pumping Lemma for Context-free Languages.
CSCI 3130: Formal languages and automata theory Andrej Bogdanov The Chinese University of Hong Kong Limitations.
Costas Busch - LSU1 The Post Correspondence Problem.
CS 154 Formal Languages and Computability March 17 Class Meeting Department of Computer Science San Jose State University Spring 2016 Instructor: Ron Mak.
 2004 SDU Lecture8 NON-Context-free languages.  2004 SDU 2 Are all languages context free? Ans: No. # of PDAs on  < # of languages on  Pumping lemma:
Costas Busch - LSU1 PDAs Accept Context-Free Languages.
Complexity and Computability Theory I Lecture #12 Instructor: Rina Zviel-Girshin Lea Epstein.
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.
Formal Language & Automata Theory
Standard Representations of Regular Languages
CSE322 PUMPING LEMMA FOR REGULAR SETS AND ITS APPLICATIONS
Thinking about grammars
The Pumping Lemma for CFL’s
Pumping Lemma for Context-free Languages
Elementary Questions about Regular Languages
More Applications of the Pumping Lemma
The Pumping Lemma for CFL’s
Applications of Regular Closure
Thinking about grammars
The Pumping Lemma for CFL’s
Presentation transcript:

1 The Pumping Lemma for Context-Free Languages

2 Take an infinite context-free language Example: Generates an infinite number of different strings

3 A derivation:

4 Derivation tree

5 Derivation tree repeated

6

7 Repeated part

8 A possible derivation

9

10

11

12 Therefore, the string is generated by the grammar

13 We know This string is also generated:

14 We know This string is also generated:

15 Therefore, knowing that is generated, we also know that is generated

16 In general: We are given an infinite context-free grammar We take the derivation of a long enough string

17 Some variable must be repeated in the derivation Take the length ofBigger than = Productions * (largest production)

18 repeated

19 repeated Possible derivations:

20 We know: This string is also generated:

21 We know: This string is also generated: (the original )

22 We know: This string is also generated:

23 We know: This string is also generated:

24 We know: This string is also generated:

25 Therefore, any string of the form Is generated by the grammar

26 knowing that we also know that Therefore,

27

28

29 The pumping lemma: there exists an integer for any string we can write For context-free language with Such that: