35
Henry Selvaraj 1 As the last CC-list represents Maximum Compatible Classes we conclude: MCC0 = {B 4 ,B 7 ,} MCC1 = {B 4 ,B 5 ,B 6 }, MCC2 = {B 2 ,B 3 ,B 4 ,B 5 }, MCC3 = {B 0 ,B 1 ,B 3 }.

As the last CC-list represents Maximum Compatible Classes we conclude: MCC0 = {B 4 ,B 7 ,}

  • Upload
    alaina

  • View
    33

  • Download
    2

Embed Size (px)

DESCRIPTION

As the last CC-list represents Maximum Compatible Classes we conclude: MCC0 = {B 4 ,B 7 ,} MCC1 = {B 4 ,B 5 ,B 6 }, MCC2 = {B 2 ,B 3 ,B 4 ,B 5 }, MCC3 = {B 0 ,B 1 ,B 3 }. - PowerPoint PPT Presentation

Citation preview

Page 1: As the last CC-list represents Maximum Compatible Classes we conclude: MCC0 = {B 4 ,B 7 ,}

Henry Selvaraj

1

As the last CC-list represents Maximum Compatible Classes we conclude:

MCC0 = {B4,B7,}

MCC1 = {B4,B5,B6},

MCC2 = {B2,B3,B4,B5},

MCC3 = {B0,B1,B3}.

Page 2: As the last CC-list represents Maximum Compatible Classes we conclude: MCC0 = {B 4 ,B 7 ,}

Henry Selvaraj

2

The next step in calculating G is the process of selecting only a subset of MCCs that cover the set of all blocks of PG i.e. {B1,...,Bm}.

The MIN(M) represents partition G = {1,..., k} in the following way:

= {Bi1,Bi2

,...,Biq} forms a block of G if

and only if MCC.

Page 3: As the last CC-list represents Maximum Compatible Classes we conclude: MCC0 = {B 4 ,B 7 ,}

Henry Selvaraj

3

The final G is a result of adding the objects forming the set of blocks included in one block of G.

For the MCCs from Example 4.5, one of the minimal covers is:

{B7}, {B6}, {B2,B4,B5}, {B0,B1,B3}.

and the corresponding G is

G = (4,5,7; 8,10; 9,11,12,13,1; 14,15,2,3,6).

Page 4: As the last CC-list represents Maximum Compatible Classes we conclude: MCC0 = {B 4 ,B 7 ,}

Henry Selvaraj

4

Coding the MCCs

Coding of MCCs is necessary to generate the H table.

Page 5: As the last CC-list represents Maximum Compatible Classes we conclude: MCC0 = {B 4 ,B 7 ,}

Henry Selvaraj

5A simple example:

Decompose:100 1101 1111 1110 0010 0011 0000 0001 0

Let A = {x0} and B = {x1, x2}.P(B) = {(0,6)(1,7)(3,4)(2,5)}

MCC1: 0,1,3MCC2: 2

G table: 00 001 010 111 0

H table:00 010 101 011 0

Page 6: As the last CC-list represents Maximum Compatible Classes we conclude: MCC0 = {B 4 ,B 7 ,}

Henry Selvaraj

6

Non-Disjoint Decomposition: An another example

xxx y012 000 0010 0001 1011 1100 1110 1101 1111 0

xx0200 001 110 111 0

xx0100 001 010 111 0

00 001 110 111 1

y

Page 7: As the last CC-list represents Maximum Compatible Classes we conclude: MCC0 = {B 4 ,B 7 ,}

Henry Selvaraj

7

Tables with don’t cares

x0 x1 x2 y

012345

1 0 -1 - 10 1 -- 1 00 0 -0 - -

110000

Page 8: As the last CC-list represents Maximum Compatible Classes we conclude: MCC0 = {B 4 ,B 7 ,}

Henry Selvaraj

8

Desirable characteristics:1. The generated H table should be as simple as possible (should we try to retain as many “don’t cares” as possible? Should we try to introduce more “don’t cares”?).2. The generated truth table should facilitate “easier” finding of “good” decompositions further down the line.

Page 9: As the last CC-list represents Maximum Compatible Classes we conclude: MCC0 = {B 4 ,B 7 ,}

Henry Selvaraj

9

Coding procedure:Encoding MCCs (we will call it

classes (CCs) for simplicity).

Page 10: As the last CC-list represents Maximum Compatible Classes we conclude: MCC0 = {B 4 ,B 7 ,}

Henry Selvaraj

10.

x0x1x2x3x4 y0y1

0123456789

10111213141516

0 - 1 - - 0 - - 1 - - - - - 1 0 - - 1 0 0 1 0 0 - 0 - 0 - 1 1 - 1 0 1 1 - 1 1 0 0 0 - - 0 1 - - 1 1 1 0 - 1 0 0 - 0 0 0 1 - 0 0 1 1 - - 0 - 1 - - 0 0 1 1 0 - - 1 - 0 0 -

0 00 -0 -0 0- 1- 1- 11 1- 0- 01 11 -0 00 -- 00 0- 0

Let us decompose the table for B = {x0,x1,x3,x4}

Page 11: As the last CC-list represents Maximum Compatible Classes we conclude: MCC0 = {B 4 ,B 7 ,}

Henry Selvaraj

11

A subset of the Maximum Compatibility Classes that cover all the blocks of P(B) is:

CC(0) = {B9} = (7,10)

CC(1) = {B7} = (7,15)

CC(2) = {B6} = (0,8,11)

CC(3) = {B4} = (0,4,11)

CC(4) = {B3,B5,B8} = (0,1,2,3,8,9,13,14,15,16)

CC(5) = {B1} = (2,6,12,13,15,16)

CC(6) = {B0,B2} = (0,1,2,4,5).

Page 12: As the last CC-list represents Maximum Compatible Classes we conclude: MCC0 = {B 4 ,B 7 ,}

Henry Selvaraj

12

There are seven CCs and therefore seven codes are needed to encode each of them. If a cube is a member of two different classes, it is possible to encode the classes in such a manner so that the two codes differ only in one position. This leads to eventually encoding the cube found in both the classes with a code having one "don't care" value.

Page 13: As the last CC-list represents Maximum Compatible Classes we conclude: MCC0 = {B 4 ,B 7 ,}

Henry Selvaraj

13

Such an encoding procedure retains or some times even introduces "don't care" values in the G function and consequently in the H function also. This results in significantly reducing the space required to store the truth tables, and may reduce the number of blocks required to implement a function. A smaller table also reduces the calculation complexities.

Page 14: As the last CC-list represents Maximum Compatible Classes we conclude: MCC0 = {B 4 ,B 7 ,}

Henry Selvaraj

14

Therefore, first we look for the elements which are members of 2l-1 classes, where l is the number of bits in the code. If there is such an element, 2l-1 codes which differ only in l-1 positions are selected and if such codes are available they are allotted to the 2l-1 classes to which the element belongs. Then we look for the elements which are members of 2l-2 classes and continue the process till 2l-i equals 1, when the classes holding elements that belong to only one class are encoded.

Page 15: As the last CC-list represents Maximum Compatible Classes we conclude: MCC0 = {B 4 ,B 7 ,}

Henry Selvaraj

15

For the example under consideration, where l equals 3, the cube 0 belongs to four (2l-1) classes CC(2), CC(3), CC(4) and CC(6).

CC(2) : 010CC(3) : 011CC(4) : 001CC(6) : 000.

Page 16: As the last CC-list represents Maximum Compatible Classes we conclude: MCC0 = {B 4 ,B 7 ,}

Henry Selvaraj

16

As there is no other cube found in four classes, the cubes that belong to two (2l-2) classes are considered for further encoding. The following seven cubes are found in two classes: 1,4,7,8,11,13,16. First, cube number 1 is considered. The cube is found in CC(4) and CC(6). Since both the classes are already encoded and the codes differ only in one (l-2) position, nothing needs to be done.

Page 17: As the last CC-list represents Maximum Compatible Classes we conclude: MCC0 = {B 4 ,B 7 ,}

Henry Selvaraj

17

The next cube is taken for consideration, i.e. cube number 4, which is found in CC(3) and CC(6). Though both the classes are already encoded, the codes differ in more than one position and hence it is decided that cube four can not be encoded at this point and it is added to a set of cubes Z, which are to be encoded later.

Page 18: As the last CC-list represents Maximum Compatible Classes we conclude: MCC0 = {B 4 ,B 7 ,}

Henry Selvaraj

18

The next element, cube number seven is found in CC(0) and CC(1) and as neither CC is encoded, we look for 2(l-2) available codes which differ only in l-2 positions. Such codes are found and the classes are

encoded as follows:CC(0) : 100CC(1) : 101

Page 19: As the last CC-list represents Maximum Compatible Classes we conclude: MCC0 = {B 4 ,B 7 ,}

Henry Selvaraj

19

The case for the cube 8 is similar to the case of cube 4 and hence it is added to the

set Z. Cube 11 is encoded in a similar way as cube 1. The cubes 13 and 16 have one CC encoded already and there is no

second code available, which differs only in one position with respect to the

accepted code. Therefore both the cubes 13 and 16 are added to the set Z.

Page 20: As the last CC-list represents Maximum Compatible Classes we conclude: MCC0 = {B 4 ,B 7 ,}

Henry Selvaraj

20

Now, the classes holding the elements which belong to only one class are encoded, if they are already not encoded. Thus:

CC(5) : 111

Page 21: As the last CC-list represents Maximum Compatible Classes we conclude: MCC0 = {B 4 ,B 7 ,}

Henry Selvaraj

21

x1 x4 x0 x3 g'0 g'1 g'2

012345678910111213141516

- - 0 -- - 0 1- 1 - -- 0 0 11 - 0 0- 1 0 -- 1 1 0- 0 1 10 0 0 -- 1 1 10 0 1 1- 0 0 0- 1 1 0- - 1 0- 0 1 01 - 1 -- - 1 0

0 - -0 0 -

not coded0 0 1

not coded0 0 01 1 11 0 -

not coded0 0 11 0 00 1 -1 1 1

not coded0 0 1

not codednot coded

Page 22: As the last CC-list represents Maximum Compatible Classes we conclude: MCC0 = {B 4 ,B 7 ,}

Henry Selvaraj

22

Encoding CubesThe encoding method discussed so far has encoded the Compatible Classes in such a way that the cubes 4,8,13 and 16 (elements of the set Z), which belong to more than one CC have inconsistent codes. Moreover, there may be cubes which belong to more than one CC but not to 2(l-i) number of classes. These cubes also have inconsistent codes for obvious reasons. In the example under consideration there are two cubes (2 and 15) each of which belongs to three classes. These cubes are also added to the set Z of non-encoded cubes.

Page 23: As the last CC-list represents Maximum Compatible Classes we conclude: MCC0 = {B 4 ,B 7 ,}

Henry Selvaraj

23

Step 1:Two sub-cubes are obtained by splitting a cube at a position where a "-" appears. The truth table of the G function is searched if both the sub-cubes have been encoded already. If not, a different pair of sub-cubes are obtained by splitting the cube at a different position and the search is continued until codes are found for a pair of sub-cubes. If this step does not yield any result step two is executed.

Page 24: As the last CC-list represents Maximum Compatible Classes we conclude: MCC0 = {B 4 ,B 7 ,}

Henry Selvaraj

24

Step 2:Step two is similar to step one with a difference that this time instead of searching the truth table G, each sub-cube is compared with the product of all the elements of a CC and if the sub-cube is compatible to the product it is said that the sub-cube is encodable. If both the sub-cubes are encodable, the codes of the respective compatible classes are accepted as the codes for the sub-cubes.

Page 25: As the last CC-list represents Maximum Compatible Classes we conclude: MCC0 = {B 4 ,B 7 ,}

Henry Selvaraj

25

Step 3:If step two does not produce any result, step three accepts even if only one sub-cube is encodable and allots the code of the compatible CC to the sub-cube concerned. The other sub-cube is added to the set Z as a non-encoded cube for further splitting.

Page 26: As the last CC-list represents Maximum Compatible Classes we conclude: MCC0 = {B 4 ,B 7 ,}

Henry Selvaraj

26

Step 4:If step 3 has also failed to produce any satisfactory result, then the given cube is split at the most significant position where a "-" is found and both the sub-cubes are added to the set of non-encoded cubes Z to be split further.

Page 27: As the last CC-list represents Maximum Compatible Classes we conclude: MCC0 = {B 4 ,B 7 ,}

Henry Selvaraj

27

Step 5:Repeated failed execution of steps one through four may produce cubes with no "-". Under such a situation the codes of the Maximum Compatible Classes of all the cubes in the table G compatible to the cube under consideration are collected. Each code is treated as a potential candidate code and if a code is consistent, then it is accepted. It is worth noting that this kind of situation may arise when there are two intersecting cubes.

Page 28: As the last CC-list represents Maximum Compatible Classes we conclude: MCC0 = {B 4 ,B 7 ,}

Henry Selvaraj

28

Step 6:

If step 5 fails, then the cube ought to belong to a CC which has not been allotted a code by the method described in 4.3. Therefore the CC to which the given cube belongs is given any available code.

Page 29: As the last CC-list represents Maximum Compatible Classes we conclude: MCC0 = {B 4 ,B 7 ,}

Henry Selvaraj

29

If a cube is allotted a code in step three or four, its consistency with the table G is verified before

proceeding further. The consistency of the final table is checked as still there may be inconsistency because of intersecting cubes. In case such a pair of inconsistent cubes are detected, the cube or cubes

encoded using the step two, three or four are considered as not encoded and the described six

step procedure is revoked once again to encode the cube or cubes.

Page 30: As the last CC-list represents Maximum Compatible Classes we conclude: MCC0 = {B 4 ,B 7 ,}

Henry Selvaraj

30

Reverting back to the example, the set of non-encoded cubes in the truth table G is: Z = {2,4,8,13,15,16}. The cube (--10) numbered 13 is initially split into two sub-cubes (0-10) and (1-10). As these sub-cubes are not encoded already, the next pair of sub-cubes (-010) and (-110) are verified. It is found that the cubes are encoded and their codes are:

-010 : 001 (row 14 in Table)-110 : 111 (row 12 in Table)

Step one does not yield any results for other elements of set Z.

Page 31: As the last CC-list represents Maximum Compatible Classes we conclude: MCC0 = {B 4 ,B 7 ,}

Henry Selvaraj

31

In step two, cube number four (1-00) is split as (1000) and (1100). The sub-cube (1000) is compatible to the product of all the elements of CC(3) and hence its code (011) is acceptable. The sub-cube (1100) is compatible to the product of all the elements of CC(6) and hence its code (000) is also acceptable. Since both the sub-cubes have acceptable codes, they are encoded as such. In the same way cube 8 is also encoded as:

0000 : 0100001 : 001

Page 32: As the last CC-list represents Maximum Compatible Classes we conclude: MCC0 = {B 4 ,B 7 ,}

Henry Selvaraj

32

Step three codes the cubes 2 and 15 as follows:

cube 2. -1-- 01-- : 000

11-- : not codedcube 15.1-1- 101- : -01 (compatible to CC(1) and CC(4))

111- : not coded

Execution of step three has left two more cubes to be encoded.

Page 33: As the last CC-list represents Maximum Compatible Classes we conclude: MCC0 = {B 4 ,B 7 ,}

Henry Selvaraj

33

The cube (11--) is encoded in step two as:

110- : 000111- : not coded

Now, the only cube left not encoded is (111-) and it is encoded in step two as:

1110 : 1111111 : 001

Page 34: As the last CC-list represents Maximum Compatible Classes we conclude: MCC0 = {B 4 ,B 7 ,}

Henry Selvaraj

34

As all the input cubes of the table G are encoded, the table is verified for any inconsistency. It is found that the cubes 2 and 6 are inconsistent:

cube 2. 01-- : 000cube 6. -110 : 111

Page 35: As the last CC-list represents Maximum Compatible Classes we conclude: MCC0 = {B 4 ,B 7 ,}

Henry Selvaraj

35

As cube 2 was encoded using step 3, annul its code and start encoding (01--) all over again from step one. In step three the following code is found:

010- : 000011- : not coded

One more run of the entire procedure for the cube (011- ) fetches the following codes for the cube (011- ) in step 5.

0110 : 1110111 : 001

No more inconsistency is detected and this ends the process of encoding.