No. | DFA | NFA |
---|---|---|
1 | DFA stands for Deterministic Finite Automaton. | NFA stands for Non-deterministic Finite Automaton. |
2 | In a DFA, each state and input symbol has exactly one defined transition. | In an NFA, each state and input symbol can have multiple defined transitions or none at all. |
3 | DFA transitions are deterministic. | NFA transitions can be non-deterministic. |
4 | DFA accepts a string if there is a unique path to an accept state. | NFA accepts a string if there is at least one path to an accept state. |
5 | DFA generally requires more memory. | NFA generally requires less memory. |
6 | DFA is easier to implement. | NFA is more complex to implement. |
Difference between DFA and NFA
Tags:
Compiler Design