
- Automata Theory - Applications
- Automata Terminology
- Basics of String in Automata
- Set Theory for Automata
- Finite Sets and Infinite Sets
- Algebraic Operations on Sets
- Relations Sets in Automata Theory
- Graph and Tree in Automata Theory
- Transition Table in Automata
- What is Queue Automata?
- Compound Finite Automata
- Complementation Process in DFA
- Closure Properties in Automata
- Concatenation Process in DFA
- Language and Grammars
- Language and Grammar
- Grammars in Theory of Computation
- Language Generated by a Grammar
- Chomsky Classification of Grammars
- Context-Sensitive Languages
- Finite Automata
- What is Finite Automata?
- Finite Automata Types
- Applications of Finite Automata
- Limitations of Finite Automata
- Two-way Deterministic Finite Automata
- Deterministic Finite Automaton (DFA)
- Non-deterministic Finite Automaton (NFA)
- NDFA to DFA Conversion
- Equivalence of NFA and DFA
- Dead State in Finite Automata
- Minimization of DFA
- Automata Moore Machine
- Automata Mealy Machine
- Moore vs Mealy Machines
- Moore to Mealy Machine
- Mealy to Moore Machine
- Myhill–Nerode Theorem
- Mealy Machine for 1’s Complement
- Finite Automata Exercises
- Complement of DFA
- Regular Expressions
- Regular Expression in Automata
- Regular Expression Identities
- Applications of Regular Expression
- Regular Expressions vs Regular Grammar
- Kleene Closure in Automata
- Arden’s Theorem in Automata
- Convert Regular Expression to Finite Automata
- Conversion of Regular Expression to DFA
- Equivalence of Two Finite Automata
- Equivalence of Two Regular Expressions
- Convert Regular Expression to Regular Grammar
- Convert Regular Grammar to Finite Automata
- Pumping Lemma in Theory of Computation
- Pumping Lemma for Regular Grammar
- Pumping Lemma for Regular Expression
- Pumping Lemma for Regular Languages
- Applications of Pumping Lemma
- Closure Properties of Regular Set
- Closure Properties of Regular Language
- Decision Problems for Regular Languages
- Decision Problems for Automata and Grammars
- Conversion of Epsilon-NFA to DFA
- Regular Sets in Theory of Computation
- Context-Free Grammars
- Context-Free Grammars (CFG)
- Derivation Tree
- Parse Tree
- Ambiguity in Context-Free Grammar
- CFG vs Regular Grammar
- Applications of Context-Free Grammar
- Left Recursion and Left Factoring
- Closure Properties of Context Free Languages
- Simplifying Context Free Grammars
- Removal of Useless Symbols in CFG
- Removal Unit Production in CFG
- Removal of Null Productions in CFG
- Linear Grammar
- Chomsky Normal Form (CNF)
- Greibach Normal Form (GNF)
- Pumping Lemma for Context-Free Grammars
- Decision Problems of CFG
- Pushdown Automata
- Pushdown Automata (PDA)
- Pushdown Automata Acceptance
- Deterministic Pushdown Automata
- Non-deterministic Pushdown Automata
- Construction of PDA from CFG
- CFG Equivalent to PDA Conversion
- Pushdown Automata Graphical Notation
- Pushdown Automata and Parsing
- Two-stack Pushdown Automata
- Turing Machines
- Basics of Turing Machine (TM)
- Representation of Turing Machine
- Examples of Turing Machine
- Turing Machine Accepted Languages
- Variations of Turing Machine
- Multi-tape Turing Machine
- Multi-head Turing Machine
- Multitrack Turing Machine
- Non-Deterministic Turing Machine
- Semi-Infinite Tape Turing Machine
- K-dimensional Turing Machine
- Enumerator Turing Machine
- Universal Turing Machine
- Restricted Turing Machine
- Convert Regular Expression to Turing Machine
- Two-stack PDA and Turing Machine
- Turing Machine as Integer Function
- Post–Turing Machine
- Turing Machine for Addition
- Turing Machine for Copying Data
- Turing Machine as Comparator
- Turing Machine for Multiplication
- Turing Machine for Subtraction
- Modifications to Standard Turing Machine
- Linear-Bounded Automata (LBA)
- Church's Thesis for Turing Machine
- Recursively Enumerable Language
- Computability & Undecidability
- Turing Language Decidability
- Undecidable Languages
- Turing Machine and Grammar
- Kuroda Normal Form
- Converting Grammar to Kuroda Normal Form
- Decidability
- Undecidability
- Reducibility
- Halting Problem
- Turing Machine Halting Problem
- Rice's Theorem in Theory of Computation
- Post’s Correspondence Problem (PCP)
- Types of Functions
- Recursive Functions
- Injective Functions
- Surjective Function
- Bijective Function
- Partial Recursive Function
- Total Recursive Function
- Primitive Recursive Function
- μ Recursive Function
- Ackermann’s Function
- Russell’s Paradox
- Gödel Numbering
- Recursive Enumerations
- Kleene's Theorem
- Kleene's Recursion Theorem
- Advanced Concepts
- Matrix Grammars
- Probabilistic Finite Automata
- Cellular Automata
- Reduction of CFG
- Reduction Theorem
- Regular expression to ∈-NFA
- Quotient Operation
- Parikh’s Theorem
- Ladner’s Theorem
Equivalence of NFA and DFA
Finite Automata are basic model in automata theory that are simple because of their finiteness. The finite automata may have in two forms the deterministic and non-deterministic.
Finite Automata are used to recognize patterns and define languages. A critical concept within this domain is the equivalence of two finite automata. It is proven that two types of finite automata perform the same function by accepting the same language.
In this chapter, we will prove their equivalence through an example and show the steps needed to check the equivalency of two automata by an illustrative example.
The Concept of Equivalence
Equivalence between two finite automata means that both automata accept the same language. In other words, for any given input string, both automata either accept or reject it consistently. But there are some conditions when we are going to check equivalence of two automata.
- State Pair Comparison − For any pair of states, say (qi, qj) from two different automata, the transitions for an input A belonging to the input alphabet Σ must lead to states qA and qB, respectively. If one state in the pair is a final state and the other is not, the automata are not equivalent.
- Initial and Final State Consistency − If the initial state of one automaton is also a final state, the initial state of the second automaton must also be a final state for them to be equivalent.
Steps to Determine Equivalence
Let us see the steps involved to check whether two finite automata are equivalent or not.
- Identify State Pairs − Start by pairing the initial states of both automata.
- Transition Analysis − For each pair, analyze and check the transitions for all inputs in the alphabet Σ.
- State Comparison − Compare the resultant states from the transitions. Then ensure both resultant states are either final or non-final (intermediate).
- Repeat for All Pairs − Continue the process for all possible pairs of states.
Checking Equivalence of Finite Automata
Consider two finite automata, A and B, with states and transitions as illustrated below. The inputs for both automata are c and d, respectively.ely.
Consider the first finite automata (A) −

Consider the second finite automata (B) −

Now let us analyse the equivalence in steps −
- The initial pair is (q1, q4 )
- For input c, q1 → q1 and q4 → q4, both are final states
- For input d, q1 → q2 and q4 → q5, both are intermediate states
- Next pair is (q2, q5 )
- For input c, q2 → q3 and q5 → q6, both are intermediate states
- For input d, q2 → q1 and q5 → q4, both are final states
- Next pair is (q3, q6 )
- For input c, q3 → q2 and q6 → q7, both are intermediate states
- For input d, q3 → q3 and q6 → q6, both are intermediate states
- Next pair is (q2, q7 )
- For input c, q2 → q3 and q7 → q6, both are intermediate states
- For input d, q2 → q1 and q7 → q4, both are final states
From the above equivalence, we have compared between two machines A and B. Upon comparing all relevant pairs and their transitions, we find that for each pair, both resultant states are consistently either final or intermediate.
Therefore, based on the given conditions and steps, automata A and B are equivalent, as they meet all criteria for equivalence.
Examples: How to Convert NFA to DFA?
Example 1
Convert the following Non-Deterministic Finite Automata (NFA) to Deterministic Finite Automata (DFA).
Solution
The transition diagram is as follows −

The transition table of NFA is as follows −
State | a | b |
---|---|---|
→q0 | q0 | q0,q1 |
q1 | - | *q2 |
*q2 | - | - |
The DFA table cannot have multiple states. So, make q0q1 as a single state.
Let's convert the given NFA to DFA by considering two states as a single state.
The transition table of DFA is as follows −
State | a | b |
---|---|---|
→ q0 | q0 | [q0,q1] |
[q0q1] | [q0] | [q0q1q2] |
*[q0q1q2] | [q0] | [q0q1q2] |
In the above transition table, q2 is the final state. Wherever, q2 is present that becomes the final state.

Example 2
Consider a Non-deterministic finite automata (NFA) and convert that NFA into equivalent Deterministic Finite Automata (DFA).

Solution
Let's construct NFA transition table for the given diagram −
States\inputs | a | b |
---|---|---|
→q0 | {q0,q1} | q0 |
q1 | q2 | q1 |
q2 | q3 | q3 |
q3 | - | q2 |
DFA cannot have multiple states. So, consider {q0,q1} as a single state while constructing DFA.
Let's convert the above table into equivalent DFA
States\inputs | a | b |
---|---|---|
→ q1 | [q0,q1] | q0 |
[q0,q1] | [q0q1q2] | [q0q1] |
*[q0q1q2] | [q0q1q2q3] | [q0q1q3] |
*[q0q1q2q3] | [q0q1q2q3] | [q0q1q2q3] |
*[q0q1q3] | [q0q1q2] | [q0q1q2] |
In DFA the final states are q2 and q3, wherever q2 and q3 are present that state becomes a final state.
Now the transition diagram for DFA is as follows −

- After conversion the number of states in the final DFA may or may not be the same as in NFA.
- The maximum number of states present in DFA may be 2pow (number of states in NFA)
-
The relationship between number of states in NFA and DFA is: 1 <= n <= 2m
Where n = number of states in DFA
m = number of states in NFA
- The final DFA all states that contain the final states of NFA are treated as final states.
Conclusion
The equivalence of finite automata is checked through a systematic comparison of their states pair and their transitions. The resultant states for all input pairs are consistently final or intermediate for the checked pairs, if so it will be the case of equivalence. This process is crucial for validating that different automata can recognize the same language.
In this chapter, we explained the steps to check the equivalence between two machines in detail.