- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Explain the equivalence between two Finite State Machines.
The two finite automata (FA) are said to be equivalent if both the automata accept the same set of strings over an input set Σ.
When two FA’s are equivalent then, there is some string x over Σ. On acceptance of that string, if one FA reaches to the final state, the other FA also reaches to the final state.
Method
The method for comparing two FA’s is explained below −
Let M and M1 be the two FA’s and Σ be a set of input strings.
Step 1 − Construct a transition table that has pairwise entries (q, q1) where q ∈ M and q1 ∈ M1 for each input symbol.
Step 2 − If we get in a pair as one final state and other non-final state then we terminate the construction of transition table declaring that two FA’s are not equivalent
Step 3 − The construction of the transition table gets terminated when there is no new pair appearing in the transition table.
Example
Consider the two Deterministic Finite Automata (DFA) and check whether they are equivalent or not.
Explanation
- Step 1 − First, construct the transition table for each input c and d.
- Step 2 − From the first machine M on receiving input c in state q1, we reach state q1 only which is the final state.
- Step 3 − From the second machine M1 for state q4 on receiving input c, we reach state q4 which is the final state.
- Step 4 − Thus for state (q1, q4) for input c, we get the next states as (q1, q4). Both are final states.
- Step 5 − Similarly, for input d in state (q1, q4), we get the next state as (q2, q5). Both are intermediate states. So, the first state in both machines is equal.
- Step 6 − Similarly, we perform the remaining states in two machines.
- Step 7 − In a pair of states, if both are final or if both are non-final, then we can say that two DFA’s are equivalent and let’s check for remaining.
The transition table is as follows −
States | c | d |
---|---|---|
{q1,q4} | {q1, q4} FS FS | {q2, q5} IS IS |
{q2,q5} | {q3, q6} IS IS | {q1, q4} FS FS |
{q3, q6} | {q2, q7} IS IS | {q3, q6} IS IS |
{q2, q7} | {q3, q6} IS IS | {q1, q4} FS FS |
Here, FS is the Final State and IS is the Intermediate State.
Therefore, by seeing the above table it is clear that we don’t get one final and one intermediate in any pair. Hence, we can declare that two DFA’s are equivalent.
- Related Articles
- Explain the problems for equivalence of two regular expressions.
- Explain the method for constructing Minimum Finite State Automata.
- Explain the relationship between Finite Automata and Regular Expression.
- Construct Finite State Machine as Processing input
- Explain the construction of finite and infinite language?
- Explain Deterministic Finite Automata in TOC.
- What is a finite state machine in TOC?
- Explain Non-Deterministic Finite Automata in TOC.
- C++ Program to Perform Finite State Automaton based Search
- What is the difference between complex and simple machines?
- Find the regular expression for the given Finite automata with state elimination method
- What is the difference between finite and infinite?
- Comparison between AC and DC Welding Machines
- Difference Between Free Weights and Weight Machines
- Transfer Files Between Linux Machines Over SSH
