Introduction of Finite Automata
Introduction of Finite Automata
Example:
Construct a DFA that accepts all strings ending with ‘a’.
Given:
Σ = {a, b},
Q = {q0, q1},
F = {q1}
State\
Symbol a b
q q
q0
1 0
q q
q1
1 0
In this example, if the string ends in ‘a’, the machine reaches state q1, which is
an accepting state.
2) Non-Deterministic Finite Automata (NFA)
NFA is similar to DFA but includes the following features:
It can transition to multiple states for the same input.
It allows null (ϵ) moves, where the machine can change states without
consuming any input.
Example:
Construct an NFA that accepts strings ending in ‘a’.
Given:
Σ = {a, b},
Q = {q0, q1},
F = {q1}
Fig 2. State Transition Diagram for NFA with Σ = {a, b}
State Transition Table for above Automaton,
State\
Symbol a b
{q0,q q
q0
1} 0
q1 φ φ