- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
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
Give an example problem of converting NFA to DFA.
Problem
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 −
- Related Articles
- Explain with an example how to convert NFA to DFA.
- How to convert from NFA to DFA in TOC?
- How to convert NFA with epsilon to DFA in TOC?
- What is the difference between DFA and NFA?
- Convert NFA to DFA and explain the difference between them
- What is the difference between DFA and NFA in compiler design?
- Give an example of linear motion
- State the worst case number of states in DFA and NFA for a language?
- Define Tissue. Give an example.
- Give an example of solid, liquid and gas.
- Give an example of a double displacement reaction.
- Give an example of a triple column cash book
- What is Static Friction? Give an example.
- What is air pressure? Give an example.
- How to approach and solve word problems ? Give an example.

Advertisements