Myhill Nerode
Myhill Nerode
1 Introduction
The Myhill Nerode Theorem was given by John Myhill and Anil Nerode in 1958 and is a fundamental
aspect of Theory of Computation. It is used to prove whether a language is regular or not. Another
use of this theorem is for the minimization of a Deterministic Finite Automata (DFA).
Firstly, a language is considered a regular language if
• There exists a finite automaton (DFA or NFA) that recognizes L and accepts all strings in L, or
• There exists a regular expression that describes L, or
2.2 Example
Consider L = {string ending with 0} where Σ={0,1}.
Now the language will divide the given Σ into two parts which are ”strings ending with 0” and ”strings
ending with 1”. Now we consider any two strings x and y then concatenate the strings with z and
check if :
{xz & yz ϵ L} or xz & yz ∈ / L}
From strings ending in 0 {0,10,110,1010,...}
Let x={010} and y={100}
From strings ending in 1 {1,101,11,01,001,...}
Let z={101}
Now we concatenate the strings to get xz={010101} and yz={100101} and as we can see both xz &
yz ∈
/ L.
Thus we can conclude that the language is regular.
1
Figure 1: This is the DFA for the language ’String ending with 0’
3 Minimization of DFA
3.1 Definition
To obtain the minimal and equivalent version of any DFA, which consists of the fewest possible states,
DFA minimization is required. A DFA can be converted to its equivalent DFA with the least number
of states by using the Myhill-Nerode theorem. This minimization technique is also known as the ”table
filling method.”
5. Combine all the unmarked pairs and make them a single state in the minimized DFA.
3.3 Example
Consider the following DFA
Following the steps stated above first we will create a table. Then we mark the state pairs (P,Q) where
P is a final state and Q is a non-final state.
2
Now we follow step no. 3 and 4 in which we check whether from the unmarked pairs above, if we
transition as [ δ(P,x), δ(Q,x)] and the pair (P’,Q’) is marked then we mark (P,Q). Then we get
Then finally after completing the table we can follow step 5 to create a minimized DFA.
4 References
• https://www.geeksforgeeks.org/minimization-of-dfa-using-myhill-nerode-theorem/
• https://nesoacademy.org/cs/04-theory-of-computation
• Hopcroft and Ullman, Introduction to Automata Theory, Languages and Computation, Pearson
Education