- 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
What is Minimization of DFA?
Problem
Given a Deterministic Finite Automata (DFA), try to reduce the DFA by removing unreachable states and removing similar rows.
Solution
Step 1
Remove the unreachable states from q0
From the initial states, we are not able to reach q2 and q4. So, remove these two states as shown below −
After removing unreachable states, the partial minimized DFA is as follows −
Step 2
The transition table is given below −
States | 0 | 1 |
---|---|---|
->q0 | q1 | q3 |
q1 | q0 | q3 |
*q3 | q5 | q5 |
*q5 | q5 | q5 |
Step 3
Divide tables into 2 tables as shown below −
Table 1 starts from the non-final states.
States | 0 | 1 |
---|---|---|
->q0 | q1 | q3 |
q1 | q0 | q3 |
Table 2 starts from the final states.
States | 0 | 1 |
---|---|---|
*q3 | q5 | q5 |
*q5 | q5 | q5 |
Step 4
Remove similar rows.
Table 1 has no similar rows
Table 2 has similar rows. So, skip q5 and replace q5 by q3
States | 0 | 1 |
---|---|---|
q3 | q5 | q3 |
Step 5
Combine two tables as shown below −
States | 0 | 1 |
---|---|---|
->q0 | q1 | q3 |
q1 | q0 | q3 |
*q3 | q3 | q3 |
Thus, the minimized DFA will be as follows −
Advertisements