FSM Decomposition using Partitions on States - PowerPoint PPT Presentation

1 / 27
About This Presentation
Title:

FSM Decomposition using Partitions on States

Description:

{Bk}; Bi Bj = , i j; Ui Bi = S. Notations. Subsets Bk are called blocks ... on S, then the set of equivalence classes is a partition on S, and conversely, ... – PowerPoint PPT presentation

Number of Views:196
Avg rating:3.0/5.0
Slides: 28
Provided by: ala52
Category:

less

Transcript and Presenter's Notes

Title: FSM Decomposition using Partitions on States


1
FSM Decomposition using Partitions on States
290N The Unknown Component Problem Lecture 24
2
Outline
  • Once upon a time
  • Motivating example
  • Terminology
  • Definition of SP-partitions
  • Decomposition using SP-partitions
  • Computation of SP-partitions
  • Extensions for ND FSMs

3
Motivating Example
Y1 y1xy1x Y2 y3x Y3 y2y3 Z
y1y2y3
  • Y1 y1y2y3xy2y3x y2y3x
  • Y2 y2x y1y2y3x y1y3
  • Y3 y1xy2y3x y2y3x y1y2x
  • Z y2y3

4
Terminology
  • FSM is I, O, S, ?, ?
  • A partition ? on S is a set of disjoint subsets
    of states, whose set-union is S, i.e.
  • ? Bk Bi ? Bj ?, i ? j Ui Bi
    S
  • Notations
  • Subsets Bk are called blocks
  • B?(s) denotes the block containing state s
  • s ?? t iff s and t are in the same block, i.e.
    B?(s) B?(t)

5
Partitions and Equivalence Relations
  • Relation R on sets S and T is a subset of pairs
  • R (s,t) s R t
  • Equivalence relation R
  • Reflexive for all s, s R s
  • Symmetric if s R t, then t R s
  • Transitive if s R t and t R u, then s R u
  • Proposition. If R is an equivalence relation on
    S, then the set of equivalence classes is a
    partition ? on S, and conversely, every partition
    ? on S is an equivalence relation R

6
Operations on Partitions
  • Definition. Product of partitions, ?1 and ?2, is
    a partition ?1??2 on S such that
  • s ??1??2 t iff s ? ?1 t and s ? ?2 t
  • Definition. Sum of partitions, ?1 and ?2, is a
    partition ?1?2 on S such that
  • s ??1?2 t iff there exist a sequence of states
    in S, ss0,s1,,sn, for which si ??1 si1 or si
    ??2 si1
  • Definition. Partition ?2 is larger or equal to
    partition ?1, ?1 ? ?2, if and only if ?1 ? ?2
    ?1 (equivalently, ?1 ?2 ?2)

7
Example
  • S 1,2,3,4,5,6,7,8,9
  • ?1 1,2 3,4 5,6 7,8,9
  • ?2 1,6 2,3 4,5 7,8 9
  • ?1??2 1 2 3 4 5 6 7,8 9
  • ?1?2 1,2,3,4,5,6 7,8,9

1 2 3 4 5 6 7 8
9
8
Partitions as a Lattice
  • Definition. Let (S, ?) be a partially ordered
    set, and T be a subset of S. Then s ? S is the
    least upper bound (l.u.b.) of T iff
  • s ? t for all t in T
  • s ? t for all t in T implies that s ? s
  • Definition. A lattice is partially ordered set, L
    (S, ?), which has a l.u.b. and a g.l.b.
  • Definition. If L is a finite lattice, then it has
    a l.u.b. and g.l.b. for the set of all elements
    in L, denoted by 1 and 0. Element 1 is called
    identity, and 0 is called zero.
  • Theorem. Partitions form a lattice.

9
Example
  • Lattice of subsets of S1,2,3
  • Lattice of partitions on S1,2,3

1,2,3
1,2,3
1,2
1,3
2,3
1,2 3
1,32
1 2,3
3
2
1
1 2 3
?
10
SP-Partitions
  • Definition. A partition ? on the set of states S
    of the machine M (S,I,O,?,?) has the
    substitution property (is SP-partition) iff the
    states in any block, under all inputs, transit
    into another block, i. e. ?x s ??t ?
    ?(s,x) ?? ?(t,x)

11
Example
  • SP-partition
  • ? 1,2 3,4,5 A,B

B
A
B
12
?-Image of FSM
  • Definition. Let ? be an SP-partition on the set
    of states S of the machine M (S,I,O,?,?). Then,
    the ?-image of M is the machine M? (B?,I,??)
    with ??(B?,x) B? iff ?(B?,x) ? B?.

13
Example
  • SP-partition
  • ? 1,2 3,4,5 A,B

B
A
B
14
Observations
  • Observation 1. Machine M? performs only part of
    the computation of machine M, because it only
    keeps track of which block of ? contains the
    given state.
  • Observation 2. If ? is an SP-partition, and we
    know the block of ?, which contains the given
    state of M, then we can compute the block of ?,
    to which this state of M is transformed by any
    input sequence. Machine M? performs this
    computation.
  • On the other hand, if ? is not an
    SP-partition, then it is not possible to predict
    where the given state will go under some input
    sequences.
  • In other words, an SP-partition defines an
    uncertainty about the states of M, which does not
    spread as the machine operates.

15
SP-Partitions as a Sub-Lattice
  • Lemma. SP-partitions are closed under product and
    sum operations.
  • Theorem. SP-partitions form a sub-lattice of the
    lattice of all partitions

16
Example
  • ?1 1,2 3,4 5,6 7,8
  • ?2 1,2,3,4 5,6,7,8
  • ?3 1 2 3 4,5 6 7 8
  • ?4 1,2 3,4,5,6 7,8
  • ?5 1 2 3,6 4 5 7 8
  • ?6 1 2 3,6 4,5 7 8

1
?4
?2
?5
?3
?1
?6
0
17
Observations
  • Lattice of SP-partitions shows all non-trivial
    parallel-serial decompositions of the FSM
  • The lattice is a picture of FSM structure
  • Algebraic properties of the lattice are reflected
    in the machine properties, and vice versa
  • FSMs can be classified according to their
    lattices

18
Decomposition of FSMs
  • Definition. Machine M is decomposable into two
    machines, M1 and M2, if the set of i/o strings
    produced by M is equal to the set of i/o strings
    produced by the composition of M1 and M2.
  • Definition. Decomposition of M into two machines,
    M1 and M2, is non-trivial if M1 and M2 have fewer
    states than M.

19
Parallel Composition
  • Definition. Given the state machines
  • M1 (S1, I, ?1) and M2 (S2, I, ?2),
  • and the output function ? S1? S2 ? I ? O,
  • the parallel composition of M1 and M2 is the
    machine M (S1? S2, I, O, ?, ?), where
    ?((s1,s2), (x1, x2)) (?1(s1, x1), ?2(s2, x2)).

M
I1
?
S1
M1
O
S2
M2
20
Serial Composition
  • Definition. Given the state machines
  • M1 (S1, I1, ?1) and M2 (S2, I2, ?2)
  • with I2 S1 ? I1, a set of output symbols O,
    and an output function ? S1? S2 ? I1 ? O, then
    the serial composition of M1 and M2 with the
    output function ? is the machine M (S1? S2, I1,
    O, ?, ?), where ?((s,t),x) (?1(s, x),
    ?2(t,(s,x))).

M
I1
S1
S2
O
?
M1
M2
21
Theory
  • Theorem 1. Machine M has a non-trivial parallel
    decomposition iff there exist two non-trivial
    SP-partitions ?1 and ?2 on the states of M, such
    that ?1 ? ?2 0.
  • Theorem 2. Machine M has a non-trivial serial
    decomposition iff there exist a non-trivial
    SP-partition ? on the states of M.

22
Parallel Decomposition (part 1)
  • SP-partitions
  • ?1 0,1,2 3,4,5 A,B
  • ?2 0,5 1,4 2,3 I,II,III

A
B
23
Parallel Decomposition (part 2)
M
M
S1
M1
?
I
S2
M2
M1
M2
24
Serial Decomposition (part 1)
  • SP-partition
  • ? 1,2 3,4,5 A,B

B
A
B
25
Serial Decomposition (part 2)
  • Another partition
  • ? 1,3 2,4 5 a,b,c

a
c
b
26
Serial Decomposition (part 3)
M
M
M1
M2
M2
M1
27
Computation of All SP-partitions
  • For every pair of states, s and t, compute the
    SP-partition containing these states in one
    block.
  • The resulting non-trivial partitions are the
    smallest partitions of the lattice of
    SP-partitions
  • Find all possible sums of the above partitions
  • The resulting non-trivial partitions are the
    remaining partitions of the lattice of
    SP-partitions
Write a Comment
User Comments (0)
About PowerShow.com