4. Finite State Automata (FSA)
• There are two main kinds of FSA:-
– Non-Deterministic Finite Automata (NFA): at a
particular state, a unique path may not be determined for
each input alphabet.
– Deterministic Finite Automata (DFA): at a particular
state, a unique path determined for each input alphabet.
5. Finite State Automata (FSA)
• For every non-deterministic automata, there is an
equivalent deterministic automata.
• The below NFA is equivalent to the regular
expression/ab*ca?/.
6. NFA
• In a NFA, for each state there can be zero, one,
two, or more transitions corresponding to a
particular symbol.
• For a particular input symbol, the machine can move
to any combination of the states in the machine.
Hence, it is called NFA.
• Only NFA state automaton can have an ε transition.
• The procedure is like: RE → NFA → DFA → Tables
7. NFA
An NFA can be represented by a 5-tuple (Q, Σ, δ, q0,
F) where:−
• Q is a finite set of states.
• Σ is a finite set of symbols called the alphabets.
• δ is the transition function where δ: Q × Σ → 2Q
• q0 is the initial state & F is the final state
(Here the power set of Q (2Q) has been taken because in
case of NFA, from a state, transition can occur to any
combination of Q states)
8. NFA – State Digrams
• Represented by digraphs called state diagram:
used to graphically represent finite state machines
to give an abstract description of the behavior of a
system.
11. 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.
• Q is a finite set of states.
• Σ is a finite set of symbols called the alphabet.
• δ is the transition function where δ: Q × Σ → Q
12. NFA vs DFA
• In NFA each pair of state
and input symbol can
have many possible next
states.
• NFA can use empty string
transition.
• NFA is easier to construct.
• NFA requires less space.
• In DFA the next possible
state is distinctly set.
• DFA cannot use empty
string transition.
• It is more difficult to
construct DFA.
• DFA requires more space.