- Related Questions & Answers
- Explain Deterministic Finite Automata in TOC.
- What is finite automata?
- Efficient Construction of Finite Automata
- Difference between Deterministic and Non-deterministic Algorithms
- What are different types of finite automata?
- What is a finite state machine in TOC?
- C program to simulate Nondeterministic Finite Automata (NFA)
- C++ program for Finite Automata algorithm for Pattern Searching
- Find out the Regular expression for the given finite automata
- Explain the concept of derivation in TOC
- Construct RE for given finite automata with Arden’s theorem
- Explain the power of an alphabet in TOC.
- Generate a Regular Expression for a Finite Automata with state elimination method
- Explain the concept of state elimination method in TOC
- Explain the different operations on Regular language in TOC.

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

NFA stands for non-deterministic finite automata. It is easy to construct an NFA when compared to DFA for a given regular language.

The finite automata are called NFA when there exist many paths for specific input from the current state to the next state.

Each NFA can be translated into DFA but every NFA is Non DFA.

NFA is defined in the same way as DFA but with the following two exceptions, which are as follows −

- It contains multiple next states.
- It contains ε transitions.

The transition diagram is as follows −

In the above NFA, it is clear that there exist many paths for specific input from the current state to the next state. (state q0 on input ‘b’ it goes to q0 itself and q1).

Non-deterministic finite automata also have five states which are same as DFA, but with different transition function, as shown follows −

δ: Q X Σ -> 2Q

Non-deterministic finite automata is defined as a 5 tuple,

M=(Q, Σ, δ,q0,F)

Where,

- Q: Finite set of states
- Σ: Finite set of the input symbol
- q0: Initial state
- F: Final state
- δ: Transition function: Q X Σ -> 2
^{Q}

An NFA can be represented by digraphs called state diagrams.

The following factors are considered while graphically representing NFA −

- The state is represented by vertices.
- The arc labelled with an input character shows the transitions.
- The initial state is marked with an arrow.
- The final state is denoted by the double circle.

Q = {q0, q1, q2}

Σ = {0, 1}

q0 = {q0}

F = {q2}

The transition diagram is as follows −

The transition table is as follows −

Present state | Next state for input 0 | Next state for input |
---|---|---|

->q0 | q0,q1 | q1 |

q1 | q2 | q0 |

*q2 | q2 | q1,q2 |

**Step 1**− q1 is an initial state on input ‘0’ it goes to multiple states q0 and q1, on input ‘1’ goes to state q1.**step 2**− q1 is an intermediate state on input ‘0’ goes to state q2 which is a final state and on input ‘1’ goes to state q0.**Step 3**− q2 is the final state on input ‘0’ goes to q2 itself and on ‘1’ it goes to multiple states q1 and q2.

Advertisements