The DFA stands for deterministic finite automata. If any machine reads an input string one at a time then any finite automata is called deterministic finite automata. The DFA is also known as the uniqueness of computation and has a single path for input from the current state to the next state. It is a set of five tuples such as:
M = (Q, Σ, δ, q0, F)
where,
1. Q is a finite set of states.
2. Σ is an alphabet, and the DFA processes strings over Σ.
3. δ: Q × Σ → Q is the transition function. • δ defines the label on each edge.
4. q0 ∈ Q is the start state (or initial state).
5. F ⊆ Q is the set of accepted states (or final states).
What is NFA?
The full form of NFA is Non- deterministic finite automata. When there are multiple paths for specific input from current state to next state then it is called Non- deterministic finite automata.
Difference Between DFA and NFA
S.No. | DFA | NFA |
1 | The full form of DFA is Deterministic Finite Automata. | The full form of NFA is Nondeterministic Finite Automata (NFA). |
2 | It is not competent in handling an Empty String transition. | It is competent to handle an empty string transition. |
3 | In DFA, only a sole state transition can be accomplished for each symbolic representation of the characters. | In NFA, no particulars are required from the users. |
4 | It can be defined as one machine. | Multiple machines execute computational tasks at the same time. |
5 | In DFA, backtracking is allowed. | In NFA, backtracking is not allowed. |
6 | In DFA, empty string transitions are not noticed. | It allows empty string transition. |
7 | It is tough to construct a DFA. | It is easy to construct a NFA. |
8 | It needs more space. | It needs less space. |
9 | The complete time needed for managing any input string in DFA is shorter than NFA. | The complete time needed for managing any input string in NFA is larger than DFA. |
10 | All DFA are considered as NFA. | All NFA are not considered as DFA. |
Keep learning and stay tuned to get the latest updates on GATE Exam along with GATE Preparation Books & GATE Answer Key and more.
Comments