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

Slides:



Advertisements
Similar presentations
CSCI 115 Chapter 6 Order Relations and Structures.
Advertisements

Longest Common Subsequence
Equivalence, Order, and Inductive Proof
Discrete Mathematics Lecture 5 Alexander Bukharovich New York University.
Representing Relations Using Matrices
Applied Discrete Mathematics Week 11: Graphs
Lecture 6 Hyperreal Numbers (Nonstandard Analysis)
Chapter 7 Relations : the second time around
Encoding xsxs 0101 AAB00 BAC00 CDC00 DAB01 Variant I A = 00 B = 01 C = 10 D = 11 Variant II A = 00 B = 11 C = 01 D = 10 Variant II Variant I.
Programming Language Semantics Denotational Semantics Chapter 5 Part II.
Sequential System Synthesis -- State Encoding. ENEE 6442 The State Encoding Problem > Goal: Given n states, assign a unique code (of length of at least.
1 Relations: The Second Time Around Chapter 7 Equivalence Classes.
Orderings and Bounds Parallel FSM Decomposition Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 10 Update and modified by Marek.
Preliminaries/ Chapter 1: Introduction. Definitions: from Abstract to Linear Algebra.
Programming Language Semantics Denotational Semantics Chapter 5 Part III Based on a lecture by Martin Abadi.
CSCI 3301 Transparency No. 9-1 Chapter #9: Finite State Machine Optimization Contemporary Logic Design.
1 Set Theory. Notation S={a, b, c} refers to the set whose elements are a, b and c. a  S means “a is an element of set S”. d  S means “d is not an element.
Transparency No. 8-1 Formal Language and Automata Theory Chapter 8 DFA state minimization (lecture 13, 14)
1 Partial Orderings Based on Slides by Chuck Allison from Rosen, Chapter 8.6 Modified by.
Relations Chapter 9.
Equivalence Relations MSU CSE 260. Outline Introduction Equivalence Relations –Definition, Examples Equivalence Classes –Definition Equivalence Classes.
Zvi Kohavi and Niraj K. Jha 1 Capabilities, Minimization, and Transformation of Sequential Machines.
Zvi Kohavi and Niraj K. Jha 1 Structure of Sequential Machines.
Lecture 23: Finite State Machines with no Outputs Acceptors & Recognizers.
Chapter 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
The Integers. The Division Algorithms A high-school question: Compute 58/17. We can write 58 as 58 = 3 (17) + 7 This forms illustrates the answer: “3.
MA4266 Topology Wayne Lawton Department of Mathematics S ,
8.3 Representing Relations Directed Graphs –Vertex –Arc (directed edge) –Initial vertex –Terminal vertex.
CS 321 Programming Languages and Compilers Lectures 16 & 17 Introduction to Formal Languages Regular Languages Lexical Analysis.
CS 267: Automated Verification Lecture 3: Fixpoints and Temporal Properties Instructor: Tevfik Bultan.
Sets, Relations, and Lattices
Mathematical Preliminaries
Sets and Subsets Set A set is a collection of well-defined objects (elements/members). The elements of the set are said to belong to (or be contained in)
CSCI 115 Chapter 8 Topics in Graph Theory. CSCI 115 §8.1 Graphs.
Problem Statement How do we represent relationship between two related elements ?
Chapter 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
Unit II Discrete Structures Relations and Functions SE (Comp.Engg.)
Copyright © Cengage Learning. All rights reserved. CHAPTER 8 RELATIONS.
Set Theory Concepts Set – A collection of “elements” (objects, members) denoted by upper case letters A, B, etc. elements are lower case brackets are used.
Relations and Functions ORDERED PAIRS AND CARTESIAN PRODUCT An ordered pair consists of two elements, say a and b, in which one of them, say a is designated.
UNIT 4 : State Minimization: Completely Specified Machines
MAT 2720 Discrete Mathematics Section 3.3 Relations
CSCI 115 Course Review.
Advanced Digital Designs Jung H. Kim. Chapter 1. Sets, Relations, and Lattices.
1 CMSC 250 Discrete Structures CMSC 250 Lecture 41 May 7, 2008.
Capabilities, Minimization, and Transformation of Sequential Machines
Relations Chapter 9 Copyright © McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill.
Representing Relations Using Digraphs
Chapter 5 Relations and Operations
Chapter 6 Order Relations and Structures
Fixpoints and Reachability
Unit-III Algebraic Structures
Introduction to Relations
Equivalence Relations
Cartesian product Given two sets A, B we define their Cartesian product is the set of all the pairs whose first element is in A and second in B. Note that.
LATTICES AND BOOLEAN ALGEBRA
CS201: Data Structures and Discrete Mathematics I
Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz
Introductory Material
Alternating tree Automata and Parity games
Equivalence Relations
Concurrent Models of Computation
Sungho Kang Yonsei University
Lecture 20: Dataflow Analysis Frameworks 11 Mar 02
Background material.
교환 학생 프로그램 내년 1월 중순부터 6월 초 현재 학부 2,3 학년?
Background material.
Relations: The Second Time Around
Foundations of Discrete Mathematics
Introductory Material
Presentation transcript:

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

Outline  Once upon a time…  Motivating example  Terminology  Definition of SP-partitions  Decomposition using SP-partitions  Computation of SP-partitions  Extensions for ND FSMs

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 y3y3y3y s y1y1y1y1 y2y2y2y2 y3y3y3y

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)

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

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 )

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 }

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.

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}

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) ]

Example A B B SP-partition:  = { 1,2 | 3,4,5 } = { A,B }

 -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  ’.

Example A B B SP-partition:  = { 1,2 | 3,4,5 } = { A,B }

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.

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

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

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

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.

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

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

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.

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

Parallel Decomposition (part 2) M M2M2 M1M1 I S1S1 S2S2 M M1M1 M2M2

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

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

Serial Decomposition (part 3) M M1M2 M M1 M2

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