- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP

- 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.

- Related Questions & Answers
- Explain Deterministic Finite Automata in TOC.
- Explain non-deterministic push down automata in TOC?
- What is Non deterministic finite automata?
- Explain if the CFG is recognized by Non-deterministic push down automata
- Explain about a non-deterministic Turing Machine?
- Explain the various applications of automata in TOC
- Explain the method for constructing Minimum Finite State Automata.
- Explain the relationship between Finite Automata and Regular Expression.
- What is finite automata?
- Difference between Deterministic and Non-deterministic Algorithms
- Efficient Construction of Finite Automata
- Distinguish between non-deterministic, deterministic and Turing Machine computational models?
- What are different types of finite automata?
- Distinguish between Finite Automata and Turing Machine
- What is Linear bounded automata in TOC?

Advertisements