Pumping Lemma Examples L> = {aibj : i > j}

Published  . 0 views
↓ Download
Pumping Lemma Examples L> = {aibj : i > j}
1 / 1
Pumping Lemma Examples L> = {aibj : i > j} - slide 1 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 2 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 3 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 4 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 5 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 6 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 7 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 8 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 9 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 10 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 11 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 12 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 13 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 14 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 15 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 16 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 17 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 18 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 19 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 20 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 21 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 22 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 23 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 24 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 25 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 26 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 27 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 28 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 29 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 30 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 31 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 32 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 33 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 34 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 35 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 36 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 37 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 38 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 39 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 40 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 41 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 42 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 43 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 44 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 45 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 46 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 47 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 48 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 49 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 50 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 51 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 52 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 53 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 54 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 55 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 56 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 57 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 58 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 59 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 60 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 61 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 62 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 63 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 64 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 65 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 66 of 67 Pumping Lemma Examples L> = {aibj : i > j} - slide 67 of 67
Description: Pumping Lemma Examples L aibj : i j L is not regular. We prove it using the Pumping Lemma. L aibj : i j L is not regular. Fix an arbitrary pumping length n0. L aibj : i j L is not regular. Fix an arbitrary pumping

Related Topics

Download Presentation

"Pumping Lemma Examples L> = {aibj : i > j}" is the property of its rightful owner. Permission is granted to download and print the materials on this website for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.

Presentation Transcript

slide1. Pumping Lemma Examples<br>
slide2. L> = {aibj : i > j} L> is not regular.
We prove it using the Pumping Lemma.<br>
slide3. L> = {aibj : i > j} L> is not regular.
Fix an arbitrary pumping length n>0.<br>
slide4. L> = {aibj : i > j} L> is not regular.
Fix an arbitrary pumping length n>0.
Choose a proper string s in L>.<br>
slide5. L> = {aibj : i > j} L> is not regular.
Fix an arbitrary pumping length n>0.
Choose a proper string s in L>. |s|≥ n<br>
slide6. 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…b n n+1<br>
slide7. 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…b n n+1<br>
slide8. 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…b n n+1<br>
slide9. 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…b n n+1<br>
slide10. 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…b Y n n+1<br>
slide11. 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} Y n n+1<br>
slide12. aaabb…b n n+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<br>
slide13. 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!<br>
slide14. L={ww : w in {a,b}*} First, figure out what this language is.<br>
slide15. L={ww : w in {a,b}*} First, figure out what this language is.
A string in the language?<br>
slide16. First, figure out what this language is.
A string in the language? aabaab L={ww : w in {a,b}*}<br>
slide17. L={ww : w in {a,b}*} First, figure out what this language is.
A string in the language? aabaab
Another string in the language?<br>
slide18. 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<br>
slide19. 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?<br>
slide20. 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<br>
slide21. 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?<br>
slide22. 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! (ε = εε)<br>
slide23. 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?<br>
slide24. 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!<br>
slide25. 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?<br>
slide26. 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!<br>
slide27. L={ww : w in {a,b}*} First, figure out what this language is.
L = {ε, aa, bb, aaaa, abab, baba, bbbb, aaaaaa …} abaabba|abaabba<br>
slide28. L={ww : w in {a,b}*} We prove that L is not regular by using the pumping lemma.<br>
slide29. 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.<br>
slide30. 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<br>
slide31. 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!!!<br>
slide32. 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…aaa n n<br>
slide33. 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 z y n n<br>
slide34. 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…aaa z y n+1 n+1 y ϵ L<br>
slide35. 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…aaa z y n+2 n+2 y ϵ L y<br>
slide36. 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…aaa z n-1 n-1 ϵ L<br>
slide37. 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!<br>
slide38. 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!!!<br>
slide39. 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…abab n n<br>
slide40. 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…abab n n z y<br>
slide41. 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…abab n+1 n+1 y z y ϵ L<br>
slide42. 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!<br>
slide43. 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!<br>
slide44. 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...aab n n<br>
slide45. 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}*} y n n<br>
slide46. 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.<br>
slide47. 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<br>
slide48. L’ = {w1w2 : w1,w2 ϵ {a,b}*,|w1|=|w2|} Is it regular?<br>
slide49. 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 ε ... ...<br>
slide50. 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!<br>
slide51. L’ = {w1w2 : w1,w2 ϵ {a,b}*,|w1|=|w2|} Is it regular?
Looks similar with L (L = {w1w2 : w1 = w2}.<br>
slide52. L’ = {w1w2 : w1,w2 ϵ {a,b}*,|w1|=|w2|} Is it regular?
Looks similar with L (L = {w1w2 : w1 = w2}.
But the pumping lemma holds!<br>
slide53. 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.<br>
slide54. 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…aaa n n 2n≥2<br>
slide55. 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. z y n n |y|≥1 and |xy|≤ 2<br>
slide56. 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. z y n n<br>
slide57. 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’ z y y n+1<br>
slide58. 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’ z y y y n+2<br>
slide59. 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-1 n-1<br>
slide60. 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’.<br>
slide61. L’ = {w1w2 : w1,w2 ϵ {a,b}*,|w1|=|w2|} Is it regular?
Consider L’’ = {w : w has even length}.<br>
slide62. L’ = {w1w2 : w1,w2 ϵ {a,b}*,|w1|=|w2|} Is it regular?
Consider L’’ = {w : w has even length}.

Every string of even length abbbaabb….…bbabaaaa 2n<br>
slide63. 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… …bbabaaaa n | n<br>
slide64. 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….…bbabaaaa 2n<br>
slide65. 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.<br>
slide66. 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<br>
slide67. L’ = {w1w2 : w1,w2 ϵ {a,b}*,|w1|=|w2|} Is it regular?
YES!!!
L’ = L’’
A DFA for L’: odd a,b a,b even<br>