Myhill Nerode Theorem
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).
Example of Myhill-Nerode
3. Mark the (P, Q) state if any unmarked state pairs exist δ(P,x),δ(Q,x) is marked. Continue until
no more markings are possible.
Firstly, we'll check the unmarked pairs. So the first pair is the BA. We'll do the δ of BA with 0 first and
then with 1.
δ(B,0)=A , δ (A,0)=B , So here the pair is AB. Now check whether this pair is marked or not. If it is not
marked, then we'll move further. Now check for
δ(B,1)=D , δ (A,1)=C. Now check whether the DC pair is marked or not. We'll forward the next pair if it
is not marked. We'll repeat this process with all the unmarked pairs, and if any pair after the transition is
marked, then we have to mark that pair on which the transition is being done.
In the above example, it is with the FA and FB pair because after transition, it is marked, so we have to
mark the FA and FB pair also.
4. Make a single state in the minimized DFA by combining all the unmarked pairings.
First, we'll take the unmarked pairs, which are (AB),(DC), (ED), and (EF). Now let's combine the
unmarked pairs.
Now here we'll make the AB pair as a single state, and the other three pairs are connected with each. So
instead of making three different states will make it as one state and add the remaining F in the DFA, this
will be how we'll minimize the DFA.
This is the minimized DFA having 3 states, whereas the Original DFA was having three states.