FSM minimisation

Limitations of FSMs

Computing $2^p\times2^p$


State equivalence

Basic notions

Distinguishable states
$S_i$ and $S_j$ of $M$ are distinguishable if and only if a finite input sequence applied to $M$ produce distinct output sequence, depending of whether $M$ is in $S_i$ or $S_j$
Distinguishing sequence for $S_i$ and $S_j$
A sequence that allows $S_i$ and $S_j$ to be distinguished
$k$-distinguishable
$S_i$ and $S_j$ are $k$-distinguishable is there exists a sequence of length $k$ to distinguish $S_i$ and $S_j$
$k$-equivalent
No sequence of length $k$ to distinguish $S_i$ and $S_j$
Equivalent states
$S_i$ and $S_j$ are equivalent if they are $k$-equivalent for all $k$; for $n$ state m/c sufficient if $k$-equivalent for all $k\leq n-1$ (in view of the limited memory of FSMs)

Minimisation of completely specified FSMs

Sample m/c and partition table

FSM specification
PSNS, output
$x=0$$x=1$
AE,0D,1
BF,0D,0
CE,0B,1
DF,0B,0
EC,0F,1
FB,0C,0
Equivalence partition table
$k$Partitions
$P_0$(ABCDEF)
$P_1$
$P_2$
$P_3$
$P_4$

Equivalence partition is unique


Minimisation of incompletely specified FSMs

Sample incompletely specified FSMs

FSM specification: $M_A$
PSNS, output
$x=0$$x=1$
AC,1E,—
BC,—E,1
CB,0A,1
DD,0E,1
ED,1E,0
FSM specification: $M_B$
PSNS, output
$x=0$$x=1$
AB,1
B—,0C,0
CA,1B,0
FSM specification: $M_C$
PSNS, output
$x=0$$x=1$
AB,1T,—
BT,0C,0
CA,1B,0
TT,—T,—
FSM specification: $M_D$
PSNS, output
$I_1$$I_2$$I_3$$I_4$
AC,1E,1B,1
BE,0
CF,0F,1
DB,1
EF,0A,0D,1
FC,0B,0C,1
FSM specification: $M_E$
PSNS, output
$I_1$$I_2$
AE,0B,0
BF,0A,0
CE,—C,0
DF,1D,0
EC,1C,0
FD,—B,0
FSM specification: $M_F$
PSNS, output
$I_1$$I_2$$I_3$$I_4$
AD,0D,0C,—
BA,1D,—
CB,1C,0E,0
DE,1C,0D,0
EA,1

Basic notions

Compatible states
Two states $s_i$ and $s_j$ of a machine $M$ are compatible if and only if, for every input sequence applicable to both $s_i$ and $s_j$, the same output sequence will be produced whenever both output symbols are specified and regardless of whether $s_i$ or $s_j$ is the initial state
Compatibility issues

Merger table

Table construction
FSM specification: $M_E$
PSNS, output
$I_1$$I_2$
AE,0B,0
BF,0A,0
CE,—C,0
DF,1D,0
EC,1C,0
FD,—B,0
Merger table
BEF, AB
CBC, EEAC,EF
D××EF, CD
E××CE, CCCD,CF
FDE, BBAB,DFBC,DEBD, FDBC,CD
ABCDE
Table simplification
Unsatisfiable dependencies (direct)
DF depending of compatibility of BD
Entries with (direct) unsatisfiable dependencies are crossed
Unsatisfiable dependencies (transitive)
AF depending of compatibility of DF
Entries with (transitive) unsatisfiable dependencies are crossed
Self dependencies
AB depending on AB, CD depending on CD, FD depending on FD
Self dependencies are dropped
Reflexive dependencies
Depending on compatibility of E with E, B with B
Reflexive dependencies are dropped
Merger table after simplification
Merger table
BEF
CBCAC,EF
D××EF
E××CD,CF
FDE×BC,DE×BC,CD
ABCDE

Compatibility graph

Compatibility graphs
$M_E$$M_D$

Closed set of compatibiles

Costing of closed set of compatibiles for $M_E$
SlClosed set of compatibilesCost
1A, B, CE, D, F5
2AB, EF, CD, BC4
3ABC, EF, CD3
4DE, CD, EF, BC, AC, CF6
5DE, CD, EF, ABC, CF5
6CDE, EF, ABC, CF4
Reduced FSM for $M_E$
PSNS, output
MembersSymbol$I_1$$I_2$
ABC αδ,0α,0
CD γδ,1γ,0
EF δγ,1α,0
Reduced FSM for $M_D$
PSNS, output
MembersSymbol$I_1$$I_2$$I_3$$I_4$
AB αγ,0β,1 γ,1α,1
CD β γ,0γ,1α,1
EF γβ,0 γ,0α,0β,1

Exercises