0% found this document useful (0 votes)
64 views3 pages

Myhill Nerode

Notes on myhill-nerode theorem

Uploaded by

arnavagrawal64
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
64 views3 pages

Myhill Nerode

Notes on myhill-nerode theorem

Uploaded by

arnavagrawal64
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Myhill-Nerode Theorem

Arnav Agrawal (2K22/CO/89)


September 8, 2024

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

• There exists a regular grammar that generates all the strings in L.


”DFA minimization” refers to the process of reducing the number of states in a DFA while preserving
the language it recognizes. The goal is to produce the smallest DFA (in terms of states) that accepts
the same language as the original DFA.

2 Checking for Regular Languages


2.1 Definition
Let L be any language over Σ*. Consider two strings x, y ( x, y ϵ Σ* ) are said to be in same class if
all possible strings (every string) z (z ϵ Σ*), either xz or yz are in L or both are not.
1. a language L divides the set of all possible strings into mutually exclusive classes

2. if L is regular then the number of classes created by L is finite.


3. if number of classes L creates is finite then L is regular.

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.”

3.2 Steps to minimize given DFA


1. Draw a table for all pairs of states (P,Q).

2. Mark all pairs where P ϵ F and Q ∈


/ F ( F being a Final State)
3. If there are any unmarked pairs (P,Q) such that [ δ(P,x), δ(Q,x)] is marked, the mark (P,Q) ,
where ’x’ is an input symbol.
4. Repeat step 3 until no more markings can be made

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.

Final 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

You might also like