Professional Documents
Culture Documents
|s| n
aaaaabbb
n+1
n
aaaaabbb
n+1
n
aaaaabbb
n+1
n
aaaaabbb
n+1
n
aaaaabbb
n+1 n
aaaaabbb
n+1 n
aaabbb
n+1-m n
L={ww : w in
* {a,b}
L={ww : w in
* {a,b}
First, figure out what this language is. A string in the language?
L={ww : w in
* {a,b}
First, figure out what this language is. A string in the language? aabaab
L={ww : w in
* {a,b}
First, figure out what this language is. A string in the language? aabaab Another string in the language?
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
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?
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
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?
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! ( = )
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?
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!
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?
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!
L={ww : w in
* {a,b}
First, figure out what this language is. L = {, aa, bb, aaaa, abab, baba, bbbb, aaaaaa }
abaabba|abaabba
L={ww : w in
* {a,b}
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.
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
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!!!
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
aaaaaa|aaaaaa
n n
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 y z
aaaaaa|aaaaaa
n n
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 y y z
aaaaaaa|aaaaaaa L
n+1 n+1
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 y y y z
aaaaaaaa|aaaaaaaa L
n+2 n+2
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
aaaaa|aaaaa L
n-1 n-1
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!
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 doesnt work!!!
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
abababab|abababab
n n
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 y z
abababab|abababab
n n
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 y y z
ababababab|ababababab L
n+1 n+1
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!
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 doesnt work!
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
aaaaaab|aaaa...aab
n n
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:
aaaaaab|aaaa...aab
n n
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.
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
q10
q11
q12
q13
... ...
q1n
q2n
a,b
q2n-1
a,b
q2n-2
a,b
q2n-3
a,b
q20
q10
q11
q12
q13
... ...
q1n
q2n
a,b
q2n-1
a,b
q2n-2
a,b
q2n-3
a,b
q20
2n2
abbbaabb|bbabaaaa
n n
y n
abbbaabb|bbabaaaa
y n
z n
abbbaabb|bbabaaaa
y y
ababbbaab|bbbabaaaa L
n+1 n+1
y y y
abababbbaa|bbbbabaaaa L
n+2 n+2
bbaabbb|babaaaa L
n-1 n-1
abbbaabb.bbabaaaa
2n
Every string of even length can be split into two parts of equal length
abbbaabb|bbabaaaa
n n
Every string of even length can be split into two parts of equal length and vice versa.
abbbaabb.bbabaaaa
2n