Myhill nerode theorem
The Myhill Nerode theorem is a fundamental result coming down to the theory of languages. This theory was proven by John Myhill and Anil Nerode in 1958. It is used to prove whether or not a language L is regular and it is also used for minimization of states in DFA( Deterministic Finite Automata).
To understand this theorem, first we need to understand what Indistinguishability is :
Given a language L and x,y are string over β*, if for every string z β β*, xz, yz β L or xz, yz β L then x and y are said to be indistinguishable over language L. Formally, we denote that x and y are indistinguishable over L by the following notation : x β‘L y.
β‘L is an equivalence relation as it is :
1) Reflexive : For all string x, xz β L iff xz β L therefore x β‘L x.
2) Symmetric : Suppose x β‘L y. This means either xz, yz β L or xz, yz β L for all z β β*. Equivalently this means yz,xz β L or yz, xz β L for all z β β* which implies y β‘L x
3) Transitive : Suppose x β‘L y and y β‘L w. Then suppose for the sake of contradiction that x and w are not indistinguishable. This means there must exist some z such that exactly one of xz and wz is a member of L. Assume xz is a member of L and wz is not a member of L. xz β L implies yz β L. wz β L implies that yz β L. This is a contradiction since yz cannot both a member and not be a member of L. Therefore x β‘L y and y β‘L w β x β‘L w.
Since β‘L is an equivalence relation over β*, β‘L partitions β* into disjoint sets called equivalence classes.
A language is regular if and only if β‘L partitions β* into finitely many equivalence classes. If β‘L partitions β* into n equivalence classes, then a minimal DFA recognizing L has exactly n states.
- The Myhill-Nerode theorem is an important characterization of regular languages, and it also has many practical implications.
- One consequence of the theorem is an algorithm for minimizing DFAs which is a vital step in automata theory.
The MyhillNerode Theorem states that for a language L such that L C Ξ£*, the following statements hold good :-
- There is a DFA that accepts L(L is regular)
- There is a right invariant equivalence relation ~ of finite index such L is a union of some of the equivalence classes of ~.
- ~L is of finite index.
Example:

Step 1: Consider every final-nonfinal state pair and tick it working only on the lower triangular part of the table

Step 2: Consider all the un-ticked areas of step1
For an input(either a or b) for each un-ticked state, see the intermediate state For the area (r,t):
(r,a) => {r} and (t,a) =>s
So, here the intermediate state is βsβ
Now check if {r,s} is ticked in step1.
If yes, tick {r,t} as well.
Similarly, {q,u} and {r,q} are also ticked
Step3: Continue step2 until all states have been processed. Once no more can be ticked, algorithm terminates.
Hence, here {s,u} is also ticked.
Final table now becomes

Step 4: Check the spaces which are still un-ticked and such states can be merged together.
In the final minimized DFA, q-s are the new states and p-t are the new states
To prove that L = {anbn | n β₯ 0} is not regular.
We can show that L has infinitely many equivalence classes by showing that ak and ai are distinguishable by L whenever k β i. Thus, for x = ak and y = ai we let z = bk. Then xz = akbk is in the language but yz = aibk is not. Thus, each equivalence class of L can contain at most one string of the form ai so there must be infinitely many equivalence classes. That means L is not regular by the Myhill Nerode theorem.
Note : To prove whether or not a language L is regular is also done using Pumping Lemma, the distinction between this and Myhill Nerode theorem is that, there are some non-regular language satisfying the Pumping Lemma but no such non regular language is there which satisfies Myhill Nerode theorem.
Labels: Automata, TAFL Unit-1
Discussion & Queries (<$I18NNumComments$>):
<$CommentPager$>
- <$I18NAtCommentTimeWithPermalink$>, <$I18NCommentAuthorSaid$>
<$CommentPager$>
<$BlogCommentBody$>
<$BlogCommentDeleteIcon$>