Non-Context-Free Languages

Slides:



Advertisements
Similar presentations
Pumping Lemma Problem: Solution:
Advertisements

Nathan Brunelle Department of Computer Science University of Virginia Theory of Computation CS3102 – Spring 2014 A tale.
CS 3240: Languages and Computation Properties of Context-Free Languages.
CSCI 2670 Introduction to Theory of Computing September 13, 2005.
1 Introduction to Computability Theory Discussion3: Uses of the Pumping Lemma Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture4: Non Regular Languages Prof. Amos Israeli.
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.
CS 310 – Fall 2006 Pacific University CS310 Pumping Lemma Sections:1.4 page 77 September 27, 2006.
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.
1 The Pumping Lemma for Context-Free Languages. 2 Take an infinite context-free language Example: Generates an infinite number of different strings.
Introduction to the Theory of Computation John Paxton Montana State University Summer 2003.
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.
CS5371 Theory of Computation Lecture 9: Automata Theory VII (Pumping Lemma, Non-CFL)
Fall 2003Costas Busch1 More Applications of The Pumping Lemma.
Fall 2006Costas Busch - RPI1 More Applications of the Pumping Lemma.
Foundations of (Theoretical) Computer Science Chapter 2 Lecture Notes (Section 2.3: Non-Context-Free Languages) David Martin With.
Prof. Busch - LSU1 More Applications of the Pumping Lemma.
1 Non-regular languages. 2 Regular languages Non-regular languages.
Costas Busch1 More Applications of The Pumping Lemma.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
INHERENT LIMITATIONS OF COMPUTER PROGAMS CSci 4011.
Non-CF Languages The language L = { a n b n c n | n  0 } does not appear to be context-free. Informal: A PDA can compare #a’s with #b’s. But by the time.
CS355 - Theory of Computation Regular Expressions.
Non-Context-Free Languages Section 2.3 CSC 4170 Theory of Computation.
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.
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.
Regular Languages Chapter 1 Giorgi Japaridze Theory of Computability.
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:
Lecture 8UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 8.
Complexity and Computability Theory I Lecture #12 Instructor: Rina Zviel-Girshin Lea Epstein.
Context-Free and Noncontext-Free Languages Chapter 13.
Context-Free Languages
Non-regular languages
Standard Representations of Regular Languages
CSE322 PUMPING LEMMA FOR REGULAR SETS AND ITS APPLICATIONS
Lecture 17 Oct 25, 2011 Section 2.1 (push-down automata)
CSC 4170 Theory of Computation Turing reducibility Section 6.3.
Summary.
DPDA Deterministic PDA
Context-free Languages
Context-Free Grammars
Context-Free Languages
فصل دوم Context-Free Languages
COSC 3340: Introduction to Theory of Computation
Pumping Lemma for Context-free Languages
Elementary Questions about Regular Languages
Non-regular languages
Pumping Lemma September 29, 2006
Bottom-up parsing Pumping Theorem for CFLs
CS21 Decidability and Tractability
More Applications of the Pumping Lemma
COSC 3340: Introduction to Theory of Computation
CS21 Decidability and Tractability
Chapter 2 Context-Free Language - 02
DPDA Deterministic PDA
CS21 Decidability and Tractability
Recap lecture 42 Row language, nonterminals defined from summary table, productions defined by rows, rules for defining productions, all possible productions.
Theory of Computability
Applications of Regular Closure
CSE 105 theory of computation
Pumping Theorem for CFLs
Limitations of context-free languages
COSC 3340: Introduction to Theory of Computation
CSCI 2670 Introduction to Theory of Computing
Intro to Theory of Computation
Presentation transcript:

Non-Context-Free Languages CSC 4170 Theory of Computation Non-Context-Free Languages Section 2.3

The pumping lemma for context-free languages Giorgi Japaridze Theory of Computability Theorem 2.34 (Pumping lemma for context-free languages) If L is a context-free language, then there is a number p (the pumping length) where, if s is any string in L of length at least p, then s may be divided into five pieces s = uvxyz satisfying the conditions: 1. For each i0, uvixyiz L; 2. |vy| > 0; 3. |vxy| p. uxz uvxyz uvvxyyz uvvvxyyyz uvvvvxyyyyz uvvvvvxyyyyyz

The pumping lemma in work: example 2.3.b Giorgi Japaridze Theory of Computability S  “R” is a regular expression R  0 | ( R )* “0” is a regular expression “(0)*” is a regular expression “((0)*)*” is a regular expression “(((0)*)*)*” is a regular expression … u = “( v = ( x = 0 y = )* z = )*” is a regular expression “((0)*)*” is a regular expression uv0xy0z: “(0)*” is a regular expression uv1xy1z: “((0)*)*” is a regular expression uv2xy2z: “(((0)*)*)*” is a regular expression uv3xy3z: “((((0)*)*)*)*” is a regular expression

Using the pumping lemma for proving that certain languages are not CF Giorgi Japaridze Theory of Computability Example 2.36: Show that the following language is not CF: B = {anbncn | n0} Proof by contradiction: Assume B is CF. Let then p be its pumping length. Select wB with |w|  p. By the pumping lemma, w=uvxyz and v and y can be pumped. If either v or y contain more than one type of symbols, then pumping would intermix these symbols in a wrong way. aaaabbbbcccc B aaaababbbbccccc B Thus, one of the three symbols should be neither in neither v, nor in y. aaaabbbbcccc B But then, after pumping, the number of that symbol will not change, while the number of the other symbols will increase. aaaaaabbbbbbbbcccc B

Regular vs context-free vs computer-recognizable languages 2.3.d Giorgi Japaridze Theory of Computability Computer-recognizable languages Context-free languages Regular languages {anbn | n0} {anbncn | n0}