presentation on row reduction techniques
DESCRIPTION
Presentation on Row Reduction Techniques. Presented By : Name: Amit Grover Email : [email protected]. Topics covered in this presentation. What is Row Reduction. What are the reasons for doing Row Reduction What are state variables and external inputs. - PowerPoint PPT PresentationTRANSCRIPT
2
Topics covered in this presentation
• What is Row Reduction.
• What are the reasons for doing Row Reduction
• What are state variables and external inputs.• Algorithms used for row reduction
– For completely specified state machines.
• Pairchart
– For incompletely specified state machines
• Pairchart
• Skill algorithm
• Bargain hunter
• MEU Method
• Applications
3
What is Row Reduction ??
4
Definition
• Given a sequential machine, our aim is to find the finite state machine which have same behavior as the given machine but has reduced states.
5
Advantages of Row Reduction
• Cost Reduction– We know Flip Flops used as memory elements are costly and each
time a new state is added to the machine we are adding new memory element to it.
– Addition of this new element needs space in the logic circuits and thus increases the size of the logic circuit
– Adds cost the logic circuit
– These additions adds significant amount of cost to the Logic circuit and we don’t want that, so our aim is to reduce the cost as much as possible without effecting the functionality of the logic circuit.
6
State Variables and External Inputs.
External Inputs
00 01 11 10
1
2
3
4
Sta
te
Va r
i ab l
e s
7
Completely Specified Machines.
• A machine which has no don’t cares in its table is called a completely specified state machine (CSSM).
• Let’s see an example to find out what do we mean by having no don’t cares.
8
Completely Specified State Machine(CSSM)
2,0 3,1
4,1 1,0
2,0 1,1
3,1 6,0
6,0 5,1
4,1 5,0
1
2
3
4
5
6
Sta
t e
Va r
i ab
l es
External InputsA B
No don’t cares
9
Incompletely Specified State Machines (ISSM)
• Those machines whose next state or output has don’t care is called as ISSM.
• Let’s see with diagram what is ISSM.
10
Incompletely Specified State Machine (ISSM)
-,0 3,1
4,1 -,0
2,0 1,-
3,1 -,-
6,0 5,1
-,- -,0
1
2
3
4
5
6
Sta
te
Va r
i ab l
e sExternal InputsA B
11
Algorithms for Row Reductions
12
Completely Specified Machine
• Pairchart Algorithm.- Things given to you.
- Flow table.
- Aim is to reduce the number of rows as much as possible.Steps Involvedi. Draw Pairchart.ii. Check for output Incompatibility and cross out all those which are
incompatible.iii. Check for next state incompatibilities and cross out all those which are
incompatibles.iv. Repeat step iii till you get no next state incompatible state.!!These things will be more clear with a example which follows..
13
Given CSSM
2,0 3,1
4,1 1,0
2,0 1,1
3,1 6,0
6,0 5,1
4,1 5,0
1
2
3
4
5
6
A B
Figure 1
14
How to read CSSM
2,0 3,1
4,1 1,0
2,0 1,1
3,1 6,0
6,0 5,1
4,1 5,0
A B
• If you are in State 3 and input is A you go to State 2 with output 0.
• And so on……
• If you are in State 1 and input is A you go to State 2 with output 0.• If you are in State 1 and input is B you go to State 3 with output 1.
1
2
3
4
5
6
15
Step 1 for Pairchart Algorithm
• Look at the Maximum Number of States you have.– In our case it is 6. (Refer previous given CSSM).
– Now write the States from 1->6 horizontally in increasing order and from Top to Bottom in increasing order.
• This Step is shown in next slide….
16
Implementation of Step 1 of Pairchart Algorithm
1 2 3 4 5 6
1
2
3
4
5
6
Inc
reas
ing
Ord
er
Increasing Order
17
Step 2 of Pair Chart Algorithm
• We can remove half of the pairchart (diagonally) because it is symmetric along the diagonal.
• So we are effectively duplicating along the diagonal.
• So after removing half of the portion from diagonal, we get something like this.(shown in next slide).
18
Implementation of Step 2 of Pairchart Algorithm
1 2 3 4 5 6
1
2
3
4
5
6
Inc
reas
ing
Ord
er
Increasing Order
Cutting from diagonal
19
1 2 3 4 5 6
1
2
3
4
5
6
Inc
reas
ing
Ord
er
Increasing Order
Figure2 2,0 3,1
4,1 1,0
2,0 1,1
3,1 6,0
6,0 5,1
4,1 5,0
1
A B
2
3
4
5
6
20
Step 3 of Pairchart Algorithm
• Let’s start filling the Table in Figure 2.– Output Compatibility
• We will take one column at a time and will check if it is output compatible with each and every other state.
• Question comes what is output compatibility??– State 1 is Output Compatible with State 2 iff for same
input both gives same Output.
• Refer to next slide for better explanation..
21
1 2 3 4 5 6
1
2
3
4
5
6
2,0 3,1
4,1 1,0
2,0 1,1
3,1 6,0
6,0 5,1
4,1 5,0
1
A B
2
3
4
5
6
Column 1- Check if 1 is output compatible with 2 for both input A and B
Answer: No. For same Input A or B State 1 and State 2 has different output.
-So we put a cross in block at the inter section of 1 and 2.
X
22
1 2 3 4 5 6
1
2
3
4
5
6
2,0 3,1
4,1 1,0
2,0 1,1
3,1 6,0
6,0 5,1
4,1 5,0
1
A B
2
3
4
5
6
Column 1-check if 1 is output compatible with 3 for both input A and B
Answer: Yes. For same Input A and B State 1 and State 3 has same output.
-So we don’t do anything with the block at the inter section of 1 and 3.
X
23
1 2 3 4 5 6
1
2
3
4
5
6
2,0 3,1
4,1 1,0
2,0 1,1
3,1 6,0
6,0 5,1
4,1 5,0
1
A B
2
3
4
5
6
X
X
X
X
X
X
X
X
X
Similarly we will fill for all the blocks
24
Pairchart Algorithm continued…
• Refer to given flow table and take one column at
a time in the pairchart and fill each block in that column (excluding those blocks which are having ‘X’ sign) with, where the state representing that column will go when input A and B is given..
Refer to next slide for better explanation.
25
1 2 3 4 5 6
1
2
3
4
5
6
2,0 3,1
4,1 1,0
2,0 1,1
3,1 6,0
6,0 5,1
4,1 5,0
1
A B
2
3
4
5
6
X
X
X
X
X
X
X
X
X
Taking Column represented by state 1 - From pairchart, state 1 goes to state 2 with input A and to state 3 with input B.
2 3
2 3
- So we will write 2 and 3 in each block in column 1 and Row 1 as shown..
26
Pairchart algorithm continued..
• We will continue with all the rows and column and what we get is shown in next slide…
• Let’s see how that will look like.
27
1 2 3 4 5 6
1
2
3
4
5
6
2,0 3,1
4,1 1,0
2,0 1,1
3,1 6,0
6,0 5,1
4,1 5,0
1
A B
2
3
4
5
6
X
X
X
X
X
X
X
X
X
Taking next Column represented by state 2 - From pairchart, state 2 goes to state 4 with input A and to state 1 with input B.
2 3
2 3
4 1
4 1
- So we will write 4 and 1 in each block in column 2 and Row 2 (if no ‘X’) as shown..
28
1 2 3 4 5 6
1
2
3
4
5
6
2,0 3,1
4,1 1,0
2,0 1,1
3,1 6,0
6,0 5,1
4,1 5,0
1
A B
2
3
4
5
6
X
X
X
X
X
X
X
X
X
2 3
2 3
4 1
4 1
2 1
2 1
Taking next Column represented by state 3
- State 3 goes to 2 and 1 so we write it in column 3 and also in row 3 -> 2 and 1
- So we will write 2 and 1 in each block in column 2 and Row 2 (if no ‘X’) as shown..
29
1 2 3 4 5 6
1
2
3
4
5
6
2,0 3,1
4,1 1,0
2,0 1,1
3,1 6,0
6,0 5,1
4,1 5,0
1
A B
2
3
4
5
6
X
X
X
X
X
X
X
X
X
2 3
2 3
4 1
4 1
2 1
2 1
3 6
3 6
6 5 6 5
4 5 4 5
Lets fill the whole table accordingly
30
Pairchart Algorithm continued..
• So after filling out all the blocks in the pairchart what next…
• We need to check each and every block and see if that block is going to some other block which has a ‘X’. (Next State Compatibility)– If Yes then we cross this block.
– Else keep moving and check for other states.
• Let’s see how it looks like.
31
1 2 3 4 5 6
1
2
3
4
5
6
2,0 3,1
4,1 1,0
2,0 1,1
3,1 6,0
6,0 5,1
4,1 5,0
1
A B
2
3
4
5
6
X
X
X
X
X
X
X
X
X
2 3
2 3
4 1
4 1
2 1
2 1
3 6
3 6
6 5 6 5
4 5 4 5
Column 1 - Check each block in column 1 for e.g block at the intersection of 1 and 3.
Check Row 2 Column 2 and vice versa..
2 = 2, so it is okay.Reason is on Slide 17
Check Row 1 and Column 3 or vice versa.
In this case, (3,1) references itself, and is not yet X’d,
so it is okay.
32
1 2 3 4 5 6
1
2
3
4
5
6
2,0 3,1
4,1 1,0
2,0 1,1
3,1 6,0
6,0 5,1
4,1 5,0
1
A B
2
3
4
5
6
X
X
X
X
X
X
X
X
X
2 3
2 3
4 1
4 1
2 1
2 1
3 6
3 6
6 5 6 5
4 5 4 5
Column 1 continue…. - Checking next block in column 1 i.e block at the intersection of 1 and 5.
Check Row 2 Column 6.It does not have a ‘X’.
So Okay
Check Row 3 and Column 5 It does not have a ‘X’.
So Okay
33
1 2 3 4 5 6
1
2
3
4
5
6
2,0 3,1
4,1 1,0
2,0 1,1
3,1 6,0
6,0 5,1
4,1 5,0
1
A B
2
3
4
5
6
X
X
X
X
X
X
X
X
X
2 3
2 3
4 1
4 1
2 1
2 1
3 6
3 6
6 5 6 5
4 5 4 5
Column 2 - Check each block in column 2 for e g block at the intersection of 2 and 4.
Check Row 4 Column 3 and vice versa
It has a Cross So Mark This block with ‘X’Column 3 Row 4.
No Need to check this block further.
X
34
1 2 3 4 5 6
1
2
3
4
5
6
2,0 3,1
4,1 1,0
2,0 1,1
3,1 6,0
6,0 5,1
4,1 5,0
1
A B
2
3
4
5
6
X
X
X
X
X
X
X
X
X
2 3
2 3
4 1
4 1
2 1
2 1
3 6
3 6
6 5 6 5
4 5 4 5
Let’s fill the Whole Pairchart
X
x
35
Pairchart Algorithm continued..
• If you understand everything till this point then assume that you understand most of this algorithm.
• There is one last step still left for this algorithm.
• Guess what it can be…– Remember what was our aim!!!
• To reduce the number of states required to represent the same machine.
36
Pairchart Algorithm continued..
• It ‘s very easy..
– Draw the graph and link all those states which are compatible to each other with the help of pairchart.
– Let’s see how it looks like…
37
13
6
25
->Look at column 1 6 is compatible with none
Refer Pairchart on slide 35
-> Look at column 1 1 is compatible with 3 and 5-> Look at column 2 2 is compatible with 6
-> Look at column 3 3 is compatible with 5
-> Look at column 4 4 is compatible with none
-> Look at column 5 5 is compatible with none
4
38
Pairchart Algorithm continued..
• Now we need to build up the largest possible circle which covers as much states as possible.– It shows that 135 , 24 and 3 are the states
required to represent the same machine..– So let’s see how the new state machine looks
like..
39
Pairchart Algorithm continued..
13
6
25
4
40
Pairchart Algorithm continued..
26,0 135,1
4,1 135,0
135,1 26,0
135
26
4
A BNew State Assignment
-Refer to our original table and see where State (1 3 5) go for Input A . eg in our case it goes to 2 and 6 with output 0. and for input B it goes to 135.
2,0 3,1
4,1 1,0
2,0 1,1
3,1 6,0
6,0 5,1
4,1 5,0
1
A B
3
4
5
6
2
- Similarly we will do for 26 and 4.Note : - For 4 we have 3 but there is no state
as 3 but 3 is covered by 135 and thus we will write 135,1. Repeat for Input B.
41
Review of what we did till now
• Till Now we talked about – What State Reduction is..– We talked about Algorithm which can help us in
reducing the rows to reduce the cost of the machine for a given CSSM..
• What next ??? • Now we will talk about ISSM machines and
algorithms used for it…• If you really understood till this point it won’t be
difficult to understand the rest of stuff..
42
ISSM Algorithm
• ISSM Algorithm is continuation of CSSM pairchart algorithm..
• But there are some more additional algorithms..• Steps
– Pairchart (we already discussed)
– Skill algorithm( To get MC’s (Maximum Compatibility Sets)
– Bargain Hunter Algorithm.
– MEU
43
ISSM - Pairchart
• Since we had talked about Pairchart, I will skip the details and will proceed further.. – But one thing to keep in mind is that in ISSM
we have don’t cares and in the pairchart where ever we encounter don’t cares we write don’t cares directly..
– Example is shown in the next slide.
44
ISSM: Pairchart Algorithm
1 - 2 a - B
4 a 3 b - -
- - 3 b 8 -
1 - 2 - 5 -
3 - 7 - 5 -
- b - b - b
- - 6 - - a
2 - 4 - - b
1
2
3
4
5
6
7
8
A B CGiven:
451 2 3 4 5 6
1
2
3
4
5
6
1 - 2 a - B
4 a 3 b - -
- - 3 b 8 -
1 - 2 - 5 -
3 - 7 - 5 -
- b - b - b
- - 6 - - a
2 - 4 - - b
1
2
3
4
5
6
7
8
8
7
7 8
X
After Multiple Passes (Already discussed already)We come to final Table
X
X
X
X
X
X
X
X
X
X
X
X
X X X X
Shows that 2&3 state is
compatible to each other
46
Skill Algorithm
• This algorithms helps us to get minimal covering machine for ISSM.
• This algorithms gives the MC’s (Maximum Compatibility.
• Let’s see how it works…
47
Skill Algorithm Continued…
• It consists of different columns– Column K will consists of all the states we have in decreasing
order.
– Column Sk will contain all those states which are compatible with state in K (We have to refer or pairchart for that).
– We compare column Sk and L’ and concatenate state in column K with states which are common to Sk and L’.
– Compare Column L’ and states in previous row and its L column and find out all those states which are not covered by each other.
– Next slide will make these points much clear..
48
Skill Algorithm Continue..
K Sk L’ L
8 NULL NULL 8
7
6
5
4
3
2
1
MC’s
Refer Pairchart for State 8 in Column 8
8 is not compatible with any one so right NULL in Sk and L’ and 8 in L.
49
Skill Algorithm Continued..
K Sk L’ L
8 NULL NULL 8
7 NULL 7 7,8
6
5
4
3
2
1
Look forstates which
intersect
Concatenate 7 with states which
Intersects.In this case nothing intersect so
Put just 7 in L’
Nothing covers each other so
7 is not compatible with any one so..Sk will have NULL.
MC’s
Refer Pairchart for State 7 in Column 7
50
Skill Algorithm Continued..
K Sk L’ L
8 NULL NULL 8
7 NULL 7 7,8
6 7 67,6 67,8
5
4
3
2
1
Look for states which intersect
Concatenate 6 with states which intersects.In this case 7 intersects so It would be 67 in L’But 7 doesnot intersect with 8 so we will write
6 also in L’
67 covers 6 and 7 But not 8 so67,8 in L
6 is compatible with 7 so..Sk will have 7.
MC’s
Refer Pairchart for State 6 in Column 6
51
Skill Algorithm Continue..
K Sk L’ L
8 NULL NULL 8
7 NULL 7 7,8
6 7 67,6 67,8
5 67 567,5 567,8
4
3
2
1
Look forstates which
Intersects.
Concatenate 5 with states which intersects.In this case 67 intersects so L’ will have 567, 5
Remember we have to write 5 in L’ although it is covered by 567 but it will be taken care in
Column L.
567 covers 5,67But not 8 so567,8 in L
5 is compatible with 67 so..Sk will have 67.
MC’s
Refer Pairchart for State 5 in Column 5
52
Skill Algorithm Continued..
K Sk L’ L
8 NULL NULL 8
7 NULL 7 7,8
6 7 67,6 67,8
5 67 567,5 567,8
4 6 46,4 567,46,8
3
2
1
Look forstates which
Intersects.
Concatenate 4 with states which intersects.In this case 6 intersects so L’ will have 46,4 in L’.
46 covers 4so 567,8, 46in L
4 is compatible with 6 so..Sk will have 6.
MC’s
Refer Pairchart for State 4 in Column 4
53
Skill Algorithm Continued..
K Sk L’ L
8 NULL NULL 8
7 NULL 7 7,8
6 7 67,6 67,8
5 67 567,5 567,8
4 6 46,4 567,46,8
3 567 3567,3 46,3567,8
2
1
Look forstates which
Intersects.
Concatenate 3 with states which intersects.In this case 567 intersects so L’ will have 367,3
3567 covers 5,367 but not 8,46 so 3567,8, 46in L
3 is compatible with 567 so..Sk will have 567.
MC’s
Refer Pairchart for State 3 in Column 3
54
Skill Algorithm Continued..
K Sk L’ L
8 NULL NULL 8
7 NULL 7 7,8
6 7 67,6 67,8
5 67 567,5 567,8
4 6 46,4 567,46,8
3 567 3567,3 46,3567,8
2 347 24,237,2 46,24,3567,8,237
1
Look forstates whichIntersects.
Concatenate 2 with states which intersects.In this case 4,37 is common so
It would be 24,23,2 in L’
24,237 covers 2so 3567,8, 46,237,24in L
2 is compatible with 347 so..Sk will have 347.
MC’s
Refer Pairchart for State 2 in Column 2
55
Skill Algorithm Continued..
K Sk L’ L
8 NULL NULL 8
7 NULL 7 7,8
6 7 67,6 67,8
5 67 567 567,8
4 6 46 567,46,8
3 567 3567 46,3567,8
2 347 24,237 46,24,3567,8,237
1 4 14,1 46,8,3567,24,237,14
Look forstates which
Intersects.
Concatenate 1 with states which intersects.In this case 4 intersect so L’ will have 14,1
14 covers 1 so 3567,8,46,237,24,14in L
1 is compatible with 4 so..Sk will have 4.
MC’s
Refer Pairchart for State 1 in Column 1
56
Skill Algorithm continued..
– We are done with Skill Algorithm.– But still have Bargain Hunter algorithm.– Let’s take another ISSM and recalculate Skill
algorithm and then proceed with Bargain Hunter.
– Reason for taking another ISSM is because we will get better view of these algorithms.
57
1 2 3 4 5 6
1
2
3
4
5
6
-,0 - , - 4,-
-,0 -,0 3,-
1,1 2,- -,-
2,- 4,- -,-
-,- 4,1 -,1
5,- -,0 2,0
1
0
2
3
4
5
6
43
X
X
1 22 4
X
24
1 2
X
42 X
25
Pairchart Algorithm already seen
X
58
Skill Algorithm
K Sk L’ L
6 NULL 6 6
5 NULL 5 5,6
4 5 45 45,6
3 456 345,36 345,36
2 4 24 24,36,345
1 2456 16,145,124 124,16,145,345,36
MCs
Till this point we knew how to draw it..
59
Bargain Hunter Algorithm
• This Algorithms uses the MCs found from Skill algorithm as inputs and calculate CCs (Compatibility classes and CS (Compatible sets) we get PCs(Prime compatibles).
• This how flow of algorithms are correlated.• MCs(Skill Algorithm) ->Bargain Hunter
(PCs) ->MEU->Minimal Covering Machine.
60
Bargain Hunter Algorithm
• Steps 1– Create CCs from MCs.
• Take each MC from highest to lowest and take all possible combinations of those MCs to get CC.
• Next slide will explain this in a better way.
61
Bargain Hunter Algorithm
MCs ->124,16,145,345,36 from SKILL AlgorithmCC
345
124
145
36
16
34
35
45
12
14
24
15
3
4
5
1
2
6
MCs from Skill Algorithm
All Possible Subsets of MCs
62
Bargain Hunter continued..
• Step 2.– Now we will take each CC one at a time and
will look at the table (given to us) and check where each CC goes if we give input as 0 , 1 ,2.
– Let’s see how it looks like.
63
Bargain Hunter Algorithm
CC Inputs
0 1 2
CS
345 12 24 -
124 2 4 34
145 2 4 4
36 15 2 2
16 5 - 16
34 12 24 -
35 1 24 -
45 2 4 -
12 - - 34
14 2 4 4
24 2 4 3
15 - 4 4
3 1 2 -
4 2 4 -
5 - 4 -
1 - 4 -
2 - - 3
6 5 - 2
-,0 - , - 4,-
-,0 -,0 3,-
1,1 2,- -,-
2,- 4,- -,-
-,- 4,1 -,1
5,- -,0 2,0
1
2
3
4
5
6
0 1 2
64
Bargain Hunter Algorithm
CC Inputs
0 1 2
CS
345 12 24 -
124 2 4 34
145 2 4 4
36 15 2 2
16 5 - 16
34 12 24 -
35 1 24 -
45 2 4 -
12 - - 34
14 2 4 4
24 2 4 3
15 - 4 4
3 1 2 -
4 2 4 -
5 - 4 -
1 - 4 -
2 - - 3
6 5 - 2
-,0 - , - 4 ,-
-,0 -,0 3,-
1,1 2,- -,-
2,- 4,- -,-
-,- 4,1 -,1
5,- -,0 2,0
1
2
3
4
5
6
0 1 2
Similarly we can do for all CCs
65
Bargain Hunter Algorithm
• Step 3– Time to calculate CS
• Way we calculate CS is– Ignore all the singletons like 2,3,1,4,5,6 etc.
– For each Row see corresponding block when Input is
0 ,1 ,2 and copy all those values which does not cover each other.
– Let’s see diagram to find out what is it all about.
66
Bargain Hunter Algorithm
CC Inputs
0 1 2
CS
345 12 24 - 12,24
124 2 4 34 34
145 2 4 4 NULL
36 15 2 2 15
16 5 - 16 24
34 12 24 - 12,24
35 1 24 - 24
45 2 4 - NULL
12 - - 34 34
14 2 4 4
NULL
24 2 4 3 NULL
15 - 4 4 NULL
3 1 2 - NULL
4 2 4 - NULL
5 - 4 - NULL
1 - 4 - NULL
2 - - 3 NULL
6 5 - 2 NULL
-,0 - , - 4,-
-,0 -,0 3,-
1,1 2,- -,-
2,- 4,- -,-
-,- 4,1 -,1
5,- -,0 2,0
12
3
4
5
6
0 1 2
67
Bargain Hunter Algorithm
CC Inputs
0 1 2
CS
345 12 24 - 12,24
124 2 4 34 34
145 2 4 4 NULL
36 15 2 2 15
16 5 - 16 24
34 12 24 - 12,24
35 1 24 - 24
45 2 4 - NULL
12 - - 34 34
14 2 4 4
NULL
24 2 4 3 NULL
15 - 4 4 NULL
3 1 2 - NULL
4 2 4 - NULL
5 - 4 - NULL
1 - 4 - NULL
2 - - 3 NULL
6 5 - 2 NULL
-,0 - , - 4,-
-,0 -,0 3,-
1,1 2,- -,-
2,- 4,- -,-
-,- 4,1 -,1
5,- -,0 2,0
12
3
4
5
6
0 1 2
IgnoreSingleton
Similarly for all other Rows we can find CS
68
Bargain Hunter Algorithm
• Step 4– Now it’s time to apply bargain method– Copy only CC and CS Column because you
don’t need any other column.• The way it works is that we try to get the best deal.
– What I mean is that if some one is giving you apples for $2 and also for $4 then you go for the one with $2 and delete $4 entry..
– The same concept works for us as shown in next slide.
69
Bargain Hunter Algorithm
CC CS
345 12,24
124 34
145 NULL
36 15
16 24
34 12,24
35 24
45 NULL
12 34
14 NULL
24 NULL
15 NULL
3 NULL
4 NULL
5 NULL
1 NULL
2 NULL
6 NULL
CC 145 is better than CC 45
CC 124 is better than CC 12
CC 145 is better than CC 14 CC 145 is better than CC 15
CC 145 is better than CC 4
CC 145 is better than CC 5
CC 145 is better than CC 1
CC 24 is better than CC 2
You can’t remove 6 because of 16 because 6 gives NULL but 16 is coming with some cost (CS 24)
Better deal because CC 345 gives us CS 12, 24 but CC 34 gives 12 , 24 so of course 345 is better than 34 because it is larger than 34
70
Bargain Hunter Algorithm
CC CS PC
345 12,24 345
124 34 124
145 NULL 145
36 15 36
16 24 16
35 24 35
24 NULL 24
3 NULL 3
6 NULL 6
Prime Compatibles
Those CCs which are left are our PCs
71
Now it’s time for MEU method
– Steps:• We start with NULL set.• Uresin class will be all state singletons (i.e., {q}, q is a state)
– We will count the number of occurrences of each state in the PCs
» Then we choose the state with least number of occurrences.» We check what all PCs cover this state » We take each PC and calculate its Uresin class» Uresin class consists of all states and (class set) sets that
were in the previous Uresin class but not a subset of the current PC, together with any set in the class set of the current PC that is not a subset of (possibly equal to) an earlier PC.
» This will be more clear with the diagram in next slide.
72
MEU Method PCs : 345, 124, 145, 36 ,16 ,35, 24, 3,6
NULL
(1,2,3,4,5,6)
3 2 4 4 3 3
Starting Point
Uresin class
Number of occurrencesin PCs
PCs : 345,124,145,36,16,35,24,3,6
State 2 is occurring the least.choose 2 and write all those PCs which covers 2 i.e PC 24,124
24
124
Number of times 1 is coming is 3
73
MEU MethodPCs : 345, 124, 145, 36 ,16 ,35, 24, 3,6
NULL(1,2,3,4,5,6)
24(1,3,5,6)
3 4 3 3
(34,5,6)
36
16
6
345
Uresin class
PC 24 has CS NULL and
includes 2 and 4 but not 1,3,5,6
so Uresin of 24 is (1,3,5,6)
PC 124 has CS 34 and thus
includes 1,2 3,and 4
but not 5,6
so Uresinof 124 is (34,5,6)
Uresin class
124
Number of occurrencesin PCs
1, 3, 3
We will choose 1/5/6 I am choosing right mostYou can choose whatever you want
We will choose 34Left most
74
MEU Method
NULL(1,2,3,4,5,6)
24(1,3,5,6)
(34,5,6)
36
16
6
345
PCs : 345,124,145,36,16,35,24,3,6
PC 36 has CS 15 and thuswhen compared with previous PC24’s Uresin class
It includes everything
So it’s Uresin is 15
124
(15)
PC 16 has CS 24, but 24 does not appear
in the Uresin class of 16 because 24 is contained
in earlier node 24. That’s why this node is NOT eliminated by P1 - see Pruning Principle
slides below).
PC 6 has CS NULL and thus
when compared with previous PC24’s Uresin class
It includes 6 but not 1,3,5
thus it’s Uresin is 1,3,5
(1,3,5)PC 345 has
CS 12,24 and Observe that it covers previous
PC 124 completely.It shows that Uresin will
be 6 only(6)
PC CS
345 12,24
124 34
145 NULL
36 15
16 24
35 24
24 NULL
3 NULL
6 NULL
(3,5)
75
MEU MethodPCs : 345, 124, 145, 36 ,16 ,35, 24, 3,6
NULL(1,2,3,4,5,6)
24(1,3,5,6)
(34,5,6)
36
16
6
345
PCs : 345,124,145,36,16,35,24,3,6
124
(15)
(1,3,5)
(12,24,6)
145(NULL)
PC 145 has CS NULL and it
Covers his previous PC36’s Uresin class
completelySo it’s Uresin is NULL
Since there is nothing else So no need to check other
PC’s, we will stop here and will go
ahead to create Minimum
Covering machine
15 is covered by145
Minimum covering machine
(3,5)
76
Minimum Covering Machine
- We saw that PC’s 24,36,145 will form the minimal covering machine.- To create minimum covering machine we will draw a table with states 24, 36145 and we will see that when we give input 0,1,2 then where will these states go.- Let’s see how they look like.
77
Minimal covering machine-,0 - , - 4,-
-,0 -,0 3,-
1,1 2,- -,-
2,- 4,- -,-
-,- 4,1 -,1
5,- -,0 2,0
1
2
3
4
5
6
145
24
36
0 1 2Input
States
0 1 2
State 1 4 and 5 goes to state 2. when Input is 0 and State 2 is
covered by state 24 in our minimal cover machine so we will write 24 and output is 0
24,0
78
Minimal covering machine-,0 - , - 4,-
-,0 -,0 3,-
1,1 2,- -,-
2,- 4,- -,-
-,- 4,1 -,1
5,- -,0 2,0
1
2
3
4
5
6
145
24
36
0 1 2Input
States
0 1 2
State 1 4 and 5 goes to state 2 when Input is 1 and state 4 is
covered by state 24 in our minimal cover machine so we will write 24 and output is 1
24,0 24,1
79
Minimal covering machine-,0 - , - 4,-
-,0 -,0 3,-
1,1 2,- -,-
2,- 4,- -,-
-,- 4,1 -,1
5,- -,0 2,0
1
2
3
4
5
6
145
24
36
0 1 2Input
States
0 1 2
State 145 goes to state 4 when Input is 0 and state 2 is
covered by state 24 in our minimal covering machine so
we will write 24 and output is 1
24,0 24,1 24,1
80
Minimal covering machine-,0 - , - 4,-
-,0 -,0 3,-
1,1 2,- -,-
2,- 4,- -,-
-,- 4,1 -,1
5,- -,0 2,0
1
2
3
4
5
6
145
24
36
0 1 2Input
States
0 1 2
24,0 24,1 24,1
24,0 36,124,0
24,024,0145,1Similarly we will fill for all the states
81
Pruning Principles for the MEU Method
82
Rules to prune the MEU Branches• I am going to discuss only 2 rules here
– First Pruning Principle (P1):• We can prune any node in MEU whose latest CC
covers an earlier CC in its label. Why? Because:– The covered CC will be a redundant member of any
closed cover this node eventually leads to. No such closed cover can therefore be minimal.
– Second Pruning Principle (P2):• We can remove any node whose Uresin class
contains a PC in its label– Because each branch from that node eventually becomes
pruned by the first pruning principle.
83
Pruning Principles continued...
• These pruning principles need an example that clearly demonstrates how they work.
• The example we discussed before does not display pruning principles, so I am taking and example from Prof Ellison’s book to show it with animation as to how to apply these pruning principles.
84
Things given to us..
• Now in this example I am going to skip the basic algorithm because we had already seen two examples previously as to how to make MEU diagram.
• In this example I assume that we are given CCs and their corresponding CSs.
85
MEU Pruning ExampleCC CS
1345 124,26,56
156 145,246
124 13,26
126 14,15,24
345 24
145 NULL
134 12,26,56
56 45
16 15,24
15 14
24 13
12 26
26 14
34 NULL
2 NULL
6 NULL
Assuming this Table is given to us.
Next Slide only demonstrate How to apply Pruning Principles
Details discussed before are not repeated.
86
MEU Example illustrating Pruning Principles
NULL(1,2,3,4,5,6)
1345
(124,26,56)
345
(24,1,6)
134 ( 12,26,56)
34( 1,2,5,6)
124(26,56)
124(13,26)
24(13,6)
126(15,24,56)
26(12,56)
Omitted (see book for complete exampleHad to be completed
in accord with breadth-first principle.
IncompleteCan be finished as shown
in previous examples.
1345 X P1
134(12,26,56)
124(15,56)
24(15,56)
156 X P2 (145,246,12)
56(45,12)
Uresin
Pruned by P1because CC
1345 contains earlier node,
345
Pruned by P2because the Uresin
class of CC 156 has member 246
that covers earlier node, 26
87
References
• Techniques in Advanced Logic Switching Theory book by Prof. Ellison
• Examples are taken from Discussion sessions and class lectures and above mentioned book for easy understanding for future students.
88
Declaration
• I alone prepared and wrote this project. I received no help from any one else. This material is not copied or paraphrased from any other source except where specifically indicated. I grant my permission for this project to be placed on the course homepage during future semesters. I understand that I could receive an F for the course retroactively, even after graduation, if this work us later found to be plagiarized.
Amit Grover