1
$\begingroup$

We have two types of Automata. One is NFA and second is DFA. These are little bit different but thing is that in which environment we prefer NFA over the DFA?

$\endgroup$
0
$\begingroup$

The NFA is simpler to construct and manipulate.

The equivalent DFA of a n-state NFA can have up to 2^n states in the worst case.

For these two reasons the NFA is the preferred state machine for most real implementations dealing with regular languages.

The non-determinism is dealt with using either backtracking or or simulating multiple states at the same time (this last one can be seen as constructing the states of the equivalent DFA on the fly).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.