Advantages / Disadvantages of NFA over DFA and vice versa

What are the relative pro and con of both DFA and NFA compared to each other?

I know that DFAs are easier to implement than NFAs, and that NFAs reach accept state more slowly than DFAs, but are there any other obvious, well-known advantages / disadvantages?

+3
source share
3 answers

The advantage of NFA over DFA is its property to always “choose the right path”. Since you cannot say “choose the right path” in the algorithm, the transition from NFA to DFA usually occurs, creating DFA states that symbolize several NFA states. Thus, when your NFA is in state A and has the ability to go to A, B or C, the next state in your DFA will be {A, B, C}.

This explains the advantages and disadvantages: DFAs can be implemented easier because their next state is determined by the function. The NFA makes it easier for the user to express what they want, because the NFA can choose between many ways.

+1
source

NFA and DFA accept the same set of languages ​​- common languages.

NFA ( DFA, DFA NFA) , DFA , , , DFAs " " , NFA ( DFA).

FA, RE (, ), NFA ( ). FA, NFA , DFA. DFA, (a) NFA DFA (b) DFA.

, DFA , ( ), NFA , ( ).

+1

One definite advantage of the NFA over the DFA is that you can build an FA representing a language that is union, intersection, consistency, etc. two (or more) languages, easily using NFA. That is, if you have a slightly simple FA that does the job parts, you can easily combine them using the NFA. When using DFA, you need to build a new machine that does all the work on its own.

see, it is easier to implement. but there is a question of time that you spoke of.

0
source

All Articles