Theory of Automata
Theory of Automata
1
Lecture # ….
Theory of Automata
2
Recall…….
What is Automata?
It is the plural of automaton, and it means
“something that works automatically”.
3
4
5
Finite Automata
A language defining method
Also known as Finite State Machine (FSM), Finite
6
Finite Automata
A FA is defined as follows:-
◦ Finite number of states in which one state must be
initial state and more than one or may be none can
be the final states.
◦ Sigma Σ provides the input letters from which
input strings can be formed.
7
Types of Finite Automata
8
9
1:Deterministic Finite Automata
It represents an abstract machine which is used to
represent a regular language
10
Graphical Representation
Each node (or vertex) represents a state, and the
edges (or arcs) connecting the nodes represent
the corresponding transitions.
Each state can be labeled
11
DFA consists of 5 tuples {Q, ∑, q, F, δ}.
takes as input )
q : Initial state. ( Starting state of a machine )
F : set of final state.
δ : Transition Function,
defined as δ : Q X ∑ --> Q.
12
For a particular input character, the machine goes to
one state only.
13
Transition Table
STATE INPUT INPUT
0 1
q0 q1 q0
q1 q1 q2
* q2 q2 q2
state q1)
14
This defines the following transition diagram
0 1
q0 q1 q2
1 0 0,1
15
Examples
1: Construct a DFA for a language L = {aa}
∑ = {a}
L ={aa} (Language with only one string aa)
a a a
q0 q1 q2 D
D= Dead State a
16
2: Construct a DFA for a language L = {aba}
∑ = {a,b}
L ={aba} (Language with only one string aba)
a b a
q0 q1 q2 q3
b
b a,b
a,b
q4
a,b
17
3: Construct a DFA with ∑ = {0, 1} accepts all
strings starts with 0.
Also construct a Transition Table for the this DFA
18
Construct a DFA with ∑ = {0, 1} accepts all strings
starts with 0.
L = {0,00,01,001,011,……..}
0,1
0
q0 q1
0,1
q2
19
Here
q0 is initial or start state
Dead State: The strings are trapped in this state and will
not reach the final state and hence not acceptable by DFA