- 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
Convert NFA to DFA and explain the difference between them
Some basic difference between a Non-deterministic finite automata (NFA) and Deterministic Finite Automata (DFA) is that in DFA each state has an output for each of the inputs, whereas this is not necessary for NFA.
Also, in NFA the input can be \epsilon but in DFA this is not the case.
Moreover, in NFA one state can go to a different state on the same output but this is not the case with DFA.
Usually, we convert an NFA into a DFA by making the state transition diagram for the given NFA and accordingly vary that state diagram for the DFA. From this state transition diagram, we can make the DFA.
Problem
Convert the given NFA to DFA.
Solution
The given NFA is as follows −
The transition table for NFA is as follows
State\input | a | b |
---|---|---|
->q0 | {q2,q1} | - |
q1 | - | - |
q2 | {q1,q2} | - |
The transition table for DFA is as follows
State\input | a | b |
---|---|---|
->q0 | [q0q1] | - |
*[q2q1] | [q1q2] | [q2] |
[q2] | [q2q1] | [q2] |
The DFA transition diagram is as follows −
- Related Articles
- What is the difference between DFA and NFA?
- Explain with an example how to convert NFA to DFA.
- What is the difference between DFA and NFA in compiler design?
- How to convert from NFA to DFA in TOC?
- How to convert NFA with epsilon to DFA in TOC?
- Construct NFA for the following language and convert it into DFA using the algorithm - L = (aa+ (bb*)c*)
- Explain Arden’s theorem to convert DFA to Regular Expression
- Give an example problem of converting NFA to DFA.
- State the worst case number of states in DFA and NFA for a language?
- What are oxidation and reduction? Explain the difference between them with the help of an example.
- Explain NFA with epsilon transition.
- Explain the concatenation process in DFA
- Explain the complementation process in DFA
- How to convert NFA with epsilon to without epsilon?
- Explain the Difference Between Definition and Declaration
