Professional Documents
Culture Documents
Sequential Networks
Sequential Networks
Combinatorial Network
Sequential Network
Sequential machine
Automata
Automaton Finite
Deterministic
Mathematical model of a system
performing a class of mappings
1. | In | = d |Out | = d
1. Minimization of # of states
Equivalent states (completely defined automata)
Compatible states (incompletely defined automata)
3. Decomposition of automata
Combinational and Sequential Network
SN = Logic network with memory
Memory element = Flip-flop x1 z1
.. ..
CN – combinational network . .
xl CN zm
y1
SN – sequential network
yn
Out(CN) = f (Present In)
Out(SN) = f (Present In, Past In) M
Past In determines States of SN
(t) (t)
q(t) q(t)
CN M CN M CN
Mealy Moore
Representation of Finite Automata
1. Functional description
State function f
Output function g
4. Transition matrices
Representation of Binary Adder
xi si Mealy automata
yi
ci-1 ci
Inputs States
xi , yi 00, 01, 10, 11 1. q0 - no carry
Outputs 2. q1 - carry
Z 0,1 Q q0 , q1
State Functions
f (q0 ,11) q1 f (q1 , 01, 10, 11) q1 q1 = carry
f (q0 , 00, 01, 10) q0 f (q1 ,00) q0 q0 carry
ci-1 xi yi ci si Z q0, 11
0 11
000 00 0 1 01 q1, 01, 10, 11 = q1
1 10
001 01 1 1 11
010 01 1
011 10 2
0 00 q0, 00, 01, 10
100 01 1
0 01 = q0
101 10 2 q1, 00
0 10
110 10 2 1 00
111 11 3
Output Functions
g (q0 , 00, 11) 0 g (q0 , 01, 10) 1 xi yi ci 1 z
g (q1 , 00, 11) 1 g (q1 , 01, 10) 0
q0, 01, 10
g=1 q0 0 01 g q , 00, 11 =1
0 10 1
q1 1 00
1 11
Binary Adder
Assignment of states = Out Moore
00 00
q00 11 q10
01
11 Moore
00 00 11
01
q01 q11
00
01 11
Representation of Vending Machine
q0 x1x2 = 01 q1 z1z2 = 00
No money In = 50 Received 50 Out = 00
q2 x1x2 = 10 q0 z1z2 = 11
Received 100 In = 100 No money Out = drink and change
State Diagram for Vending Machine
00/00 01/00 00/00
q0 q1
10/10
10/00
10/11 01/10 01/00
q2
00/00
q0 x1x2 = 01 q1 z1z2 = 00
No money In = 50 Received 50 Out = 00
q2 x1x2 = 10 q0 z1z2 = 11
Received 100 In = 100 No money Out = drink and change
Complexity of Sequential Networks
Optimal coding possible if sequential network is simple
Features
More FFs than in min encoding
Sequential network is faster
R=4 q0 = (1000)
q1 = (0100)
q2 = (0010)
q3 = (0001)
State Assignment (Example)
x1 x2
q 00 01 11 10 q y1 y2 y 3 y1 y2 y3 y1 y2 y3
1 1 4 3 1 1 001 000 000
2 1 4 4 1 2 010 001 001
3 1 4 5 8 3 011 010 011
4 1 4 6 8 4 100 011 010
5 8 8 7 8 5 101 100 110
6 8 8 8 8 6 110 101 111
7 1 1 1 1 7 111 110 101
8 1 1 2 1 8 000 111 100
Direct encoding
Direct Coding
x1 x2
q y1 y2 y3 00 01 11 10 x1 x2 y1 y2 y3
1 001 001 100 011 001 11 0 0 1
2 010 001 100 100 001 y2 11 1 0 0
3 011 001 100 101 000 11 1 0 1
4 100 001 100 110 000 11 0 0 0
5 101 000 000 111 000
6 110 000 000 000 000 Y2 x1 x2 y 2
7 111 001 001 001 001
8 000 001 001 010 001
x1 x2 ( y1 y 2 y3 y1 y 2 y3 y1 y 2 y3 y1 y 2 y3 ) x1 x2 ( y1 y2 y1 y2 ) x1 x2 y2
y1 y2
y1 y2
Functions for Different Assignments
Y1 y1 y 2 x2 y1 y 2 y3 x2 y1 y3 x1 x2 y1 y 2 x1 x2
Y2 y2 x1 x2
Y3 y1 y3 x2 y1 y2 y3 y2 y3 x1 x2 y3 x1 x2 y1 x1 x2 y1 y2 y3 x1 y1 y2 y3 x1
Y1 y1 y2 y1 y2 x1
Y2 y1 y2 y2 x2 y1 x1 x2 y1 y2 x1 x2
Y3 y1 y 2 x2 y3 x1 x2 y1 x1 x2 y1 y 2 x1 x2 y 2 x1 x2
Y1 y1 y2 y2 x1
Y2 y1 x2
Y3 y3 x1 x2
Comparison of Different Assignments
C1 C2 C3
AND 12 11 4
OR 2 3 1
NOT 5 4 2
Gates 19 18 7
In 47 36 11
Algorithms for State Assignment
Heuristic algorithms
Sequential machine = SM
Specified
SM
Completely Incompletely
States
Equivalent Compatible
Completely Specified SM
Given SM, transition table uniquely specified
Compatibility
1. Refleksive
2. Symmetric
3. Not necessarily transitive
C1 C2 C2 C1 C1 C1
0 1 0/0
1/0
C1 C2,0 C1,0 C1 0/11/0 C2
C2 C1,1 C1,0
C1={R,1} C2={R,2}
Compatible States (Further)
C1 C2 C2 C1
0 1 1/0
C1 C2,0 C2,0 0/0
C2 C1 1/0 C2
C1,1 C1,0
0/1
Incompletely Specified SM
0/- {0,1}
1/0 R 1/0
1/0 Specified SM cannot be minimized
0/1
1 2
0/0
Algorithm for Compatible States
b – closed cover
Equivalent States
A - Completely specified
Compatibility Equivalence
Reflexive Reflexive
Symmetric Symmetric
Not transitive Transitive
Ci – equivalence classes
If q1 q2 then f (q1 , σ) f (q2 , σ) σ
{C }= Closed cover b Factor automat has minimum number of s
i
Algorithm for Equivalent States
l
q1 q 2 g (q1 , σ) g (q2 , σ) |r|l l - equivalence
l 1 l l i
Reccurence
3. If then i l 1
l
4. Converngence
i-equivalent is equivalent
Equivalent States (Example)
Z 0,1
q 0 1 In y Y
In y Y
s000 s000,1 s100,0 0 000 000 1 000 100
s001 s000,0 s100,0
s010 s001,0 s101,0 0 001 000
s011 s001,0 s101,0
0 010 001
s100 s010,0 s110,1
s101 s010,0 s110,1
s110 s011,0 s111,1 1
s111 s011,0 s111,1 ( s 000 ) ( s 001 , s 010 , s 011 ) ( s100 , s101 , s110 , s111 )
0 001 000
0 000 000 / 1 4-th 0
q1 = s000
q2 = s001
q3 = s010, s011
q4 = s100, s101, s110, s111
Decomposition of Automata
1. Better understanding of the organisation of a system
2. Minimization of parts of the system
Minimization of the complete system is impossible
Decomposition
Serial Parallel
A1
A1 A2
A2
Serial Connection of Automata
A1 (Q1 , 1 , Z1 , f1 , g1 )
A2 (Q2 , 2 , Z 2 , f 2 , g 2 ) Z1 = 2
1 A1 A2 Z2
2 Z1 A
A (Q1 Q2 , 1 , Z 2 , f , g ) A1 - Master
A2 - Slave
f ((q, p), σ) ( f1 (q, σ), f 2 ( p, σ))
g ((q, p), σ) g 2 ( p, g1 (q, σ))
R S1, S2 ,..., Sk , Si Q
R = D(Q) if R = Cover(Q)
S1 S2 ... Sk Q, Si Q, i 1,2,..., k
D(Q) = Allowed D(Q) if , j 1,2,..., k f ( Si , ) S j
C = A·B
QA q1, A , q2, A ,..., qt , A QB q1, B , q2, B , ..., qz , B
QC QA QB
q 1, A , qB , qB QB ,..., qt , A , qB , qB QB is a SP-partition (QC)
q 0 1 Q = {A, B, C, D, E, F, G}
A B,0 C,0 Z(Q) = {(A), (B, C), (D, E), (F, G)}
B D,0 E,0
0 1
C E,0 D,0
D F,0 G,0 (A) P1 P2, P2 P2, P2 g (A) = y
E G,0 F,0 (B, C) P2 P3, P3 P3, P3
F A,0 A,0 (D, E) P3 P4, P4 P4, P4 T(A)
G A,1 A,1 (F, G) P4 P1, P1 P1, P1
Serial Decomposition (Parity Bit)
| Largest block | = 2 | QB | = 2 QB = {q1, q2}
q q1 q2
QC = QA·QB fC = ? gC = ?
P1 A A
P2 B C f((q1, p1), 0)
P3 D E q 0 1
(P1, q1) A A B,0 C,0
P4 F G
B D,0 E,0
fA(A,0) = B C E,0 D,0
D F,0 G,0
gA(A,0) = 0
E G,0 F,0
F A,0 A,0
(P2,q2) B f((q1, p1), 0) = q1
G A,1 A,1
g(q1, p1), 0) = 0
Serial Decomposition (States)
0 1
P1 P2 P3 P4 P1 P2 P3 P4
q1 q1,0 q1,0 q1,0 -,0 q1 q2,0 q2,0 q2,0 -,0
q2 q1,0 q2,0 q2,0 -,1 q2 q2,0 q1,0 q1,0 -,1
T(B)
Parallel Connection of Automata
A1 (1 , Q1 , Z 1 , f 1 , g 1 )
A2 (2 , Q2 , Z2 , f 2 , g2 )
A A1 A2 (1 2 , Q1 Q2 , Z1 Z2 , f , g )
f ((q1, q2 ), ( x1x2 )) ( f1 (q1, x1 ), f 2 (q2 , x2 ))
g ((q1, q2 ), ( x1, x2 )) ( g1 (q1, x1 ), g2 (q2 , x2 ))