Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping...
-
Upload
faith-dampier -
Category
Documents
-
view
221 -
download
0
Transcript of Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping...
![Page 1: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/1.jpg)
Pumping LemmaExamples
![Page 2: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/2.jpg)
L> = {aibj : i > j}
L> is not regular.
We prove it using the Pumping Lemma.
![Page 3: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/3.jpg)
L> = {aibj : i > j}
L> is not regular. • Fix an arbitrary pumping length n>0.
![Page 4: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/4.jpg)
L> = {aibj : i > j}
L> is not regular. • Fix an arbitrary pumping length n>0.• Choose a proper string s in L>.
![Page 5: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/5.jpg)
L> = {aibj : i > j}
L> is not regular. • Fix an arbitrary pumping length n>0.• Choose a proper string s in L>.
|s|≥ n
![Page 6: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/6.jpg)
L> = {aibj : i > j}
L> is not regular. • Fix an arbitrary pumping length n>0.• Choose a proper string s in L>.
• s = an+1bn ϵ L>.
aaa…aabb…bnn+1
![Page 7: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/7.jpg)
L> = {aibj : i > j}
L> is not regular. • Fix an arbitrary pumping length n>0.• Choose a proper string s in L>.
• s = an+1bn ϵ L>.• Consider all possible splittings of s in x,y,z with
the desired properties.
aaa…aabb…bnn+1
![Page 8: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/8.jpg)
L> = {aibj : i > j}
L> is not regular. • Fix an arbitrary pumping length n>0.• Choose a proper string s in L>.
• s = an+1bn ϵ L>.• Consider all possible splittings of s in x,y,z with
the desired properties.
|xy|≤ n|y|≥ 1
aaa…aabb…bnn+1
![Page 9: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/9.jpg)
L> = {aibj : i > j}
L> is not regular. • Fix an arbitrary pumping length n>0.• Choose a proper string s in L>.
• s = an+1bn ϵ L>.• Consider all possible splittings of s in x,y,z with
the desired properties.
|xy|≤ n|y|≥ 1
aaa…aabb…bnn+1
![Page 10: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/10.jpg)
L> = {aibj : i > j}
L> is not regular. • Fix an arbitrary pumping length n>0.• Choose a proper string s in L>.
• s = an+1bn ϵ L>.• Consider all possible splittings of s in x,y,z with
the desired properties.
|xy|≤ n|y|≥ 1
aaa…aabb…bYnn+1
![Page 11: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/11.jpg)
L> is not regular. • Fix an arbitrary pumping length n>0.• Choose a proper string s in L>.
• s = an+1bn ϵ L>.• Consider all possible splittings of s in x,y,z with
the desired properties: y = am, 1 ≤ m ≤ n.
aaa…aabb…b
L> = {aibj : i > j}
Ynn+1
![Page 12: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/12.jpg)
aaabb…bnn+1-m
L> is not regular. • Fix an arbitrary pumping length n>0.• Choose a proper string s in L>.
• s = an+1bn ϵ L>.• Consider all possible splittings of s in x,y,z with
the desired properties: y = am, 1 ≤ m ≤ n.• xz =an+1-mbn ∉ L>.
L> = {aibj : i > j}
n
![Page 13: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/13.jpg)
L> = {aibj : i > j}
L> is not regular. • Fix an arbitrary pumping length n>0.• Choose a proper string s in L>.
• s = an+1bn ϵ L>.• Consider all possible splittings of s in x,y,z with
the desired properties: y = am, 1 ≤ m ≤ n.• xz =an+1-mbn ∉ L>.
• So L> is not regular!
![Page 14: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/14.jpg)
L={ww : w in {a,b}*}• First, figure out what this language is.
![Page 15: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/15.jpg)
L={ww : w in {a,b}*}• First, figure out what this language is.• A string in the language?
![Page 16: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/16.jpg)
• First, figure out what this language is.• A string in the language? aabaab
L={ww : w in {a,b}*}
![Page 17: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/17.jpg)
L={ww : w in {a,b}*}• First, figure out what this language is.• A string in the language? aabaab• Another string in the language?
![Page 18: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/18.jpg)
L={ww : w in {a,b}*}• First, figure out what this language is.• A string in the language? aabaab• Another string in the language? aaaaaa
![Page 19: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/19.jpg)
L={ww : w in {a,b}*}• First, figure out what this language is.• A string in the language? aabaab• Another string in the language? aaaaaa• A string not in the language?
![Page 20: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/20.jpg)
L={ww : w in {a,b}*}• First, figure out what this language is.• A string in the language? aabaab• Another string in the language? aaaaaa• A string not in the language? abbb
![Page 21: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/21.jpg)
L={ww : w in {a,b}*}• First, figure out what this language is.• A string in the language? aabaab• Another string in the language? aaaaaa• A string not in the language? abbb• Is ε in the language?
![Page 22: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/22.jpg)
L={ww : w in {a,b}*}• First, figure out what this language is.• A string in the language? aabaab• Another string in the language? aaaaaa• A string not in the language? abbb• Is ε in the language? YES! (ε = εε)
![Page 23: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/23.jpg)
L={ww : w in {a,b}*}• First, figure out what this language is.• A string in the language? aabaab• Another string in the language? aaaaaa• A string not in the language? abbb• Is ε in the language? YES! (ε = εε)• Is aa in the language?
![Page 24: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/24.jpg)
L={ww : w in {a,b}*}• First, figure out what this language is.• A string in the language? aabaab• Another string in the language? aaaaaa• A string not in the language? abbb• Is ε in the language? YES! (ε = εε)• Is aa in the language? YES!
![Page 25: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/25.jpg)
L={ww : w in {a,b}*}• First, figure out what this language is.• A string in the language? aabaab• Another string in the language? aaaaaa• A string not in the language? abbb• Is ε in the language? YES! (ε = εε)• Is aa in the language? YES! • Is a in the language?
![Page 26: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/26.jpg)
L={ww : w in {a,b}*}• First, figure out what this language is.• A string in the language? aabaab• Another string in the language? aaaaaa• A string not in the language? abbb• Is ε in the language? YES! (ε = εε)• Is aa in the language? YES! • Is a in the language? NO!
![Page 27: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/27.jpg)
L={ww : w in {a,b}*}• First, figure out what this language is.L = {ε, aa, bb, aaaa, abab, baba, bbbb, aaaaaa …}
abaabba|abaabba
![Page 28: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/28.jpg)
L={ww : w in {a,b}*}We prove that L is not regular by using the
pumping lemma.
![Page 29: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/29.jpg)
L={ww : w in {a,b}*}We prove that L is not regular by using the
pumping lemma.• First fix an arbitrary number n>0 to be the
pumping length.
![Page 30: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/30.jpg)
L={ww : w in {a,b}*}We prove that L is not regular by using the
pumping lemma.• Pumping length: n• Choose a proper string in the language
![Page 31: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/31.jpg)
L={ww : w in {a,b}*}We prove that L is not regular by using the
pumping lemma.• Pumping length: n• Choose a proper string in the language.
Choose wisely!!!
![Page 32: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/32.jpg)
L={ww : w in {a,b}*}We prove that L is not regular by using the
pumping lemma.• Pumping length: n• Choose a proper string in the language.
Example: For s = a2n
aaa…aaa|aaa…aaan n
![Page 33: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/33.jpg)
aaa…aaa|aaa…aaa
L={ww : w in {a,b}*}We prove that L is not regular by using the
pumping lemma.• Pumping length: n• Choose a proper string in the language.
Example: For s = a2n • For x = ε, y = a2, z = a2n-2
zy
n n
![Page 34: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/34.jpg)
L={ww : w in {a,b}*}We prove that L is not regular by using the
pumping lemma.• Pumping length: n• Choose a proper string in the language.
Example: For s = a2n • For x = ε, y = a2, z = a2n-2
aaaaa…aa|aaaa…aaazy
n+1 n+1
y ϵ L
![Page 35: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/35.jpg)
L={ww : w in {a,b}*}We prove that L is not regular by using the
pumping lemma.• Pumping length: n• Choose a proper string in the language.
Example: For s = a2n • For x = ε, y = a2, z = a2n-2
aaaaaaa…a|aaaaa…aaazy
n+2 n+2
y ϵ Ly
![Page 36: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/36.jpg)
L={ww : w in {a,b}*}We prove that L is not regular by using the
pumping lemma.• Pumping length: n• Choose a proper string in the language.
Example: For s = a2n • For x = ε, y = a2, z = a2n-2
a…aaaa|aa…aaaz
n-1 n-1
ϵ L
![Page 37: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/37.jpg)
L={ww : w in {a,b}*}We prove that L is not regular by using the
pumping lemma.• Pumping length: n• Choose a proper string in the language.
Example: For s = a2n • For x = ε, y = a2, z = a2n-2, there is no i: xyiz ∉ L!
![Page 38: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/38.jpg)
L={ww : w in {a,b}*}We prove that L is not regular by using the
pumping lemma.• Pumping length: n• Choose a proper string in the language.
Example: For s = a2n • For x = ε, y = a2, z = a2n-2, there is no i: xyiz ∉ L!• s = a2n doesn’t work!!!
![Page 39: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/39.jpg)
L={ww : w in {a,b}*}We prove that L is not regular by using the
pumping lemma.• Pumping length: n• Choose a proper string in the language.
Example: For s = (ab)2n
abab…abab|abab…ababn n
![Page 40: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/40.jpg)
L={ww : w in {a,b}*}We prove that L is not regular by using the
pumping lemma.• Pumping length: n• Choose a proper string in the language.
Example: For s = (ab)2n • For x = ε, y = abab, z = (ab)2n-2
abab…abab|abab…ababn n
zy
![Page 41: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/41.jpg)
L={ww : w in {a,b}*}We prove that L is not regular by using the
pumping lemma.• Pumping length: n• Choose a proper string in the language.
Example: For s = (ab)2n • For x = ε, y = abab, z = (ab)2n-2
abababab…ab|ababab…ababn+1 n+1
y zy ϵ L
![Page 42: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/42.jpg)
L={ww : w in {a,b}*}We prove that L is not regular by using the
pumping lemma.• Pumping length: n• Choose a proper string in the language.
Example: For s = (ab)2n • For x = ε, y = abab, z = (ab)2n-2
• For any i, xyiz = (ab)2i(ab)2n-2 = (ab)2(i-n-2) ϵ L!
![Page 43: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/43.jpg)
L={ww : w in {a,b}*}We prove that L is not regular by using the
pumping lemma.• Pumping length: n• Choose a proper string in the language.
Example: For s = (ab)2n • For x = ε, y = abab, z = (ab)2n-2
• For any i, xyiz = (ab)2i(ab)2n-2 = (ab)2(i-n-2) ϵ L!• s = (ab)2n doesn’t work!
![Page 44: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/44.jpg)
L={ww : w in {a,b}*}We prove that L is not regular by using the
pumping lemma.• Pumping length: n• Choose a proper string in the language.• Use s = anbanb
aaaa…aab|aaaa...aabn n
![Page 45: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/45.jpg)
aaaa…aab|aaaa...aab
We prove that L is not regular by using the pumping lemma.
• Pumping length: n• Choose a proper string in the language. • Use s = anbanb• For any splitting of s in x,y,z with the desired
properties:
L={ww : w in {a,b}*}
Yn n
![Page 46: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/46.jpg)
L={ww : w in {a,b}*}We prove that L is not regular by using the
pumping lemma.• Pumping length: n• Choose a proper string in the language • Use s = anbanb• For any splitting of s in x,y,z with the desired
properties: y = am with 1 ≤ m ≤ n.
![Page 47: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/47.jpg)
L={ww : w in {a,b}*}We prove that L is not regular by using the
pumping lemma.• Pumping length: n• Choose a proper string in the language • Use s = anbanb• For any splitting of s in x,y,z with the desired
properties: y = am with 1 ≤ m ≤ n.• Observe that xy2z = am+nbanb is not in L
QED
![Page 48: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/48.jpg)
L’ = {w1w2 : w1,w2 ϵ {a,b}*,|w1|=|w2|}
Is it regular?
![Page 49: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/49.jpg)
L’ = {w1w2 : w1,w2 ϵ {a,b}*,|w1|=|w2|}
Is it regular?• A first attempt to design a FA
q10 q11 q12 q13
q2n
a,b
q2n-1 q2n-2 q2n-3
q1n
q20
a,b
a,b
a,b a,b
a,b a,b a,b
ε
...
...
![Page 50: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/50.jpg)
L’ = {w1w2 : w1,w2 ϵ {a,b}*,|w1|=|w2|}
Is it regular?• A first attempt to design a FA fails!
q10 q11 q12 q13
q2n
a,b
q2n-1 q2n-2 q2n-3
q1n
q20
a,b
a,b
a,b a,b
a,b a,b a,b
ε
...
...
Works for string sizes up to n!
![Page 51: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/51.jpg)
L’ = {w1w2 : w1,w2 ϵ {a,b}*,|w1|=|w2|}
Is it regular?• Looks similar with L (L = {w1w2 : w1 = w2}.
![Page 52: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/52.jpg)
L’ = {w1w2 : w1,w2 ϵ {a,b}*,|w1|=|w2|}
Is it regular?• Looks similar with L (L = {w1w2 : w1 = w2}.• But the pumping lemma holds!
![Page 53: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/53.jpg)
L’ = {w1w2 : w1,w2 ϵ {a,b}*,|w1|=|w2|}
Is it regular?• Looks similar with L (L = {w1w2 : w1 = w2}.• But the pumping lemma holds!– Fix pumping length k=2.
![Page 54: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/54.jpg)
Is it regular?• Looks similar with L (L = {w1w2 : w1 = w2}.• But the pumping lemma holds!– Fix pumping length k=2.– For every proper string s in L’,
L’ = {w1w2 : w1,w2 ϵ {a,b}*,|w1|=|w2|}
abbba…abb|bbaba…aaan n
2n≥2
![Page 55: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/55.jpg)
abbba…abb|bbaba…aaa
L’ = {w1w2 : w1,w2 ϵ {a,b}*,|w1|=|w2|}
Is it regular?• Looks similar with L (L = {w1w2 : w1 = w2}.• But the pumping lemma holds!– Fix pumping length k=2.– For every proper string s in L’,– split s in x, y, z with the desired properties.
zy
n n
|y|≥1 and |xy|≤ 2
![Page 56: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/56.jpg)
abbba…abb|bbaba…aaa
L’ = {w1w2 : w1,w2 ϵ {a,b}*,|w1|=|w2|}
Is it regular?• Looks similar with L (L = {w1w2 : w1 = w2}.• But the pumping lemma holds!– Fix pumping length k=2.– For every proper string s in L’,– split s in x = ε ,y = first two symbols of s, z = rest.
zy
n n
![Page 57: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/57.jpg)
ababbba…ab|bbbaba…aaa
L’ = {w1w2 : w1,w2 ϵ {a,b}*,|w1|=|w2|}
Is it regular?• Looks similar with L (L = {w1w2 : w1 = w2}.• But the pumping lemma holds!– Fix pumping length k=2.– For every proper string s in L’,– split s in x = ε ,y = first two symbols of s, z = rest.– xy2z in L’.
n+1
ϵ L’zyy
n+1
![Page 58: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/58.jpg)
abababbba…a|bbbbaba…aaa
L’ = {w1w2 : w1,w2 ϵ {a,b}*,|w1|=|w2|}
Is it regular?• Looks similar with L (L = {w1w2 : w1 = w2}.• But the pumping lemma holds!– Fix pumping length k=2.– For every proper string s in L’,– split s in x = ε ,y = first two symbols of s, z = rest.– xy3z in L’.
n+2
ϵ L’zyyy
n+2
![Page 59: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/59.jpg)
L’ = {w1w2 : w1,w2 ϵ {a,b}*,|w1|=|w2|}
Is it regular?• Looks similar with L (L = {w1w2 : w1 = w2}.• But the pumping lemma holds!– Fix pumping length n=2.– For every proper string s in L’,– split s in x = ε ,y = first two symbols of s, z = rest.– xy0z in L’.
bba…abbb|baba…aaaϵ L’z
n-1n-1
![Page 60: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/60.jpg)
L’ = {w1w2 : w1,w2 ϵ {a,b}*,|w1|=|w2|}
Is it regular?• Looks similar with L (L = {w1w2 : w1 = w2}.• But the pumping lemma holds!– Fix pumping length n=2.– For every proper string s in L’,– split s in x = ε ,y = first two symbols of s, z = rest.– For every i ≥ 0, xyiz in L’.
![Page 61: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/61.jpg)
L’ = {w1w2 : w1,w2 ϵ {a,b}*,|w1|=|w2|}
Is it regular? • Consider L’’ = {w : w has even length}.
![Page 62: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/62.jpg)
L’ = {w1w2 : w1,w2 ϵ {a,b}*,|w1|=|w2|}
Is it regular? • Consider L’’ = {w : w has even length}.
Every string of even length
abbbaabb….…bbabaaaa2n
![Page 63: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/63.jpg)
L’ = {w1w2 : w1,w2 ϵ {a,b}*,|w1|=|w2|}
Is it regular? • Consider L’’ = {w : w has even length}.
Every string of even length can be split into two parts of equal length
abbbaabb… …bbabaaaan
|n
![Page 64: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/64.jpg)
L’ = {w1w2 : w1,w2 ϵ {a,b}*,|w1|=|w2|}
Is it regular? • Consider L’’ = {w : w has even length}.
Every string of even length can be split into two parts of equal length and vice versa.
abbbaabb….…bbabaaaa2n
![Page 65: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/65.jpg)
L’ = {w1w2 : w1,w2 ϵ {a,b}*,|w1|=|w2|}
Is it regular?• Consider L’’ = {w : w has even length}.• L’ = L’’
Every string of even length can be split into two parts of equal length and vice versa.
![Page 66: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/66.jpg)
L’ = {w1w2 : w1,w2 ϵ {a,b}*,|w1|=|w2|}
Is it regular? • Consider L’’ = {w : w has even length}• L’ = L’’• A DFA for L’’:
odd
a,b
even
a,b
![Page 67: Pumping Lemma Examples. L > = {a i b j : i > j} L > is not regular. We prove it using the Pumping Lemma.](https://reader035.fdocuments.us/reader035/viewer/2022062307/551a917e55034643688b5d82/html5/thumbnails/67.jpg)
L’ = {w1w2 : w1,w2 ϵ {a,b}*,|w1|=|w2|}
Is it regular?• YES!!!• L’ = L’’• A DFA for L’:
odd
a,b
a,b
even