Finite State Automata, Deterministic Finite Automata, Transition Function
Finite State Automata, Deterministic Finite Automata, Transition Function
Transition Function
Finite Automata Theory
& Formal Languages
(Content for this lecture is also taken from J. Ullman’s slides)
Khawaja 2023 Automata Theory & Languages 1
Finite State Automata
0 0, 1
0
Start 1 1
q0 q1 q2
Final state
q0 = seen no 1
q1 = seen one 1
q2 = seen two consecutive 1’s
Khawaja 2023 Automata Theory & Languages 6
Second Example of FSA
Example: A language over given Σ
Σ = {0, 1}
L : { x ϵ {0, 1}* | x has even number of 0's}
For example, 0101100 ϵ L
Similarly 1111 ϵ L since it has zero (even) number of 0's.
On the other hand, 1011011000 does not belong to L.
q0 q1
Not i or g
Not i
Not i or n i
No
Saw “i” Saw “in” Saw “ing”
progress i n g
i
Start i
Not i
Try different input strings to see how it works, ex: ring, rang, rings, ringing
1. δ(q0, 1) = q0 , δ(q0, 0) = q1
2. δ(q1, 1) = q2 , δ(q1, 0) = q1
3. δ(q2, 0) = q2 , δ(q2, 1) = q2
δ(q, a) = p
δ(q0, 0) = q2
δ(q0, 1) = q1
δ(q1, 0) = q3
δ(q1, 1) = q0
δ(q2, 0) = q0
δ(q2, 1) = q3
δ(q3, 0) = q1
δ(q3, 1) = q2
Khawaja 2023 Automata Theory & Languages 23
Regular Languages
and
Nonregular Languages