Professional Documents
Culture Documents
Jeremy Mange
CS 6800
Summer 2009
|
|eterministic Finite Automata (|FSA)
(ax Ȉx įx x )
a ± (finite) set of states
Ȉ ± alphabet ± (finite) set of input symbols
į ± transition function
q0 ± start state
F ± set of final / accepting states
|
uften representing as a diagram:
|
Some states can be redundant:
The following |FA accepts (a|b)+
State s1 is not necessary
|
So these two |FAs are u u :
|
This is a îu u (or just u)
|FA
r ery remaining state is necessary
|
The task of |
x thenx is to
automatically transform a gi en |FA into a
state-minimized |FA
Se eral algorithms and ariants are known
Note that this also in effect can minimize an NFA
(since we know algorithm to con ert NFA to |FA)
|
·ecall that a |FA V=(ax Ȉx įx x )
s0
s1
s2
s0 s1 s2
o
s0
s1 İ
s2 İ
s0 s1 s2
Aabel pairs with İ where one is a final state and the other is not
o
s0
s1 İ
s2 İ
s0 s1 s2
s0
s1 İ
s2 İ
s0 s1 s2
Check for pairs with one state final and one not:
First iteration of main loop:
Second iteration of main loop:
Third iteration makes no changes
Blank cells are equi alent pairs of states
Combine equi alent states for minimized |FA:
|FA Minimization is a fairly understandable
processx and is useful in se eral areas
·egular expression matching implementation
Very similar algorithm is used for compiler
optimization to eliminate duplicate computations
The algorithm described is u( 2)
îî
u
î. Addison-Wesley.
Hopcroftx J. (1971)
V
uî
u
üni ersity of
llinois at ürbana-Champaign.
http://www.cs.uiuc.edu/class/fa07/cs273/Handouts/minimization/minimization.pdf