# Difference Between NFA and DFA

**NFA vs DFA**

The theory of computation is a branch of computer science that deals with how problems are solved using algorithms. It has three branches, namely; the computational complexity theory, the computability theory, and the automaton theory.

The automaton or automata theory is the study of abstract mathematical machines or systems that can be used to solve computational problems. An automaton is made up of states and transitions, and as it sees a symbol or letter of input, it makes a transition to another state taking the current state and symbol as input.

The automaton or automata theory has several classes that include the Deterministic Finite Automata (DFA) and the Nondeterministic Finite Automata (NFA). These two classes are transition functions of automata or automaton.

In transition, DFA cannot use n empty string, and it can be understood as one machine. If the string ends at a state that is not an acceptable state, DFA will reject it. A DFA machine can be constructed with every input and output.

DFA only has one state transition for every symbol of the alphabet, and there is only one final state for its transition which means that for each character that is read, there is one corresponding state in DFA. It is easier to check membership in DFA but it is more difficult to construct. Backtracking is allowed in DFA, and it requires more space than NFA.

Backtracking is not always allowed in NFA. While it is possible in some cases, in others it is not. It is easier to construct NFA, and it also requires less space, but it is not possible to construct an NFA machine for every input and output.

It is understood as several tiny machines that compute simultaneously, and membership can be harder to check. It uses Empty String Transition, and there are numerous possible next states for each pair of state and input symbol. It starts at a specific state and reads the symbols, and the automaton then determines the next state which depends on the current input and other consequent events. At its accepting state, NFA accepts the string and rejects it otherwise.

Summary:

1.“DFA” stands for “Deterministic Finite Automata” while “NFA” stands for “Nondeterministic Finite Automata.”

2.Both are transition functions of automata. In DFA the next possible state is distinctly set while in NFA each pair of state and input symbol can have many possible next states.

3.NFA can use empty string transition while DFA cannot use empty string transition.

4.NFA is easier to construct while it is more difficult to construct DFA.

5.Backtracking is allowed in DFA while in NFA it may or may not be allowed.

6.DFA requires more space while NFA requires less space.

7.While DFA can be understood as one machine and a DFA machine can be constructed for every input and output, 8.NFA can be understood as several little machines that compute together, and there is no possibility of constructing an NFA machine for every input and output.

#### Latest posts by Emelda M (see all)

- Difference Between Mocha and Coffee - January 11, 2012
- Difference Between Verb and Predicate - January 2, 2012
- Difference Between Tropical Meteorology and Monsoon Meteorology - January 2, 2012

### Search DifferenceBetween.net :

Email This Post : If you like this article or our site. Please spread the word. Share it with your friends/family.

NFA CONSUME MORE SPACE AND DFA REQUIRES LESS SPACE…..

right priyanka

You Both are wrong NFAs are often smaller than DFAs and hence consume less space.

Thanks neha.

And stifler you are wrong because in NFA transitions (inputs) and States are more than DFA. Hence NFA consume more space then DFA….

Number of states in dfa are greater or equal to nfa so dfa consumes more memory than nfa

any one explain how constructed NFA

and DFA examples pizzazz….

DFA requires more space thN NFA

yes

your wrong dfa consumes less space then nfa

How can u say that

While DFA can be understood as one machine and a DFA machine can be constructed for every input and output, NFA can be understood as several little machines that compute together, and there is no possibility of constructing an NFA machine for every input and output. why?

thanks to priyanka for asking a question….

thanks to neha for answering a right answer….

stifler you are wrong….

Dear Saaliya Murtaza Khalid:

Nai phasni jawana, tere kolo nai phari jani.

you both guys are wrong there is no nfa and dfa in the automation process there is a new process which is added to the list known as the FSA which is the ultimatum of all the other processes which are required for the proving the theorems of the computation process.

Anju, it can be.

But then it’d be a DFA only.

You can think of Dfa to be a subset of nfa

yes right neha

It is not compulsory that nfa construct easily than dfa.

yes,you are right.

I m a cs student…. The above mentioned statements are r8 guys dont get confused by listening all tge above stupid comments…..

Dfa requires more space because there is only one final state and we have to make only one state out of another where as in nfa we can make multiple and can have more than one final state

plz explain the condition of FA and NFA

a finite automata can be represented?

in number 7 why both of them are DFA. which one is for DFA.

sorry got that now…