Toa Handout 11
Toa Handout 11
Toa Handout 11
b b
1- 2+ 3
a a b
b a
a,b
a
4 5 6+
b
W = bbbababa, bbbabbababa
Pumping Lemma
• Application
• Let L = {anbn for n=0,1,2,3, ….}
• Breakdown into three components xyz
• Y as sequence of a’s (xyyz)
• Y as all b’s (xyyz)
• Y as combination of a’s and b’s (xyyz)
• Is L Regular?
Pumping Lemma (Version 2)
• If L is an infinite language accepted by
an FA with N states. Then for all words
w in L that have more than N letters,
there are string x, y and z where y is not
null and length(x)+length(y) does not
exceed N such that w = xyz and all
string of the form xynz are in L
• Application on PRIME
Myhill-Nerode Theorem
• The pumping Lemma established the
nonregularity of a language through
contradictions.
• Myhill-Nerode Theorem proves a language
to be regular or not by constructive
algorithm
• Societies of states for certain classes of
strings
Myhill-Nerode Theorem
• “Given a language L, any two strings x and
y are in the same class if for all possible
strings z whether both xz and yz are in L or
both are not
– The language L divides the set of all possible
strings into separate (mutually exclusive)
classes
– If L is regular, the number of classes L creates is
finite
– If the number of classes L creates is finite, then
L is regular
Myhill-Nerode Theorem
• Proof of Part 1
– Is S is in a class with X and S is also in a
class with Y, then X and Y must be in the
same class
• Proof of Part 2 b
1
a
a
a,b
+
-
b b a
2
Myhill-Nerode Theorem
• Proof of Part 3
• Given the finite classes of L create an FA
• If a class contains a word of L then all the strings
in the class are words in L
• Example: Language of all words that end in a
• C1 = all strings that end in a, the final state
• C2 = all strings that do not end in a, the start state
a
b a
C2- C1+
b