Non-Context Free Languages
CS 133 : Automata Theory and Computability Context-Free and Non-Context Free Languages Henry N. Adorna Nestine Hope S. Hernandez Algorithms and Complexity Laboratory Department of Computer Science University of the Philippines, Diliman {hnadorna,nshernandez}@dcs.upd.edu.ph
LEC 6
Non-Context Free Languages
Context-Free and Non-Context Free Languages
Non-Context Free Languages
Non-Context Free Languages
Pumping Lemma for Context-Free Languages
Theorem (Pumping Lemma for Context-Free Languages) If A is a context-free language, then there is a number p (the pumping length) where, if s is any string in A of length at least p, then s may be divided into five pieces, s = uvxyz, satisfying the following conditions:
Non-Context Free Languages
Pumping Lemma for Context-Free Languages
Theorem (Pumping Lemma for Context-Free Languages) If A is a context-free language, then there is a number p (the pumping length) where, if s is any string in A of length at least p, then s may be divided into five pieces, s = uvxyz, satisfying the following conditions: 1. for each i ≼ 0, uv i xy i z ∈ A,
Non-Context Free Languages
Pumping Lemma for Context-Free Languages
Theorem (Pumping Lemma for Context-Free Languages) If A is a context-free language, then there is a number p (the pumping length) where, if s is any string in A of length at least p, then s may be divided into five pieces, s = uvxyz, satisfying the following conditions: 1. for each i ≼ 0, uv i xy i z ∈ A, 2. |vy| > 0, and
Non-Context Free Languages
Pumping Lemma for Context-Free Languages
Theorem (Pumping Lemma for Context-Free Languages) If A is a context-free language, then there is a number p (the pumping length) where, if s is any string in A of length at least p, then s may be divided into five pieces, s = uvxyz, satisfying the following conditions: 1. for each i ≥ 0, uv i xy i z ∈ A, 2. |vy| > 0, and 3. |vxy| ≤ p.
Non-Context Free Languages
Pumping Lemma for Context-Free Languages
Theorem (Pumping Lemma for Context-Free Languages) If A is a context-free language, then there is a number p (the pumping length) where, if s is any string in A of length at least p, then s may be divided into five pieces, s = uvxyz, satisfying the following conditions: 1. for each i ≥ 0, uv i xy i z ∈ A, 2. |vy| > 0, and 3. |vxy| ≤ p.
We use the pumping lemma to prove that a language L is not context-free. (How???)
Non-Context Free Languages
Some Non-Context Free Languages
Example 1. B = {an bn cn |n ≼ 0}
Non-Context Free Languages
Some Non-Context Free Languages
Example 1. B = {an bn cn |n ≥ 0} 2. C = {ai bj ck |0 ≤ i ≤ j ≤ k}
Non-Context Free Languages
Some Non-Context Free Languages
Example 1. B = {an bn cn |n ≥ 0} 2. C = {ai bj ck |0 ≤ i ≤ j ≤ k} 3. D = {ww|w ∈ {0, 1}∗ }
Non-Context Free Languages
Questions? See you next meeting!