encoding xsxs 0101 aab00 bac00 cdc00 dab01 variant i a = 00 b = 01 c = 10 d = 11 variant ii a = 00 b...
Post on 19-Dec-2015
222 views
TRANSCRIPT
EncodingEncodingx
s0 1 0 1
A A B 0 0
B A C 0 0
C D C 0 0
D A B 0 1
Variant I
A = 00B = 01C = 10D = 11
Variant I
A = 00B = 01C = 10D = 11
Variant II
A = 00B = 11C = 01D = 10
Variant II
A = 00B = 11C = 01D = 10
21211 QQxQQD
2121212 QQxQxQQQxD
21QxQy
2121 QQxQxD
xD2
21QxQy
Variant IIVariant II
Variant IVariant I
Encodings
3 states - 3 encodings3 states - 3 encodings
4 states - 3 encodings4 states - 3 encodings
5 states - 5 states - 140 encodings140 encodings
7 states - 7 states - 840 encodings840 encodings
9 states - 9 states - More than 10 million encodingsMore than 10 million encodings
How to encode? How to encode?
Can we check all possible encodings?Can we check all possible encodings?
Partition reminder…
b =
Product of partitions a • b is the largest (with respect to
relation ) partition, that is not larger than a and b.
)3,5;2,6 ;1,4()3,5,6;1,2,4(a =
a • b = )3,5;6;2 ;1,4(
Sum of partitions…
Sum of partitions a + b is the smallest (with respect to
relation ) partition, which is not smaller than a and b.
9,8,7;6,5;4,3;2,1a
9;8,7;5,4;3,2;6,1b
9,8,7;6,5,4,3,2,1 ba
Substitution Property of a partition
Partition on set of states of machine M=<S, V, δ> has the substitution property (closed partition), when:
Partition on set of states of machine M=<S, V, δ> has the substitution property (closed partition), when:
mpipib
kkjip bvsvsbbssVvm
)),((),,(( ),,( ,
Partition has the substitution property when elements of a block under any input symbol transit to themselves or to other block of partition
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 automaton M with set of states S, |S| = n.To encode states we need Q1, ..., Qk memory elements (flip-flops).
If partition exist with substitution property and if r among k encoding variables Q1, ..., Qk, where
r = log2(,), is subordinated to blocks of partition such that all states
included in one block are denoted with the same variables Q1, ..., Qr , then
functions Q’1, ..., Q’r, are independent on remaining (k – r) variables.
Conversely, if first r variables of the next state Q’1, ..., Q’r (1 r < k)
can be determined from the values of inputs and first r variables Q1, ...,
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.
Given is automaton M with set of states S, |S| = n.To encode states we need Q1, ..., Qk memory elements (flip-flops).
If partition exist with substitution property and if r among k encoding variables Q1, ..., Qk, where
r = log2(,), is subordinated to blocks of partition such that all states
included in one block are denoted with the same variables Q1, ..., Qr , then
functions Q’1, ..., Q’r, are independent on remaining (k – r) variables.
Conversely, if first r variables of the next state Q’1, ..., Q’r (1 r < k)
can be determined from the values of inputs and first r variables Q1, ...,
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.
Serial Decomposition
Given is automaton M with set of states S. 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.
Given is automaton M with set of states S. 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.
f1(x,Q1) D1 f2(x,Q1,Q2) D2 f0(x,Q2)xx
q1q1 Q1
Q1 Q2Q2q2
q2 zz
Parallel Decomposition
Automaton M jest decomposable into two sub-automata M1, M2
working in parallel iff in the set of states S of this automaton there exist two non-trivial partitions 1, 2 with substitution
property such that
1 2 = (0)
Automaton M jest decomposable into two sub-automata M1, M2
working in parallel iff in the set of states S of this automaton there exist two non-trivial partitions 1, 2 with substitution
property such that
1 2 = (0)
f0(x,Q1,Q2)xx
f2(x,Q2) D2
q2q2
zzf1(x,Q1) D1
q1q1
Q1Q1
Q2Q2
Serial Decomposition - ExampleSerial Decomposition - Example
xs
0 1 0 1
A A F 0 0
B E C 0 1
C C E 0 1
D F A 1 0
E B F 1 1
F D E 0 0
s11s12s12
s12s11s11
10x
s
1
0
0
S11,0
1
1
0
S11,1
0
0
1
S12,0
0
1
0
S12,1
s21
s22
s23
S12,0
s23
s23
s21
S12,1
s23s22s23
s22s23s22
s23s21s21
S11,1S11,0in
s
FDCEBA ,,;,,1
= (0) = (0)
FECBDAτ ,;,;,
s11s11 s12
s12
s21s21 s22
s22 s23s23
State of the predecessor
machine
State of the predecessor
machine State of primary input x
State of primary input x
f1(x,Q1) D1 f2(x,Q1,Q2) D2f0(x,Q2)
xxq1
q1 Q1Q1 Q2
Q2q2q2 zz
s11s12s12
s12s11s11
10x
s
1
0
0
S11,0
1
1
0
S11,1
0
0
1
S12,0
0
1
0
S12,1
s21
s22
s23
S12,0
s23
s23
s21
S12,1
s23s22s23
s22s23s22
s23s21s21
S11,1S11,0x
s
Serial Serial Decomposition – Decomposition –
Example continuedExample continued
xs
0 1 0 1
A A F 0 0
B E C 0 1
C C E 0 1
D F A 1 0
E B F 1 1
F D E 0 0
FDCEBA ,,;,,1
FECBDAτ ,;,;,s21
s21 s22s22 s23
s23
s11s11 s12
s12
S11=ABES11=ABE
S21=ADS21=AD S12 =CDFS12 =CDF
M1 =M1 =
BCBC
EFEF
Parallel Parallel Decomposition-Decomposition-
ExampleExample
1 2 = (0)1 2 = (0)
s23s22s23
s21s23s22
s23s21s21
10x
s
s23
s21
s23
S11,1
s23
s21
s23
S12,1
s22s22s23
s23s23s22
s21s21s21
S12,0S11,0x
s
FDCEBA ,,;,,1 s11
s11 s12s12
FEDBCA ,;,;,2 s21
s21 s22s22 s23
s23
xs
0 1 0 1
A A F 0 0
B E C 0 1
C C E 0 1
D F A 1 0
E B F 1 1
F D E 0 0
ACAC
BDBD
EFEF
ABE CDF ABE CDFABE CDF ABE CDF
outxx
M2(2)yy
M1
Combining columns
Combining columns
Knowing both partitions we
can create table 2, next combining
columns with the same input X we obtain the table of
one of machines
Knowing both partitions we
can create table 2, next combining
columns with the same input X we obtain the table of
one of machines
M2M2
Decomposition Schemata
M1 M2() outxx
22 yy
outxx
M2(2)
yy
M1
Serial DecompositionSerial Decomposition
Parallel DecompositionParallel Decomposition
Calculating a closed partition
xs
0 1
A A F
B E C
C C E
D F A
E B F
F D E
A,BA,B
A,EA,E C,FC,F
C,DC,DFF EE
B,DB,D
A,CA,C E,FE,F
A,DA,D A,FA,F
A,BA,B
A,CA,C
A,DA,D
FD,C,;EB,A,1
FE,;DB,;CA,2
1
We create a graph of pairs of successors for various initial nodes.
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 i of set of states S of automaton M is compatible
with input, if for each state Sj S and for all vl 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 i of the set of states S of this
machine such that i
Some automata have a decomposition in which we use the autonomous clock - and sub-automaton that is not dependent on inputs.
Partition i of set of states S of automaton M is compatible
with input, if for each state Sj S and for all vl 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 i of the set of states S of this
machine such that i