You are on page 1of 15

CSC312

Automata Theory
Lecture # 7

Chapter # 5 by Cohen (Cont…)

Finite Automata
Transition Diagram
abba -Finite Accepter a, b

q5
a a, b
b a b
q0 a q1 b q2 b q3 a q4

initial final
state state
transition
state “accept”
2
Formalities
Deterministic Finite Accepter (DFA) OR
Deterministic Finite Automaton
M   Q, ,  , q0 , F 
Q : set of states
 : input alphabet
 : transition function
q0 : initial state q0  Q
F : set of final states F  Q
3
Input Alphabet 

   a, b

a, b

q5
b a a, b
a b
q0 a q1 b q2 b q3 a q4

4
Set of States Q
Q   q0 , q1, q2 , q3 , q4 , q5 

a, b

q5
a a, b
b a b
q0 a q1 b q2 b q3 a q4

5
Initial State q0

a, b

q5
a a, b
b a b
q0 a q1 b q2 b q3 a q4

6
Set of Final States F

F   q4 

a, b

q5
a a, b
b a b
q0 a q1 b q2 b q3 a q4

7
Transition Function 

 :Q  Q

a, b

q5
b a a, b
a b
q0 a q1 b q2 b q3 a q4

8
  q0 , a   q1

a, b

q5
b a a, b
a b
q0 a q1 b q2 b q3 a q4

9
  q0 , b   q5

a, b

q5
b a a, b
a b
q0 a q1 b q2 b q3 a q4

10
  q2 , b   q3

a, b

q5
b a a, b
a b
q0 a q1 b q2 b q3 a q4

11
Transition Function 
 a b
q0 q1 q5
q1 q5 q2
q2 q5 q3
q3 q4 q5 a, b
q4 q5 q5
q5 q5 q5 q5
b a a, b
a b
q0 a q1 b q2 b q3 a q4

12
Ex: The FA that accepts the language with
RE = (a+b)*(aa+bb)(a+b)*
Ex: The FA that accepts the language with
all the strings having at least one triple
letter.
Ex: The FA that accepts the language of all
the words that
(i)Have b as the 2nd letter
(ii)Have b as the 3rd letter

13
Note: there are FAs that accept no language.
These are of two types
(i)FA’s that have no final state, such as

(ii) FA’s in which final states cannot be


reached from the start state i.e. a
disconnected graph or graph like this

14
See examples on page 58, 60, 62, 63, 64, 65,
66, 67, 68, 69, 70
Ch # 5 Exercise p-71
Questions: 1, 2, 3, 4, 5, 6, 7, 8, 9

15

You might also like