CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a...
Transcript of CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a...
![Page 1: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/1.jpg)
CS250: Discrete Math for Computer Science
L31: Proving Languages are Not Recognized by any DFA
![Page 2: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/2.jpg)
Which Languages are Recognized by DFAs?
So far we have seen that the following languages have DFAsthat recognize them and regular expressions that denote them:
{w ∈ {a,b}?
∣∣ #b(w) ≡ 1 (mod 2)}
L(a∗ba∗(ba∗ba∗)∗)
{w ∈ {0,1}∗
∣∣ next to last symbol is 1}
L((0|1)∗1(0|1))
{w ∈ {a,b}?
∣∣∣∣ #a(w) ≡ 1 (mod 2) ∧#b(w) ≡ 0 (mod 3)
}?
{w ∈ {0,1}∗
∣∣ w has at least two 0’s}
L(1∗01∗0(0|1)∗)
{w ∈ {0,1}∗
∣∣ w has 001 or 100}
L((0|1)∗(001|100)(0|1)∗)
![Page 3: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/3.jpg)
Which Languages are Recognized by DFAs?
So far we have seen that the following languages have DFAsthat recognize them and regular expressions that denote them:{
w ∈ {a,b}?∣∣ #b(w) ≡ 1 (mod 2)
}L(a∗ba∗(ba∗ba∗)∗)
{w ∈ {0,1}∗
∣∣ next to last symbol is 1}
L((0|1)∗1(0|1))
{w ∈ {a,b}?
∣∣∣∣ #a(w) ≡ 1 (mod 2) ∧#b(w) ≡ 0 (mod 3)
}?
{w ∈ {0,1}∗
∣∣ w has at least two 0’s}
L(1∗01∗0(0|1)∗)
{w ∈ {0,1}∗
∣∣ w has 001 or 100}
L((0|1)∗(001|100)(0|1)∗)
![Page 4: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/4.jpg)
Which Languages are Recognized by DFAs?
So far we have seen that the following languages have DFAsthat recognize them and regular expressions that denote them:{
w ∈ {a,b}?∣∣ #b(w) ≡ 1 (mod 2)
}L(a∗ba∗(ba∗ba∗)∗)
{w ∈ {0,1}∗
∣∣ next to last symbol is 1}
L((0|1)∗1(0|1))
{w ∈ {a,b}?
∣∣∣∣ #a(w) ≡ 1 (mod 2) ∧#b(w) ≡ 0 (mod 3)
}?
{w ∈ {0,1}∗
∣∣ w has at least two 0’s}
L(1∗01∗0(0|1)∗)
{w ∈ {0,1}∗
∣∣ w has 001 or 100}
L((0|1)∗(001|100)(0|1)∗)
![Page 5: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/5.jpg)
Which Languages are Recognized by DFAs?
So far we have seen that the following languages have DFAsthat recognize them and regular expressions that denote them:{
w ∈ {a,b}?∣∣ #b(w) ≡ 1 (mod 2)
}L(a∗ba∗(ba∗ba∗)∗)
{w ∈ {0,1}∗
∣∣ next to last symbol is 1}
L((0|1)∗1(0|1))
{w ∈ {a,b}?
∣∣∣∣ #a(w) ≡ 1 (mod 2) ∧#b(w) ≡ 0 (mod 3)
}?
{w ∈ {0,1}∗
∣∣ w has at least two 0’s}
L(1∗01∗0(0|1)∗)
{w ∈ {0,1}∗
∣∣ w has 001 or 100}
L((0|1)∗(001|100)(0|1)∗)
![Page 6: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/6.jpg)
Which Languages are Recognized by DFAs?
So far we have seen that the following languages have DFAsthat recognize them and regular expressions that denote them:{
w ∈ {a,b}?∣∣ #b(w) ≡ 1 (mod 2)
}L(a∗ba∗(ba∗ba∗)∗)
{w ∈ {0,1}∗
∣∣ next to last symbol is 1}
L((0|1)∗1(0|1))
{w ∈ {a,b}?
∣∣∣∣ #a(w) ≡ 1 (mod 2) ∧#b(w) ≡ 0 (mod 3)
}?
{w ∈ {0,1}∗
∣∣ w has at least two 0’s}
L(1∗01∗0(0|1)∗)
{w ∈ {0,1}∗
∣∣ w has 001 or 100}
L((0|1)∗(001|100)(0|1)∗)
![Page 7: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/7.jpg)
Which Languages are Recognized by DFAs?
So far we have seen that the following languages have DFAsthat recognize them and regular expressions that denote them:{
w ∈ {a,b}?∣∣ #b(w) ≡ 1 (mod 2)
}L(a∗ba∗(ba∗ba∗)∗)
{w ∈ {0,1}∗
∣∣ next to last symbol is 1}
L((0|1)∗1(0|1))
{w ∈ {a,b}?
∣∣∣∣ #a(w) ≡ 1 (mod 2) ∧#b(w) ≡ 0 (mod 3)
}?
{w ∈ {0,1}∗
∣∣ w has at least two 0’s}
L(1∗01∗0(0|1)∗)
{w ∈ {0,1}∗
∣∣ w has 001 or 100}
L((0|1)∗(001|100)(0|1)∗)
![Page 8: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/8.jpg)
{w ∈ {0,1}∗
∣∣ w has at least two 0’s}
= L(1∗01∗0(0|1)∗)
Build a DFA D4 s.t. L(D4) = L(1∗01∗0(0|1)∗)
1∗D4
1
1∗01∗
0
1
qf
00,1
![Page 9: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/9.jpg)
{w ∈ {0,1}∗
∣∣ w has at least two 0’s}
= L(1∗01∗0(0|1)∗)
Build a DFA D4 s.t. L(D4) = L(1∗01∗0(0|1)∗)
1∗D4
1
1∗01∗
0
1
qf
00,1
![Page 10: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/10.jpg)
{w ∈ {0,1}∗
∣∣ w has at least two 0’s}
= L(1∗01∗0(0|1)∗)
Build a DFA D4 s.t. L(D4) = L(1∗01∗0(0|1)∗)
1∗D4
1
1∗01∗
0
1
qf
00,1
![Page 11: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/11.jpg)
{w ∈ {0,1}∗
∣∣ w has at least two 0’s}
= L(1∗01∗0(0|1)∗)
Build a DFA D4 s.t. L(D4) = L(1∗01∗0(0|1)∗)
1∗D4
1
1∗01∗
0
1
qf
00,1
![Page 12: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/12.jpg)
{w ∈ {0,1}∗
∣∣ w has at least two 0’s}
= L(1∗01∗0(0|1)∗)
Build a DFA D4 s.t. L(D4) = L(1∗01∗0(0|1)∗)
1∗D4
1
1∗01∗
0
1
qf
00,1
![Page 13: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/13.jpg)
{w ∈ {0,1}∗
∣∣ w has at least two 0’s}
= L(1∗01∗0(0|1)∗)
Build a DFA D4 s.t. L(D4) = L(1∗01∗0(0|1)∗)
1∗D4
1
1∗01∗
0
1
qf
0
0,1
![Page 14: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/14.jpg)
{w ∈ {0,1}∗
∣∣ w has at least two 0’s}
= L(1∗01∗0(0|1)∗)
Build a DFA D4 s.t. L(D4) = L(1∗01∗0(0|1)∗)
1∗D4
1
1∗01∗
0
1
qf
00,1
![Page 15: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/15.jpg)
Which languages are recognized by DFA or denoted byregular expressions?
How can we prove a language, L, is not recognized by anyDFA?
Idea: must show that need more than a bounded size memoryto remember what we have seen so far, x , in order to decide ifextensions of x belong to L.
![Page 16: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/16.jpg)
Which languages are recognized by DFA or denoted byregular expressions?
How can we prove a language, L, is not recognized by anyDFA?
Idea: must show that need more than a bounded size memoryto remember what we have seen so far, x , in order to decide ifextensions of x belong to L.
![Page 17: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/17.jpg)
Which languages are recognized by DFA or denoted byregular expressions?
How can we prove a language, L, is not recognized by anyDFA?
Idea: must show that need more than a bounded size memoryto remember what we have seen so far, x , in order to decide ifextensions of x belong to L.
![Page 18: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/18.jpg)
Pumping Lemma for Regular Sets:Let D = (Q,Σ, δ,q0,F ) be a DFA.
Let n = |Q|.
Let w ∈ L(D) s.t. |w | ≥ n.
Then ∃x , y , z ∈ Σ? s.t. the following all hold:1. xyz = w
2. |xy | ≤ n
3. |y | > 0, and
4. ∀k ≥ 0 (xykz ∈ L(D))
![Page 19: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/19.jpg)
Pumping Lemma for Regular Sets:Let D = (Q,Σ, δ,q0,F ) be a DFA.
Let n = |Q|.
Let w ∈ L(D) s.t. |w | ≥ n.
Then ∃x , y , z ∈ Σ? s.t. the following all hold:1. xyz = w
2. |xy | ≤ n
3. |y | > 0, and
4. ∀k ≥ 0 (xykz ∈ L(D))
![Page 20: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/20.jpg)
Pumping Lemma for Regular Sets:Let D = (Q,Σ, δ,q0,F ) be a DFA.
Let n = |Q|.
Let w ∈ L(D) s.t. |w | ≥ n.
Then ∃x , y , z ∈ Σ? s.t. the following all hold:1. xyz = w
2. |xy | ≤ n
3. |y | > 0, and
4. ∀k ≥ 0 (xykz ∈ L(D))
![Page 21: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/21.jpg)
Pumping Lemma for Regular Sets:Let D = (Q,Σ, δ,q0,F ) be a DFA.
Let n = |Q|.
Let w ∈ L(D) s.t. |w | ≥ n.
Then ∃x , y , z ∈ Σ? s.t. the following all hold:1. xyz = w
2. |xy | ≤ n
3. |y | > 0, and
4. ∀k ≥ 0 (xykz ∈ L(D))
![Page 22: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/22.jpg)
Pumping Lemma for Regular Sets:Let D = (Q,Σ, δ,q0,F )
be a DFA, n = |Q|w ∈ L(D) s.t. |w | ≥ n
Then ∃x , y , z ∈ Σ? s.t.
1. xyz = w
2. |xy | ≤ n
3. |y | > 0, and
4. ∀k ≥ 0 (xykz ∈ L(D))
1∗D4
1
1∗01∗
0
1
qf
00,1
n = 3, w = 10101 ∈ L(D4), |w | ≥ 3
Split w into x · y · z s.t. 1 ∧ 2 ∧ 3 ∧ 4
x def= ε y def
= 1 z def= 0101 ∀k ≥ 0 (xykz ∈ L(D4))
k = 0 : 0101 ∈ L(D4), k = 1 : 10101 ∈ L(D4),
k = 2 : 110101 ∈ L(D4), k = 3 : 1110101 ∈ L(D4), . . .
![Page 23: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/23.jpg)
Pumping Lemma for Regular Sets:Let D = (Q,Σ, δ,q0,F )
be a DFA, n = |Q|w ∈ L(D) s.t. |w | ≥ n
Then ∃x , y , z ∈ Σ? s.t.
1. xyz = w
2. |xy | ≤ n
3. |y | > 0, and
4. ∀k ≥ 0 (xykz ∈ L(D))
1∗D4
1
1∗01∗
0
1
qf
00,1
n = 3, w = 10101 ∈ L(D4), |w | ≥ 3
Split w into x · y · z s.t. 1 ∧ 2 ∧ 3 ∧ 4
x def= ε y def
= 1 z def= 0101 ∀k ≥ 0 (xykz ∈ L(D4))
k = 0 : 0101 ∈ L(D4), k = 1 : 10101 ∈ L(D4),
k = 2 : 110101 ∈ L(D4), k = 3 : 1110101 ∈ L(D4), . . .
![Page 24: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/24.jpg)
Pumping Lemma for Regular Sets:Let D = (Q,Σ, δ,q0,F )
be a DFA, n = |Q|w ∈ L(D) s.t. |w | ≥ n
Then ∃x , y , z ∈ Σ? s.t.
1. xyz = w
2. |xy | ≤ n
3. |y | > 0, and
4. ∀k ≥ 0 (xykz ∈ L(D))
1∗D4
1
1∗01∗
0
1
qf
00,1
n = 3, w = 10101 ∈ L(D4), |w | ≥ 3
Split w into x · y · z s.t. 1 ∧ 2 ∧ 3 ∧ 4
x def= ε y def
= 1 z def= 0101 ∀k ≥ 0 (xykz ∈ L(D4))
k = 0 : 0101 ∈ L(D4), k = 1 : 10101 ∈ L(D4),
k = 2 : 110101 ∈ L(D4), k = 3 : 1110101 ∈ L(D4), . . .
![Page 25: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/25.jpg)
Pumping Lemma for Regular Sets:Let D = (Q,Σ, δ,q0,F )
be a DFA, n = |Q|w ∈ L(D) s.t. |w | ≥ n
Then ∃x , y , z ∈ Σ? s.t.
1. xyz = w
2. |xy | ≤ n
3. |y | > 0, and
4. ∀k ≥ 0 (xykz ∈ L(D))
1∗D4
1
1∗01∗
0
1
qf
00,1
n = 3, w = 10101 ∈ L(D4), |w | ≥ 3
Split w into x · y · z s.t. 1 ∧ 2 ∧ 3 ∧ 4
x def= ε y def
= 1 z def= 0101 ∀k ≥ 0 (xykz ∈ L(D4))
k = 0 : 0101 ∈ L(D4), k = 1 : 10101 ∈ L(D4),
k = 2 : 110101 ∈ L(D4), k = 3 : 1110101 ∈ L(D4), . . .
![Page 26: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/26.jpg)
Pumping Lemma for Regular Sets:Let D = (Q,Σ, δ,q0,F )
be a DFA, n = |Q|w ∈ L(D) s.t. |w | ≥ n
Then ∃x , y , z ∈ Σ? s.t.
1. xyz = w
2. |xy | ≤ n
3. |y | > 0, and
4. ∀k ≥ 0 (xykz ∈ L(D))
1∗D4
1
1∗01∗
0
1
qf
00,1
n = 3, w = 10101 ∈ L(D4), |w | ≥ 3
Split w into x · y · z s.t. 1 ∧ 2 ∧ 3 ∧ 4
x def= ε y def
= 1 z def= 0101
∀k ≥ 0 (xykz ∈ L(D4))
k = 0 : 0101 ∈ L(D4), k = 1 : 10101 ∈ L(D4),
k = 2 : 110101 ∈ L(D4), k = 3 : 1110101 ∈ L(D4), . . .
![Page 27: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/27.jpg)
Pumping Lemma for Regular Sets:Let D = (Q,Σ, δ,q0,F )
be a DFA, n = |Q|w ∈ L(D) s.t. |w | ≥ n
Then ∃x , y , z ∈ Σ? s.t.
1. xyz = w
2. |xy | ≤ n
3. |y | > 0, and
4. ∀k ≥ 0 (xykz ∈ L(D))
1∗D4
1
1∗01∗
0
1
qf
00,1
n = 3, w = 10101 ∈ L(D4), |w | ≥ 3
Split w into x · y · z s.t. 1 ∧ 2 ∧ 3 ∧ 4
x def= ε y def
= 1 z def= 0101 ∀k ≥ 0 (xykz ∈ L(D4))
k = 0 : 0101 ∈ L(D4), k = 1 : 10101 ∈ L(D4),
k = 2 : 110101 ∈ L(D4), k = 3 : 1110101 ∈ L(D4), . . .
![Page 28: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/28.jpg)
Pumping Lemma for Regular Sets:Let D = (Q,Σ, δ,q0,F )
be a DFA, n = |Q|w ∈ L(D) s.t. |w | ≥ n
Then ∃x , y , z ∈ Σ? s.t.
1. xyz = w
2. |xy | ≤ n
3. |y | > 0, and
4. ∀k ≥ 0 (xykz ∈ L(D))
1∗D4
1
1∗01∗
0
1
qf
00,1
n = 3, w = 10101 ∈ L(D4), |w | ≥ 3
Split w into x · y · z s.t. 1 ∧ 2 ∧ 3 ∧ 4
x def= ε y def
= 1 z def= 0101 ∀k ≥ 0 (xykz ∈ L(D4))
k = 0 : 0101 ∈ L(D4),
k = 1 : 10101 ∈ L(D4),
k = 2 : 110101 ∈ L(D4), k = 3 : 1110101 ∈ L(D4), . . .
![Page 29: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/29.jpg)
Pumping Lemma for Regular Sets:Let D = (Q,Σ, δ,q0,F )
be a DFA, n = |Q|w ∈ L(D) s.t. |w | ≥ n
Then ∃x , y , z ∈ Σ? s.t.
1. xyz = w
2. |xy | ≤ n
3. |y | > 0, and
4. ∀k ≥ 0 (xykz ∈ L(D))
1∗D4
1
1∗01∗
0
1
qf
00,1
n = 3, w = 10101 ∈ L(D4), |w | ≥ 3
Split w into x · y · z s.t. 1 ∧ 2 ∧ 3 ∧ 4
x def= ε y def
= 1 z def= 0101 ∀k ≥ 0 (xykz ∈ L(D4))
k = 0 : 0101 ∈ L(D4), k = 1 : 10101 ∈ L(D4),
k = 2 : 110101 ∈ L(D4), k = 3 : 1110101 ∈ L(D4), . . .
![Page 30: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/30.jpg)
Pumping Lemma for Regular Sets:Let D = (Q,Σ, δ,q0,F )
be a DFA, n = |Q|w ∈ L(D) s.t. |w | ≥ n
Then ∃x , y , z ∈ Σ? s.t.
1. xyz = w
2. |xy | ≤ n
3. |y | > 0, and
4. ∀k ≥ 0 (xykz ∈ L(D))
1∗D4
1
1∗01∗
0
1
qf
00,1
n = 3, w = 10101 ∈ L(D4), |w | ≥ 3
Split w into x · y · z s.t. 1 ∧ 2 ∧ 3 ∧ 4
x def= ε y def
= 1 z def= 0101 ∀k ≥ 0 (xykz ∈ L(D4))
k = 0 : 0101 ∈ L(D4), k = 1 : 10101 ∈ L(D4),
k = 2 : 110101 ∈ L(D4),
k = 3 : 1110101 ∈ L(D4), . . .
![Page 31: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/31.jpg)
Pumping Lemma for Regular Sets:Let D = (Q,Σ, δ,q0,F )
be a DFA, n = |Q|w ∈ L(D) s.t. |w | ≥ n
Then ∃x , y , z ∈ Σ? s.t.
1. xyz = w
2. |xy | ≤ n
3. |y | > 0, and
4. ∀k ≥ 0 (xykz ∈ L(D))
1∗D4
1
1∗01∗
0
1
qf
00,1
n = 3, w = 10101 ∈ L(D4), |w | ≥ 3
Split w into x · y · z s.t. 1 ∧ 2 ∧ 3 ∧ 4
x def= ε y def
= 1 z def= 0101 ∀k ≥ 0 (xykz ∈ L(D4))
k = 0 : 0101 ∈ L(D4), k = 1 : 10101 ∈ L(D4),
k = 2 : 110101 ∈ L(D4), k = 3 : 1110101 ∈ L(D4), . . .
![Page 32: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/32.jpg)
Pumping Lemma for Regular Sets:Let D = (Q,Σ, δ,q0,F )
be a DFA, n = |Q|w ∈ L(D) s.t. |w | ≥ n
Then ∃x , y , z ∈ Σ? s.t.
1. xyz = w
2. |xy | ≤ n
3. |y | > 0, and
4. ∀k ≥ 0 (xykz ∈ L(D))
1∗D4
1
1∗01∗
0
1
qf
00,1
n = 3, w = 000 ∈ L(D4), |w | ≥ 3
Split w into x · y · z s.t. 1 ∧ 2 ∧ 3 ∧ 4
x def= 00 y def
= 0 z def= ε ∀k ≥ 0 (xykz ∈ L(D4))
k = 0 : 00 ∈ L(D4), k = 1 : 000 ∈ L(D4),
k = 2 : 0000 ∈ L(D4), k = 3 : 00000 ∈ L(D4), . . .
![Page 33: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/33.jpg)
Pumping Lemma for Regular Sets:Let D = (Q,Σ, δ,q0,F )
be a DFA, n = |Q|w ∈ L(D) s.t. |w | ≥ n
Then ∃x , y , z ∈ Σ? s.t.
1. xyz = w
2. |xy | ≤ n
3. |y | > 0, and
4. ∀k ≥ 0 (xykz ∈ L(D))
1∗D4
1
1∗01∗
0
1
qf
00,1
n = 3, w = 000 ∈ L(D4), |w | ≥ 3
Split w into x · y · z s.t. 1 ∧ 2 ∧ 3 ∧ 4
x def= 00 y def
= 0 z def= ε ∀k ≥ 0 (xykz ∈ L(D4))
k = 0 : 00 ∈ L(D4), k = 1 : 000 ∈ L(D4),
k = 2 : 0000 ∈ L(D4), k = 3 : 00000 ∈ L(D4), . . .
![Page 34: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/34.jpg)
Pumping Lemma for Regular Sets:Let D = (Q,Σ, δ,q0,F )
be a DFA, n = |Q|w ∈ L(D) s.t. |w | ≥ n
Then ∃x , y , z ∈ Σ? s.t.
1. xyz = w
2. |xy | ≤ n
3. |y | > 0, and
4. ∀k ≥ 0 (xykz ∈ L(D))
1∗D4
1
1∗01∗
0
1
qf
00,1
n = 3, w = 000 ∈ L(D4), |w | ≥ 3
Split w into x · y · z s.t. 1 ∧ 2 ∧ 3 ∧ 4
x def= 00 y def
= 0 z def= ε ∀k ≥ 0 (xykz ∈ L(D4))
k = 0 : 00 ∈ L(D4), k = 1 : 000 ∈ L(D4),
k = 2 : 0000 ∈ L(D4), k = 3 : 00000 ∈ L(D4), . . .
![Page 35: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/35.jpg)
Pumping Lemma for Regular Sets:Let D = (Q,Σ, δ,q0,F )
be a DFA, n = |Q|w ∈ L(D) s.t. |w | ≥ n
Then ∃x , y , z ∈ Σ? s.t.
1. xyz = w
2. |xy | ≤ n
3. |y | > 0, and
4. ∀k ≥ 0 (xykz ∈ L(D))
1∗D4
1
1∗01∗
0
1
qf
00,1
n = 3, w = 000 ∈ L(D4), |w | ≥ 3
Split w into x · y · z s.t. 1 ∧ 2 ∧ 3 ∧ 4
x def= 00 y def
= 0 z def= ε ∀k ≥ 0 (xykz ∈ L(D4))
k = 0 : 00 ∈ L(D4), k = 1 : 000 ∈ L(D4),
k = 2 : 0000 ∈ L(D4), k = 3 : 00000 ∈ L(D4), . . .
![Page 36: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/36.jpg)
Pumping Lemma for Regular Sets:Let D = (Q,Σ, δ,q0,F )
be a DFA, n = |Q|w ∈ L(D) s.t. |w | ≥ n
Then ∃x , y , z ∈ Σ? s.t.
1. xyz = w
2. |xy | ≤ n
3. |y | > 0, and
4. ∀k ≥ 0 (xykz ∈ L(D))
1∗D4
1
1∗01∗
0
1
qf
00,1
n = 3, w = 000 ∈ L(D4), |w | ≥ 3
Split w into x · y · z s.t. 1 ∧ 2 ∧ 3 ∧ 4
x def= 00 y def
= 0 z def= ε
∀k ≥ 0 (xykz ∈ L(D4))
k = 0 : 00 ∈ L(D4), k = 1 : 000 ∈ L(D4),
k = 2 : 0000 ∈ L(D4), k = 3 : 00000 ∈ L(D4), . . .
![Page 37: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/37.jpg)
Pumping Lemma for Regular Sets:Let D = (Q,Σ, δ,q0,F )
be a DFA, n = |Q|w ∈ L(D) s.t. |w | ≥ n
Then ∃x , y , z ∈ Σ? s.t.
1. xyz = w
2. |xy | ≤ n
3. |y | > 0, and
4. ∀k ≥ 0 (xykz ∈ L(D))
1∗D4
1
1∗01∗
0
1
qf
00,1
n = 3, w = 000 ∈ L(D4), |w | ≥ 3
Split w into x · y · z s.t. 1 ∧ 2 ∧ 3 ∧ 4
x def= 00 y def
= 0 z def= ε ∀k ≥ 0 (xykz ∈ L(D4))
k = 0 : 00 ∈ L(D4), k = 1 : 000 ∈ L(D4),
k = 2 : 0000 ∈ L(D4), k = 3 : 00000 ∈ L(D4), . . .
![Page 38: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/38.jpg)
Pumping Lemma for Regular Sets:Let D = (Q,Σ, δ,q0,F )
be a DFA, n = |Q|w ∈ L(D) s.t. |w | ≥ n
Then ∃x , y , z ∈ Σ? s.t.
1. xyz = w
2. |xy | ≤ n
3. |y | > 0, and
4. ∀k ≥ 0 (xykz ∈ L(D))
1∗D4
1
1∗01∗
0
1
qf
00,1
n = 3, w = 000 ∈ L(D4), |w | ≥ 3
Split w into x · y · z s.t. 1 ∧ 2 ∧ 3 ∧ 4
x def= 00 y def
= 0 z def= ε ∀k ≥ 0 (xykz ∈ L(D4))
k = 0 : 00 ∈ L(D4),
k = 1 : 000 ∈ L(D4),
k = 2 : 0000 ∈ L(D4), k = 3 : 00000 ∈ L(D4), . . .
![Page 39: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/39.jpg)
Pumping Lemma for Regular Sets:Let D = (Q,Σ, δ,q0,F )
be a DFA, n = |Q|w ∈ L(D) s.t. |w | ≥ n
Then ∃x , y , z ∈ Σ? s.t.
1. xyz = w
2. |xy | ≤ n
3. |y | > 0, and
4. ∀k ≥ 0 (xykz ∈ L(D))
1∗D4
1
1∗01∗
0
1
qf
00,1
n = 3, w = 000 ∈ L(D4), |w | ≥ 3
Split w into x · y · z s.t. 1 ∧ 2 ∧ 3 ∧ 4
x def= 00 y def
= 0 z def= ε ∀k ≥ 0 (xykz ∈ L(D4))
k = 0 : 00 ∈ L(D4), k = 1 : 000 ∈ L(D4),
k = 2 : 0000 ∈ L(D4), k = 3 : 00000 ∈ L(D4), . . .
![Page 40: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/40.jpg)
Pumping Lemma for Regular Sets:Let D = (Q,Σ, δ,q0,F )
be a DFA, n = |Q|w ∈ L(D) s.t. |w | ≥ n
Then ∃x , y , z ∈ Σ? s.t.
1. xyz = w
2. |xy | ≤ n
3. |y | > 0, and
4. ∀k ≥ 0 (xykz ∈ L(D))
1∗D4
1
1∗01∗
0
1
qf
00,1
n = 3, w = 000 ∈ L(D4), |w | ≥ 3
Split w into x · y · z s.t. 1 ∧ 2 ∧ 3 ∧ 4
x def= 00 y def
= 0 z def= ε ∀k ≥ 0 (xykz ∈ L(D4))
k = 0 : 00 ∈ L(D4), k = 1 : 000 ∈ L(D4),
k = 2 : 0000 ∈ L(D4),
k = 3 : 00000 ∈ L(D4), . . .
![Page 41: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/41.jpg)
Pumping Lemma for Regular Sets:Let D = (Q,Σ, δ,q0,F )
be a DFA, n = |Q|w ∈ L(D) s.t. |w | ≥ n
Then ∃x , y , z ∈ Σ? s.t.
1. xyz = w
2. |xy | ≤ n
3. |y | > 0, and
4. ∀k ≥ 0 (xykz ∈ L(D))
1∗D4
1
1∗01∗
0
1
qf
00,1
n = 3, w = 000 ∈ L(D4), |w | ≥ 3
Split w into x · y · z s.t. 1 ∧ 2 ∧ 3 ∧ 4
x def= 00 y def
= 0 z def= ε ∀k ≥ 0 (xykz ∈ L(D4))
k = 0 : 00 ∈ L(D4), k = 1 : 000 ∈ L(D4),
k = 2 : 0000 ∈ L(D4), k = 3 : 00000 ∈ L(D4), . . .
![Page 42: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/42.jpg)
proof: Let w ∈ L(D), |w | ≥ n, w = w1,w2, . . . ,wn · u
w = w1 w2 w3 · · · wn uq0 q1 q2 q3 · · · qn−1 qn qf
By Pigeon-Hole Principle ∃i < j ≤ n (qi = qj)
w =
x︷ ︸︸ ︷w1 . . .wi
y︷ ︸︸ ︷wi+1 . . .wj
z︷ ︸︸ ︷wj+1 . . .wnu
q0 qi qi qf
qi = δ?(qi , y) |y | ≥ 1 δ?(qi , z) = qf ∈ F
Thus, xykz ∈ L(D) for k = 0,1,2, . . . �
![Page 43: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/43.jpg)
proof: Let w ∈ L(D), |w | ≥ n, w = w1,w2, . . . ,wn · u
w = w1 w2 w3 · · · wn uq0 q1 q2 q3 · · · qn−1 qn qf
By Pigeon-Hole Principle ∃i < j ≤ n (qi = qj)
w =
x︷ ︸︸ ︷w1 . . .wi
y︷ ︸︸ ︷wi+1 . . .wj
z︷ ︸︸ ︷wj+1 . . .wnu
q0 qi qi qf
qi = δ?(qi , y) |y | ≥ 1 δ?(qi , z) = qf ∈ F
Thus, xykz ∈ L(D) for k = 0,1,2, . . . �
![Page 44: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/44.jpg)
proof: Let w ∈ L(D), |w | ≥ n, w = w1,w2, . . . ,wn · u
w = w1 w2 w3 · · · wn uq0 q1 q2 q3 · · · qn−1 qn qf
By Pigeon-Hole Principle ∃i < j ≤ n (qi = qj)
w =
x︷ ︸︸ ︷w1 . . .wi
y︷ ︸︸ ︷wi+1 . . .wj
z︷ ︸︸ ︷wj+1 . . .wnu
q0 qi qi qf
qi = δ?(qi , y) |y | ≥ 1 δ?(qi , z) = qf ∈ F
Thus, xykz ∈ L(D) for k = 0,1,2, . . . �
![Page 45: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/45.jpg)
proof: Let w ∈ L(D), |w | ≥ n, w = w1,w2, . . . ,wn · u
w = w1 w2 w3 · · · wn uq0 q1 q2 q3 · · · qn−1 qn qf
By Pigeon-Hole Principle ∃i < j ≤ n (qi = qj)
w =
x︷ ︸︸ ︷w1 . . .wi
y︷ ︸︸ ︷wi+1 . . .wj
z︷ ︸︸ ︷wj+1 . . .wnu
q0 qi qi qf
qi = δ?(qi , y) |y | ≥ 1 δ?(qi , z) = qf ∈ F
Thus, xykz ∈ L(D) for k = 0,1,2, . . . �
![Page 46: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/46.jpg)
proof: Let w ∈ L(D), |w | ≥ n, w = w1,w2, . . . ,wn · u
w = w1 w2 w3 · · · wn uq0 q1 q2 q3 · · · qn−1 qn qf
By Pigeon-Hole Principle ∃i < j ≤ n (qi = qj)
w =
x︷ ︸︸ ︷w1 . . .wi
y︷ ︸︸ ︷wi+1 . . .wj
z︷ ︸︸ ︷wj+1 . . .wnu
q0 qi qi qf
qi = δ?(qi , y) |y | ≥ 1 δ?(qi , z) = qf ∈ F
Thus, xykz ∈ L(D) for k = 0,1,2, . . . �
![Page 47: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/47.jpg)
proof: Let w ∈ L(D), |w | ≥ n, w = w1,w2, . . . ,wn · u
w = w1 w2 w3 · · · wn uq0 q1 q2 q3 · · · qn−1 qn qf
By Pigeon-Hole Principle ∃i < j ≤ n (qi = qj)
w =
x︷ ︸︸ ︷w1 . . .wi
y︷ ︸︸ ︷wi+1 . . .wj
z︷ ︸︸ ︷wj+1 . . .wnu
q0 qi qi qf
qi = δ?(qi , y) |y | ≥ 1 δ?(qi , z) = qf ∈ F
Thus, xykz ∈ L(D) for k = 0,1,2, . . . �
![Page 48: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/48.jpg)
Pumping Lemma for Regular Sets:Let D = (Q,Σ, δ,q0,F ) be a DFA.
Let n = |Q|.
Let w ∈ L(D) s.t. |w | ≥ n.
Then ∃x , y , z ∈ Σ? s.t. the following all hold:1. xyz = w
2. |xy | ≤ n
3. |y | > 0, and
4. ∀k ≥ 0 (xykz ∈ L(D))
Easiest tool to prove languages not DFA acceptable
![Page 49: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/49.jpg)
Pumping Lemma for Regular Sets:Let D = (Q,Σ, δ,q0,F ) be a DFA.
Let n = |Q|.
Let w ∈ L(D) s.t. |w | ≥ n.
Then ∃x , y , z ∈ Σ? s.t. the following all hold:1. xyz = w
2. |xy | ≤ n
3. |y | > 0, and
4. ∀k ≥ 0 (xykz ∈ L(D))
Easiest tool to prove languages not DFA acceptable
![Page 50: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/50.jpg)
Prop: E ={
ar br∣∣ r ∈ N
}is not DFA acceptable.
proof by contradiction:Assume: E is accepted by DFA D with n states.
you (G) choose string: w ∈ E = L(D)Let w = anbn
By pumping lemma, D chooses x , y , z ∈ {a,b}?, s.t.,
1. w = anbn = xyz2. |xy | ≤ n3. |y | > 0, and4. ∀k ∈ N ( xykz ∈ E )
Since 0 < |xy | ≤ n, y = ai , 0 < i ≤ n
Thus xy0z = an−ibn ∈ E .
but an−ibn 6∈ E .
FTherefore E is not DFA acceptable. �
![Page 51: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/51.jpg)
Prop: E ={
ar br∣∣ r ∈ N
}is not DFA acceptable.
proof by contradiction:Assume: E is accepted by DFA D with n states.
you (G) choose string: w ∈ E = L(D)Let w = anbn
By pumping lemma, D chooses x , y , z ∈ {a,b}?, s.t.,
1. w = anbn = xyz2. |xy | ≤ n3. |y | > 0, and4. ∀k ∈ N ( xykz ∈ E )
Since 0 < |xy | ≤ n, y = ai , 0 < i ≤ n
Thus xy0z = an−ibn ∈ E .
but an−ibn 6∈ E .
FTherefore E is not DFA acceptable. �
![Page 52: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/52.jpg)
Prop: E ={
ar br∣∣ r ∈ N
}is not DFA acceptable.
proof by contradiction:Assume: E is accepted by DFA D with n states.
you (G) choose string: w ∈ E = L(D)
Let w = anbn
By pumping lemma, D chooses x , y , z ∈ {a,b}?, s.t.,
1. w = anbn = xyz2. |xy | ≤ n3. |y | > 0, and4. ∀k ∈ N ( xykz ∈ E )
Since 0 < |xy | ≤ n, y = ai , 0 < i ≤ n
Thus xy0z = an−ibn ∈ E .
but an−ibn 6∈ E .
FTherefore E is not DFA acceptable. �
![Page 53: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/53.jpg)
Prop: E ={
ar br∣∣ r ∈ N
}is not DFA acceptable.
proof by contradiction:Assume: E is accepted by DFA D with n states.
you (G) choose string: w ∈ E = L(D)Let w = anbn
By pumping lemma, D chooses x , y , z ∈ {a,b}?, s.t.,
1. w = anbn = xyz2. |xy | ≤ n3. |y | > 0, and4. ∀k ∈ N ( xykz ∈ E )
Since 0 < |xy | ≤ n, y = ai , 0 < i ≤ n
Thus xy0z = an−ibn ∈ E .
but an−ibn 6∈ E .
FTherefore E is not DFA acceptable. �
![Page 54: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/54.jpg)
Prop: E ={
ar br∣∣ r ∈ N
}is not DFA acceptable.
proof by contradiction:Assume: E is accepted by DFA D with n states.
you (G) choose string: w ∈ E = L(D)Let w = anbn
By pumping lemma, D chooses x , y , z ∈ {a,b}?, s.t.,
1. w = anbn = xyz2. |xy | ≤ n3. |y | > 0, and4. ∀k ∈ N ( xykz ∈ E )
Since 0 < |xy | ≤ n, y = ai , 0 < i ≤ n
Thus xy0z = an−ibn ∈ E .
but an−ibn 6∈ E .
FTherefore E is not DFA acceptable. �
![Page 55: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/55.jpg)
Prop: E ={
ar br∣∣ r ∈ N
}is not DFA acceptable.
proof by contradiction:Assume: E is accepted by DFA D with n states.
you (G) choose string: w ∈ E = L(D)Let w = anbn
By pumping lemma, D chooses x , y , z ∈ {a,b}?, s.t.,
1. w = anbn = xyz2. |xy | ≤ n3. |y | > 0, and4. ∀k ∈ N ( xykz ∈ E )
Since 0 < |xy | ≤ n, y = ai , 0 < i ≤ n
Thus xy0z = an−ibn ∈ E .
but an−ibn 6∈ E .
FTherefore E is not DFA acceptable. �
![Page 56: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/56.jpg)
Prop: E ={
ar br∣∣ r ∈ N
}is not DFA acceptable.
proof by contradiction:Assume: E is accepted by DFA D with n states.
you (G) choose string: w ∈ E = L(D)Let w = anbn
By pumping lemma, D chooses x , y , z ∈ {a,b}?, s.t.,
1. w = anbn = xyz2. |xy | ≤ n3. |y | > 0, and4. ∀k ∈ N ( xykz ∈ E )
Since 0 < |xy | ≤ n, y = ai , 0 < i ≤ n
Thus xy0z = an−ibn ∈ E .
but an−ibn 6∈ E .
FTherefore E is not DFA acceptable. �
![Page 57: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/57.jpg)
Prop: E ={
ar br∣∣ r ∈ N
}is not DFA acceptable.
proof by contradiction:Assume: E is accepted by DFA D with n states.
you (G) choose string: w ∈ E = L(D)Let w = anbn
By pumping lemma, D chooses x , y , z ∈ {a,b}?, s.t.,
1. w = anbn = xyz2. |xy | ≤ n3. |y | > 0, and4. ∀k ∈ N ( xykz ∈ E )
Since 0 < |xy | ≤ n, y = ai , 0 < i ≤ n
Thus xy0z = an−ibn ∈ E .
but an−ibn 6∈ E .
FTherefore E is not DFA acceptable. �
![Page 58: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/58.jpg)
Prop: E ={
ar br∣∣ r ∈ N
}is not DFA acceptable.
proof by contradiction:Assume: E is accepted by DFA D with n states.
you (G) choose string: w ∈ E = L(D)Let w = anbn
By pumping lemma, D chooses x , y , z ∈ {a,b}?, s.t.,
1. w = anbn = xyz2. |xy | ≤ n3. |y | > 0, and4. ∀k ∈ N ( xykz ∈ E )
Since 0 < |xy | ≤ n, y = ai , 0 < i ≤ n
Thus xy0z = an−ibn ∈ E .
but an−ibn 6∈ E .
F
Therefore E is not DFA acceptable. �
![Page 59: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/59.jpg)
Prop: E ={
ar br∣∣ r ∈ N
}is not DFA acceptable.
proof by contradiction:Assume: E is accepted by DFA D with n states.
you (G) choose string: w ∈ E = L(D)Let w = anbn
By pumping lemma, D chooses x , y , z ∈ {a,b}?, s.t.,
1. w = anbn = xyz2. |xy | ≤ n3. |y | > 0, and4. ∀k ∈ N ( xykz ∈ E )
Since 0 < |xy | ≤ n, y = ai , 0 < i ≤ n
Thus xy0z = an−ibn ∈ E .
but an−ibn 6∈ E .
FTherefore E is not DFA acceptable. �
![Page 60: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/60.jpg)
Prop: M ={
w ∈ {a,b}?∣∣ #a(w) > #b(w)
}not DFA-acceptable.
proof by contradiction:Assume: M is accepted by DFA D with n states.
you choose string: w ∈ M = L(D) Let w = an+1bn
By pumping lemma, D chooses x , y , z ∈ {a,b}∗ s.t.
1. w = an+1bn = xyz2. |xy | ≤ n3. |y | > 0, and4. ∀k ∈ N ( xykz ∈ M )
Since 0 < |xy | ≤ n, y = ai , 0 < i ≤ n
Thus xy0z = an+1−ibn ∈ M.
but an+1−ibn 6∈ M.
FTherefore M is not DFA acceptable. �
![Page 61: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/61.jpg)
Prop: M ={
w ∈ {a,b}?∣∣ #a(w) > #b(w)
}not DFA-acceptable.
proof by contradiction:Assume: M is accepted by DFA D with n states.
you choose string: w ∈ M = L(D) Let w = an+1bn
By pumping lemma, D chooses x , y , z ∈ {a,b}∗ s.t.
1. w = an+1bn = xyz2. |xy | ≤ n3. |y | > 0, and4. ∀k ∈ N ( xykz ∈ M )
Since 0 < |xy | ≤ n, y = ai , 0 < i ≤ n
Thus xy0z = an+1−ibn ∈ M.
but an+1−ibn 6∈ M.
FTherefore M is not DFA acceptable. �
![Page 62: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/62.jpg)
Prop: M ={
w ∈ {a,b}?∣∣ #a(w) > #b(w)
}not DFA-acceptable.
proof by contradiction:Assume: M is accepted by DFA D with n states.
you choose string: w ∈ M = L(D)
Let w = an+1bn
By pumping lemma, D chooses x , y , z ∈ {a,b}∗ s.t.
1. w = an+1bn = xyz2. |xy | ≤ n3. |y | > 0, and4. ∀k ∈ N ( xykz ∈ M )
Since 0 < |xy | ≤ n, y = ai , 0 < i ≤ n
Thus xy0z = an+1−ibn ∈ M.
but an+1−ibn 6∈ M.
FTherefore M is not DFA acceptable. �
![Page 63: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/63.jpg)
Prop: M ={
w ∈ {a,b}?∣∣ #a(w) > #b(w)
}not DFA-acceptable.
proof by contradiction:Assume: M is accepted by DFA D with n states.
you choose string: w ∈ M = L(D) Let w = an+1bn
By pumping lemma, D chooses x , y , z ∈ {a,b}∗ s.t.
1. w = an+1bn = xyz2. |xy | ≤ n3. |y | > 0, and4. ∀k ∈ N ( xykz ∈ M )
Since 0 < |xy | ≤ n, y = ai , 0 < i ≤ n
Thus xy0z = an+1−ibn ∈ M.
but an+1−ibn 6∈ M.
FTherefore M is not DFA acceptable. �
![Page 64: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/64.jpg)
Prop: M ={
w ∈ {a,b}?∣∣ #a(w) > #b(w)
}not DFA-acceptable.
proof by contradiction:Assume: M is accepted by DFA D with n states.
you choose string: w ∈ M = L(D) Let w = an+1bn
By pumping lemma, D chooses x , y , z ∈ {a,b}∗ s.t.
1. w = an+1bn = xyz2. |xy | ≤ n3. |y | > 0, and4. ∀k ∈ N ( xykz ∈ M )
Since 0 < |xy | ≤ n, y = ai , 0 < i ≤ n
Thus xy0z = an+1−ibn ∈ M.
but an+1−ibn 6∈ M.
FTherefore M is not DFA acceptable. �
![Page 65: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/65.jpg)
Prop: M ={
w ∈ {a,b}?∣∣ #a(w) > #b(w)
}not DFA-acceptable.
proof by contradiction:Assume: M is accepted by DFA D with n states.
you choose string: w ∈ M = L(D) Let w = an+1bn
By pumping lemma, D chooses x , y , z ∈ {a,b}∗ s.t.
1. w = an+1bn = xyz2. |xy | ≤ n3. |y | > 0, and4. ∀k ∈ N ( xykz ∈ M )
Since 0 < |xy | ≤ n, y = ai , 0 < i ≤ n
Thus xy0z = an+1−ibn ∈ M.
but an+1−ibn 6∈ M.
FTherefore M is not DFA acceptable. �
![Page 66: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/66.jpg)
Prop: M ={
w ∈ {a,b}?∣∣ #a(w) > #b(w)
}not DFA-acceptable.
proof by contradiction:Assume: M is accepted by DFA D with n states.
you choose string: w ∈ M = L(D) Let w = an+1bn
By pumping lemma, D chooses x , y , z ∈ {a,b}∗ s.t.
1. w = an+1bn = xyz2. |xy | ≤ n3. |y | > 0, and4. ∀k ∈ N ( xykz ∈ M )
Since 0 < |xy | ≤ n, y = ai , 0 < i ≤ n
Thus xy0z = an+1−ibn ∈ M.
but an+1−ibn 6∈ M.
FTherefore M is not DFA acceptable. �
![Page 67: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/67.jpg)
Prop: M ={
w ∈ {a,b}?∣∣ #a(w) > #b(w)
}not DFA-acceptable.
proof by contradiction:Assume: M is accepted by DFA D with n states.
you choose string: w ∈ M = L(D) Let w = an+1bn
By pumping lemma, D chooses x , y , z ∈ {a,b}∗ s.t.
1. w = an+1bn = xyz2. |xy | ≤ n3. |y | > 0, and4. ∀k ∈ N ( xykz ∈ M )
Since 0 < |xy | ≤ n, y = ai , 0 < i ≤ n
Thus xy0z = an+1−ibn ∈ M.
but an+1−ibn 6∈ M.
FTherefore M is not DFA acceptable. �
![Page 68: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/68.jpg)
Prop: M ={
w ∈ {a,b}?∣∣ #a(w) > #b(w)
}not DFA-acceptable.
proof by contradiction:Assume: M is accepted by DFA D with n states.
you choose string: w ∈ M = L(D) Let w = an+1bn
By pumping lemma, D chooses x , y , z ∈ {a,b}∗ s.t.
1. w = an+1bn = xyz2. |xy | ≤ n3. |y | > 0, and4. ∀k ∈ N ( xykz ∈ M )
Since 0 < |xy | ≤ n, y = ai , 0 < i ≤ n
Thus xy0z = an+1−ibn ∈ M.
but an+1−ibn 6∈ M.
F
Therefore M is not DFA acceptable. �
![Page 69: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/69.jpg)
Prop: M ={
w ∈ {a,b}?∣∣ #a(w) > #b(w)
}not DFA-acceptable.
proof by contradiction:Assume: M is accepted by DFA D with n states.
you choose string: w ∈ M = L(D) Let w = an+1bn
By pumping lemma, D chooses x , y , z ∈ {a,b}∗ s.t.
1. w = an+1bn = xyz2. |xy | ≤ n3. |y | > 0, and4. ∀k ∈ N ( xykz ∈ M )
Since 0 < |xy | ≤ n, y = ai , 0 < i ≤ n
Thus xy0z = an+1−ibn ∈ M.
but an+1−ibn 6∈ M.
FTherefore M is not DFA acceptable. �
![Page 70: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/70.jpg)
Prop: P ={
w ∈ {a,b}?∣∣ |w | is prime
}is not DFA acceptable.
proof: Assume: P is accepted
by DFA D with n states.
you choose string: w ∈ P = L(D) to get contradiction
Let w = ap where p ≥ n is prime
By pumping lemma, D chooses x , y , z ∈ {a,b}∗ s.t.
1. w = ap = xyz2. |xy | ≤ n3. |y | > 0, and4. ∀k ∈ N ( xykz ∈ P )
y = ai , 0 < i ≤ n
Thus xyp+1z = xyzyp = apap·i = ap(i+1) ∈ P.
but p(i + 1) is not prime, so xyp+1z 6∈ P.
FTherefore P is not regular. �
![Page 71: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/71.jpg)
Prop: P ={
w ∈ {a,b}?∣∣ |w | is prime
}is not DFA acceptable.
proof: Assume: P is accepted by DFA D with n states.
you choose string: w ∈ P = L(D) to get contradiction
Let w = ap where p ≥ n is prime
By pumping lemma, D chooses x , y , z ∈ {a,b}∗ s.t.
1. w = ap = xyz2. |xy | ≤ n3. |y | > 0, and4. ∀k ∈ N ( xykz ∈ P )
y = ai , 0 < i ≤ n
Thus xyp+1z = xyzyp = apap·i = ap(i+1) ∈ P.
but p(i + 1) is not prime, so xyp+1z 6∈ P.
FTherefore P is not regular. �
![Page 72: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/72.jpg)
Prop: P ={
w ∈ {a,b}?∣∣ |w | is prime
}is not DFA acceptable.
proof: Assume: P is accepted by DFA D with n states.
you choose string: w ∈ P = L(D) to get contradiction
Let w = ap where p ≥ n is prime
By pumping lemma, D chooses x , y , z ∈ {a,b}∗ s.t.
1. w = ap = xyz2. |xy | ≤ n3. |y | > 0, and4. ∀k ∈ N ( xykz ∈ P )
y = ai , 0 < i ≤ n
Thus xyp+1z = xyzyp = apap·i = ap(i+1) ∈ P.
but p(i + 1) is not prime, so xyp+1z 6∈ P.
FTherefore P is not regular. �
![Page 73: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/73.jpg)
Prop: P ={
w ∈ {a,b}?∣∣ |w | is prime
}is not DFA acceptable.
proof: Assume: P is accepted by DFA D with n states.
you choose string: w ∈ P = L(D) to get contradiction
Let w = ap where p ≥ n is prime
By pumping lemma, D chooses x , y , z ∈ {a,b}∗ s.t.
1. w = ap = xyz2. |xy | ≤ n3. |y | > 0, and4. ∀k ∈ N ( xykz ∈ P )
y = ai , 0 < i ≤ n
Thus xyp+1z = xyzyp = apap·i = ap(i+1) ∈ P.
but p(i + 1) is not prime, so xyp+1z 6∈ P.
FTherefore P is not regular. �
![Page 74: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/74.jpg)
Prop: P ={
w ∈ {a,b}?∣∣ |w | is prime
}is not DFA acceptable.
proof: Assume: P is accepted by DFA D with n states.
you choose string: w ∈ P = L(D) to get contradiction
Let w = ap where p ≥ n is prime
By pumping lemma, D chooses x , y , z ∈ {a,b}∗ s.t.
1. w = ap = xyz2. |xy | ≤ n3. |y | > 0, and4. ∀k ∈ N ( xykz ∈ P )
y = ai , 0 < i ≤ n
Thus xyp+1z = xyzyp = apap·i = ap(i+1) ∈ P.
but p(i + 1) is not prime, so xyp+1z 6∈ P.
FTherefore P is not regular. �
![Page 75: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/75.jpg)
Prop: P ={
w ∈ {a,b}?∣∣ |w | is prime
}is not DFA acceptable.
proof: Assume: P is accepted by DFA D with n states.
you choose string: w ∈ P = L(D) to get contradiction
Let w = ap where p ≥ n is prime
By pumping lemma, D chooses x , y , z ∈ {a,b}∗ s.t.
1. w = ap = xyz2. |xy | ≤ n3. |y | > 0, and4. ∀k ∈ N ( xykz ∈ P )
y = ai , 0 < i ≤ n
Thus xyp+1z = xyzyp = apap·i = ap(i+1) ∈ P.
but p(i + 1) is not prime, so xyp+1z 6∈ P.
FTherefore P is not regular. �
![Page 76: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/76.jpg)
Prop: P ={
w ∈ {a,b}?∣∣ |w | is prime
}is not DFA acceptable.
proof: Assume: P is accepted by DFA D with n states.
you choose string: w ∈ P = L(D) to get contradiction
Let w = ap where p ≥ n is prime
By pumping lemma, D chooses x , y , z ∈ {a,b}∗ s.t.
1. w = ap = xyz2. |xy | ≤ n3. |y | > 0, and4. ∀k ∈ N ( xykz ∈ P )
y = ai , 0 < i ≤ n
Thus xyp+1z = xyzyp = apap·i = ap(i+1) ∈ P.
but p(i + 1) is not prime, so xyp+1z 6∈ P.
FTherefore P is not regular. �
![Page 77: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/77.jpg)
Prop: P ={
w ∈ {a,b}?∣∣ |w | is prime
}is not DFA acceptable.
proof: Assume: P is accepted by DFA D with n states.
you choose string: w ∈ P = L(D) to get contradiction
Let w = ap where p ≥ n is prime
By pumping lemma, D chooses x , y , z ∈ {a,b}∗ s.t.
1. w = ap = xyz2. |xy | ≤ n3. |y | > 0, and4. ∀k ∈ N ( xykz ∈ P )
y = ai , 0 < i ≤ n
Thus xyp+1z = xyzyp = apap·i = ap(i+1) ∈ P.
but p(i + 1) is not prime, so xyp+1z 6∈ P.
FTherefore P is not regular. �
![Page 78: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/78.jpg)
Prop: P ={
w ∈ {a,b}?∣∣ |w | is prime
}is not DFA acceptable.
proof: Assume: P is accepted by DFA D with n states.
you choose string: w ∈ P = L(D) to get contradiction
Let w = ap where p ≥ n is prime
By pumping lemma, D chooses x , y , z ∈ {a,b}∗ s.t.
1. w = ap = xyz2. |xy | ≤ n3. |y | > 0, and4. ∀k ∈ N ( xykz ∈ P )
y = ai , 0 < i ≤ n
Thus xyp+1z = xyzyp = apap·i = ap(i+1) ∈ P.
but p(i + 1) is not prime, so xyp+1z 6∈ P.
F
Therefore P is not regular. �
![Page 79: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/79.jpg)
Prop: P ={
w ∈ {a,b}?∣∣ |w | is prime
}is not DFA acceptable.
proof: Assume: P is accepted by DFA D with n states.
you choose string: w ∈ P = L(D) to get contradiction
Let w = ap where p ≥ n is prime
By pumping lemma, D chooses x , y , z ∈ {a,b}∗ s.t.
1. w = ap = xyz2. |xy | ≤ n3. |y | > 0, and4. ∀k ∈ N ( xykz ∈ P )
y = ai , 0 < i ≤ n
Thus xyp+1z = xyzyp = apap·i = ap(i+1) ∈ P.
but p(i + 1) is not prime, so xyp+1z 6∈ P.
FTherefore P is not regular. �
![Page 80: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/80.jpg)
Pumping Lemma for Regular SetsLet D = (Q,Σ, δ,q0,F ) be a DFA.
Let n = |Q|.
You (G) choose w ∈ L(D) s.t. |w | ≥ n.
Then D chooses x , y , z ∈ Σ? s.t. the following all hold:1. xyz = w
2. |xy | ≤ n
3. |y | > 0, and
4. ∀k ≥ 0 (xykz ∈ L(D))
Finally, you point out why a contradiction ensues.
![Page 81: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/81.jpg)
Pumping Lemma for Regular SetsLet D = (Q,Σ, δ,q0,F ) be a DFA.
Let n = |Q|.
You (G) choose w ∈ L(D) s.t. |w | ≥ n.
Then D chooses x , y , z ∈ Σ? s.t. the following all hold:1. xyz = w
2. |xy | ≤ n
3. |y | > 0, and
4. ∀k ≥ 0 (xykz ∈ L(D))
Finally, you point out why a contradiction ensues.
![Page 82: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/82.jpg)
Preview: Nondeterministic Finite Automata (NFA)
{w ∈ {0,1}∗
∣∣ w has 001 or 100}
= L((0|1)∗(001|100)(0|1)∗)
Build an NFA N5 that accepts L((0|1)∗(001|100)(0|1)∗)
ε
0,1
N5
0
0
1
1
100
000
qf
0
1 0,1
![Page 83: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/83.jpg)
Preview: Nondeterministic Finite Automata (NFA)
{w ∈ {0,1}∗
∣∣ w has 001 or 100}
= L((0|1)∗(001|100)(0|1)∗)
Build an NFA N5 that accepts L((0|1)∗(001|100)(0|1)∗)
ε
0,1
N5
0
0
1
1
100
000
qf
0
1 0,1
![Page 84: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/84.jpg)
Preview: Nondeterministic Finite Automata (NFA)
{w ∈ {0,1}∗
∣∣ w has 001 or 100}
= L((0|1)∗(001|100)(0|1)∗)
Build an NFA N5 that accepts L((0|1)∗(001|100)(0|1)∗)
ε
0,1
N5
0
0
1
1
100
000
qf
0
1 0,1
![Page 85: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/85.jpg)
Preview: Nondeterministic Finite Automata (NFA)
{w ∈ {0,1}∗
∣∣ w has 001 or 100}
= L((0|1)∗(001|100)(0|1)∗)
Build an NFA N5 that accepts L((0|1)∗(001|100)(0|1)∗)
ε
0,1
N5
0
0
1
1
100
000
qf
0
1 0,1
![Page 86: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/86.jpg)
Preview: Nondeterministic Finite Automata (NFA)
{w ∈ {0,1}∗
∣∣ w has 001 or 100}
= L((0|1)∗(001|100)(0|1)∗)
Build an NFA N5 that accepts L((0|1)∗(001|100)(0|1)∗)
ε
0,1
N5
0
0
1
1
100
000
qf
0
1 0,1
![Page 87: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/87.jpg)
Preview: Nondeterministic Finite Automata (NFA)
{w ∈ {0,1}∗
∣∣ w has 001 or 100}
= L((0|1)∗(001|100)(0|1)∗)
Build an NFA N5 that accepts L((0|1)∗(001|100)(0|1)∗)
ε
0,1
N5
0
0
1
1
100
000
qf
0
1 0,1
![Page 88: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/88.jpg)
Preview: Nondeterministic Finite Automata (NFA)
{w ∈ {0,1}∗
∣∣ w has 001 or 100}
= L((0|1)∗(001|100)(0|1)∗)
Build an NFA N5 that accepts L((0|1)∗(001|100)(0|1)∗)
ε
0,1
N5
0
0
1
1
100
000
qf
0
1 0,1
![Page 89: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/89.jpg)
Goal for Friday
Kleene’s Theorem Let A ⊆ Σ? be any language. Then thefollowing are equivalent:
1. A = L(D), for some DFA D.
2. A = L(N), for some NFA N wo ε transitions.
3. A = L(N), for some NFA N.
4. A = L(e), for some regular expression e.
5. A is regular.
True by definition: (4)⇔ (5)
![Page 90: CS250: Discrete Math for Computer SciencePumping Lemma for Regular Sets: Let D = (Q; ; ;q0;F) be a DFA, n = jQj w 2L(D) s.t. jwj n Then 9x;y;z 2? s.t. 1. xyz = w 2. jxyj n 3. jyj>0,](https://reader034.fdocuments.in/reader034/viewer/2022051901/5ff0028c75dc5033df711b1f/html5/thumbnails/90.jpg)
Goal for Friday
Kleene’s Theorem Let A ⊆ Σ? be any language. Then thefollowing are equivalent:
1. A = L(D), for some DFA D.
2. A = L(N), for some NFA N wo ε transitions.
3. A = L(N), for some NFA N.
4. A = L(e), for some regular expression e.
5. A is regular.
True by definition: (4)⇔ (5)