Presentation is loading. Please wait.

Presentation is loading. Please wait.

FSM Decomposition using Partitions on States 290N: The Unknown Component Problem Lecture 24.

Similar presentations


Presentation on theme: "FSM Decomposition using Partitions on States 290N: The Unknown Component Problem Lecture 24."— Presentation transcript:

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 Y 1 = y 1 ’y 2 ’y 3 x’+y 2 y 3 ’x’ + y 2 y 3 x Y 2 = y 2 ’x +y 1 ’y 2 ’y 3 ’x’ + y 1 y 3 Y 3 = y 1 x+y 2 y 3 ’x + y 2 y 3 x’ + y 1 ’y 2 ’x’ Z = y 2 y 3 Y 1 = y 1 x+y 1 ’x’ Y 2 = y 3 x’ Y 3 = y 2 ’y 3 ’ Z = y 1 ’y 2 ’y 3 ’ s y1y1y1y1 y2y2y2y2 y3y3y3y31000 2001 3010 4011 5100 6101s y1y1y1y1 y2y2y2y2 y3y3y3y31110 2101 3100 4000 5001 6010

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.  = {B k }; B i  B j = , i  j; U i B i = S  = {B k }; B i  B j = , i  j; U i B i = S  Notations Subsets B k are called blocks Subsets B k are called blocks B  (s) denotes the block containing state s 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) 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 } R = { (s,t) | s R t }  Equivalence relation R Reflexive: for all s, s R s Reflexive: for all s, s R s Symmetric: if s R t, then t R s Symmetric: if s R t, then t R s Transitive: if s R t and t R u, then s R u 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, s=s 0,s 1,…,s n, for which s i   1 s i+1 or s i   2 s i+1  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 s’  t for all t in T implies that s’  s 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 S={1,2,3}  Lattice of partitions on S={1,2,3} {1,2,3}  {3}{2}{1} {1,2}{1,3}{2,3} {1,2,3} {1 | 2 | 3} {1 | 2,3} {1,2 | 3}{1,3|2}

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 A B B SP-partition:  = { 1,2 | 3,4,5 } = { 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 A B B SP-partition:  = { 1,2 | 3,4,5 } = { 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. 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 0 4444 2222 5555 6666 3333 1111

17 Observations  Lattice of SP-partitions shows all non-trivial parallel-serial decompositions of the FSM The lattice is a picture of FSM structure 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 FSMs can be classified according to their lattices

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

19 Parallel Composition  Definition. Given the state machines M 1 = (S 1, I,  1 ) and M 2 = (S 2, I,  2 ), M 1 = (S 1, I,  1 ) and M 2 = (S 2, I,  2 ), and the output function : S 1  S 2  I  O, and the output function : S 1  S 2  I  O, the parallel composition of M 1 and M 2 is the machine M = (S 1  S 2, I, O, , ), where  ((s 1,s 2 ), (x 1, x 2 )) = (  1 (s 1, x 1 ),  2 (s 2, x 2 )). the parallel composition of M 1 and M 2 is the machine M = (S 1  S 2, I, O, , ), where  ((s 1,s 2 ), (x 1, x 2 )) = (  1 (s 1, x 1 ),  2 (s 2, x 2 )). M M2M2 M1M1 I1I1 S1S1 S2S2 O

20 Serial Composition  Definition. Given the state machines M 1 = (S 1, I 1,  1 ) and M 2 = (S 2, I 2,  2 ) M 1 = (S 1, I 1,  1 ) and M 2 = (S 2, I 2,  2 ) with I 2 = S 1  I 1, a set of output symbols O, and an output function : S 1  S 2  I 1  O, then the serial composition of M 1 and M 2 with the output function is the machine M = (S 1  S 2, I 1, O, , ), where  ((s,t),x) = (  1 (s, x),  2 (t,(s,x))). with I 2 = S 1  I 1, a set of output symbols O, and an output function : S 1  S 2  I 1  O, then the serial composition of M 1 and M 2 with the output function is the machine M = (S 1  S 2, I 1, O, , ), where  ((s,t),x) = (  1 (s, x),  2 (t,(s,x))). M M1M1 M2M2 I1I1 S1S1 S2S2 O

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 M2M2 M1M1 I S1S1 S2S2 M M1M1 M2M2

24 Serial Decomposition (part 1) A B B SP-partition:  = { 1,2 | 3,4,5 } = { A,B }

25 Serial Decomposition (part 2) c a b Another partition:  = { 1,3 | 2,4 | 5 } = { a,b,c }

26 Serial Decomposition (part 3) M M1M2 M M1 M2

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 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 The resulting non-trivial partitions are the remaining partitions of the lattice of SP-partitions


Download ppt "FSM Decomposition using Partitions on States 290N: The Unknown Component Problem Lecture 24."

Similar presentations


Ads by Google