Finite Automata: A Finite Automaton Has A Finite Set of States With Which It Accepts or Rejects Strings
Finite Automata: A Finite Automaton Has A Finite Set of States With Which It Accepts or Rejects Strings
Goddard 1: 2
Operating an FA
Operating an FA.
1) Set the machine to start state.
2) If End-of-String then halt.
3) Read a symbol.
4) Update state according to current state and
symbol read.
5) Goto Step 2.
Goddard 1: 3
An FA Accepts Strings
Goddard 1: 4
An Example FA
1
0 0
0
A B C
1
1
Goddard 1: 5
Example FA
1
A B 0
1
0
Goddard 1: 6
Terminology
Goddard 1: 7
Building FAs: Do the Obvious
Goddard 1: 8
Building FAs: Do the Obvious
0, 1
Goddard 1: 9
Building FAs: Recent Memory
Goddard 1: 10
Building FAs: Recent Memory
Goddard 1: 11
Building FAs: Traps
Goddard 1: 12
Example with a Trap
Goddard 1: 13
Example with a Trap
A
0 1
B D
0 1
1 0
0 1
F
C 1 0 E
0, 1
Goddard 1: 14
Alternating 0’s and 1’s again
A
0 1
1
B D
0
0 1
0, 1
Goddard 1: 15
Building FAs: Permanent Memory
Goddard 1: 16
Building FAs: Permanent Memory
S
1
0
C D 0
1
1
Goddard 1: 17
Practice
Goddard 1: 18
Solutions to Practice
1) A
0
B 0, 1
2) 1 1
0 0
A B C 0, 1
1
3) A
0
B C 1
1 0
0
D 0, 1
Goddard 1: 19
Transition Table
Input
0 1
S A C
State
A A B
B A B
C D C
D D C
Goddard 1: 20
Formal Definition
A (deterministic) FA is 5-tuple
(Q, Σ, q0, T, δ) where:
Goddard 1: 21
Summary
Goddard 1: 22