OER for Finite Automata


Finite Automata

A finite automaton (FA) is a simple idealized machine used to recognize patterns within input taken from some character set (or alphabet) C. The job of an FA is to accept or reject an input depending on whether the pattern defined by the FA occurs in the input.

Finite Automaton can be classified into two types −

  • Deterministic Finite Automaton (DFA)
  • Non-deterministic Finite Automaton (NDFA / NFA)

Deterministic Finite Automata

Deterministic Finite Automaton (DFA)

In DFA, for each input symbol, one can determine the state to which the machine will move. Hence, it is called Deterministic Automaton. As it has a finite number of states, the machine is called Deterministic Finite Machine or Deterministic Finite Automaton.

Formal Definition of a DFA

A DFA can be represented by a 5-tuple (Q, ∑, δ, q0, F) where −

  1. Q is a finite set of states.
  2. is a finite set of symbols called the alphabet.
  3. δ is the transition function where δ: Q × ∑ → Q
  4. q0 is the initial state from where any input is processed (q0 ∈ Q).
  5. F is a set of final state/states of Q (F ⊆ Q).

Graphical Representation of a DFA

A DFA is represented by digraphs called state diagram.

  • The vertices represent the states.
  • The arcs labeled with an input alphabet show the transitions.
  • The initial state is denoted by an empty single incoming arc.
  • The final state is indicated by double circles.

Non deterministic Finite Automata

In NDFA, for a particular input symbol, the machine can move to any combination of the states in the machine. In other words, the exact state to which the machine moves cannot be determined. Hence, it is called Non-deterministic Automaton. As it has finite number of states, the machine is called Non-deterministic Finite Machine or Non-deterministic Finite Automaton.

Formal Definition of an NDFA

An NDFA can be represented by a 5-tuple (Q, ∑, δ, q0, F) where −

  1. Q is a finite set of states.
  2. is a finite set of symbols called the alphabets.
  3. δ is the transition function where δ: Q × {∑ ∪ ε} → 2Q (Here the power set of Q (2Q) has been taken because in case of NDFA, from a state, transition can occur to any combination of Q states)
  4. q0 is the initial state from where any input is processed (q0 ∈ Q).
  5. F is a set of final state/states of Q (F ⊆ Q).

Graphical Representation of an NDFA − (same as DFA)

An NDFA is represented by digraphs called state diagram.

  • The vertices represent the states.
  • The arcs labeled with an input alphabet show the transitions.
  • The initial state is denoted by an empty single incoming arc.
  • The final state is indicated by double circles.

 Videos:


Construction of DFA


LeD 1


DFA Construction


LeD 2


LeD3


LeD4


LeD 5


LeD6

Question Bank:-

Download: Question Bank.doc


Course Materials


Download: Lecture1.ppt



Download: Lecture2.ppt


Download: DFA.ppt


Download: NDFA.pptx


Return to top