160 likes | 194 Views
Encoding. V ariant I A = 00 B = 01 C = 10 D = 11. V ariant II A = 00 B = 11 C = 01 D = 10. V ariant II. V ariant I. 3 sta tes - 3 encodings. 4 sta tes - 3 encodings. Encodings. How to encode ?. Can we check all possible encodings?. 5 sta tes -. 140 encodings.
E N D
Encoding Variant I A = 00 B = 01 C = 10 D = 11 Variant II A = 00 B = 11 C = 01 D = 10 Variant II Variant I
3 states - 3 encodings 4 states - 3 encodings Encodings How to encode? Can we check all possible encodings? 5 states - 140 encodings 7 states - 840 encodings More than 10 million encodings 9 states -
Partition reminder… Product of partitionsa•b is the largest(with respect to relation ) partition, that is not larger than aandb. a = b = a• b=
Sum of partitions… Sum of partitionsa+b is the smallest (with respect to relation) partition, which is not smaller than aandb.
Substitution Property of a partition Partition on set of states of machine M=<S, V, δ> has the substitution property (closed partition), when: Partition has the substitution property when elements of a block under any input symbol transit to themselves or to other block of partition
Theorem Given is automatonMwith set of statesS, |S| = n. To encode states we need Q1, ..., Qkmemory elements (flip-flops). If partition exist with substitution property and if ramongkencoding variablesQ1, ..., Qk, wherer = log2(,), is subordinated to blocks of partition such that all states included in one block are denoted with the same variables Q1, ..., Qr , thenfunctionsQ’1, ..., Q’r, are independent on remaining (k – r) variables. Conversely, if firstrvariables of the next state Q’1, ..., Q’r (1 r < k) can be determined from the values of inputs and first rvariablesQ1, ..., Qr independently on values of the remaining variables, then there exists partition with substitution property such that two states si, sj are in the same block of partition if and only if they are denoted by the same value of the first r variables.
x q1 Q1 q2 Q2 z f1(x,Q1) D1 f2(x,Q1,Q2) D2 f0(x,Q2) Serial Decomposition Given is automatonMwith set of statesS. Sufficient and necessary condition of serial decomposition of M into two serially connected automata M1, M2 is existence of partition with substitution property and partition such = 0.
q1 f1(x,Q1) D1 Q1 z f0(x,Q1,Q2) x q2 Q2 f2(x,Q2) D2 Parallel Decomposition AutomatonM jest decomposable into two sub-automataM1, M2 working in parallel iff in the set of states S of this automaton there exist two non-trivial partitions 1, 2with substitution property such that 1 2 = (0)
in s S11,0 S11,1 S12,0 S12,1 S11,0 S11,1 S12,0 S12,1 x s 0 1 s21 s21 s23 s23 s21 0 0 1 0 s22 s23 s22 s22 s23 0 1 0 1 s11 s11 s12 s12 s12 s11 s23 s22 s23 s21 s23 1 1 0 0 Serial Decomposition - Example s12 s11 s21 s22 s23 = (0) State of the predecessor machine State of primary input x
x q1 Q1 q2 Q2 z f1(x,Q1) D1 f2(x,Q1,Q2) D2 f0(x,Q2) x s S11,0 S11,1 S12,0 S12,1 S11,0 S11,1 S12,0 S12,1 x s 0 1 s21 s21 s23 s23 s21 0 0 1 0 s22 s23 s22 s22 s23 0 1 0 1 s11 s11 s12 s12 s12 s11 s23 s22 s23 s21 s23 1 1 0 0 s12 s11 Serial Decomposition – Example continued s21 s22 s23 S11=ABE S12 =CDF S21=AD M1 = BC EF
x s S11,0 S12,0 S11,1 S12,1 x s 0 1 M1 s21 s21 s21 s23 s23 s21 s21 s23 s22 s23 s23 s21 s21 out y s22 s23 s21 x s23 s22 s22 s23 s23 s23 s22 s23 M2(2) Parallel Decomposition-Example s11 s12 s21 s22 s23 Knowing both partitions we can create table 2, next combining columns with the same input X we obtain the table of one of machines 1 2 = (0) ABE CDF ABE CDF AC BD M2 Combining columns EF
x 2 y M1 M2() out M1 out y x M2(2) Decomposition Schemata Serial Decomposition Parallel Decomposition
A,B B,D A,C A,E C,F E,F C,D A,D A,F Calculating a closed partition We create a graph of pairs of successors for various initial nodes. E F A,B A,C A,D
Dekompozycja z autonomicznym zegarem Some automata have a decomposition in which we use the autonomous clock - and sub-automaton that is not dependent on inputs. Partition iof set of statesSof automatonMis compatible with input, if for each stateSj S and for allvl V (Sj,v1), (Sj,v2), ..., (Sj,vl), ..., (Sj,vp), are in one block of partition i. A sufficient and necessary condition of existence of decomposition of automaton M, with an autonomous clock with log2() states is that there exists a closed partition and a non-trivial, compatible with input partition iof the set of states Sof this machine such that i