21
Irredundant Cover After performing Expand, we have a prime cover without single cube containment now. We want to find a proper subset which is also a cover. (irredundant)

Irredundant Cover After performing Expand, we have a prime cover without single cube containment now. We want to find a proper subset which is also a cover

Embed Size (px)

Citation preview

Page 1: Irredundant Cover After performing Expand, we have a prime cover without single cube containment now. We want to find a proper subset which is also a cover

Irredundant Cover

• After performing Expand, we have a prime cover without single cube containment now.

• We want to find a proper subset which is also a cover. (irredundant)

Page 2: Irredundant Cover After performing Expand, we have a prime cover without single cube containment now. We want to find a proper subset which is also a cover

Irredundant Cover

• Proposition:

A set of cubes C covers a cube p if and only if

Cp is a tautology.

proof:

C p = p

=> (C p)p = pp

=> Cp pp = 1

=> Cp = 1

<=

=>

Cp = 1=> CP P = P=> C P = P

Page 3: Irredundant Cover After performing Expand, we have a prime cover without single cube containment now. We want to find a proper subset which is also a cover

Example

Ex: p = 1 1 2

C = 2 1 0 1 2 1

Cp = 2 2 0 2 2 1

Check tautology(Cp)

If (Cp) is a tautology, C covers p.

Page 4: Irredundant Cover After performing Expand, we have a prime cover without single cube containment now. We want to find a proper subset which is also a cover

Divide & Conquer by Cofactor Op.

111

ii

ii

xx

xixi

fandff

fxfxf

Tautology

Page 5: Irredundant Cover After performing Expand, we have a prime cover without single cube containment now. We want to find a proper subset which is also a cover

Property of Unate Function

• Proposition:

A unate cover is a tautology if and only if it contains a row of 2’s.

pf:

(<=) trivial

(=>) Assume the cover represent a monotone increasing function, the function contains 1’s and 2’s.

The minterm (0,0,....0) must be covered. Unless the cover contains (2,2,....2) , the minterm (0,0,...0) will not be covered.

Page 6: Irredundant Cover After performing Expand, we have a prime cover without single cube containment now. We want to find a proper subset which is also a cover

Tautology Check

1. speed-up by unate variables

Let F(x1,x2,...xn) , x1 : positive unate

– F(x1,x2,...xn) = x1A(x2,...xn) + B(x2,...xn)

A : terms with x1

B : terms without x1

Fx1 = A + B Fx1’ = B

– If (Fx1’ = B) is tautology, Fx1 = A + B is

a tautology.

– If (Fx1’ = B) is not a tautology, F is not a

tautology.

If x is positive unate, test if F is a tautology.

<=> Fx’ is a tautology

Page 7: Irredundant Cover After performing Expand, we have a prime cover without single cube containment now. We want to find a proper subset which is also a cover

Tautology Check

2. Other techniques

– a row of 2’s, answer ‘Yes’

– a column of all 1’s or all 0’s, answer ‘No’

– compute an upper bound on the no. of

minterms of on-set

Ex: number of minterms

0 2 0 1 2

1 1 2 2 4

1 2 1 1 2

2n = 16 > 8 answer ‘No’

– n 7, test by truth table

Page 8: Irredundant Cover After performing Expand, we have a prime cover without single cube containment now. We want to find a proper subset which is also a cover

A Possible Irredundant Cover Algorithm?

Page 9: Irredundant Cover After performing Expand, we have a prime cover without single cube containment now. We want to find a proper subset which is also a cover

Example of Irredundant Cover

a b c d e

F = 2 0 0 1 2

2 1 1 2 0

1 0 1 2 2

1 2 1 0 2

0 1 2 2 1

1 1 0 1 2

1 2 2 1 0

Page 10: Irredundant Cover After performing Expand, we have a prime cover without single cube containment now. We want to find a proper subset which is also a cover

Example

F covers C3 = 1 0 1 2 2 ? => Check tautology (F – C3) C3

a b c d e 2 2 2 0 2 on-set count=16 2 2 2 1 0 on-set count=8

16 + 8 < 32, not tautology C3 cannot be removed from the cover

F covers C7 = 1 2 2 1 0 ? => Check tautology (F – C7) C7

a b c d e 2 0 0 2 2

2 1 1 2 2 2 0 1 2 2

2 1 0 2 2

C7 can be removed from the cover

b b’

2 2 1 2 2 2 2 0 2 2

2 2 0 2 22 2 1 2 2

tautology tautology

Page 11: Irredundant Cover After performing Expand, we have a prime cover without single cube containment now. We want to find a proper subset which is also a cover

• Slides shown below are for your reference.

Page 12: Irredundant Cover After performing Expand, we have a prime cover without single cube containment now. We want to find a proper subset which is also a cover

Irredundant Cover

Primes in F

(1) relatively essential cube c of F (E)

F - {c} is not a cover

(2) redundant cubes

– Totally redundant (Rt)

a cube covered by relatively essential

cubes and Don’t care

– Partially redundant (Rp)

Page 13: Irredundant Cover After performing Expand, we have a prime cover without single cube containment now. We want to find a proper subset which is also a cover

Example

F ={c1,c2,c3}E = {c1,c3}Rt = {c2}Rp =

F ={c1,c2,c3,c4}E = {c1,c4}Rt = Rp = {c2,c3}

Ex:

c1

c2

c3

c1

c2

c4c3

Page 14: Irredundant Cover After performing Expand, we have a prime cover without single cube containment now. We want to find a proper subset which is also a cover

Irredundant Cover

(1) Check whether cubes are relatively essential

1. tautology (F-c)C

2. If not tautology (F-c)c , c is relatively essential.

(2) Check partially, totally redundant

1. tautology (E D)C (D : don’t care)

2. If yes, c is totally redundant

If no, c is partially redundant

Page 15: Irredundant Cover After performing Expand, we have a prime cover without single cube containment now. We want to find a proper subset which is also a cover

Irredundant Cover

(3) Minimal Irredundant (Rp)

•For each r Rp, define the minimal set S

such that (Rp - S) E D is NOT a cover

ex:

Rp = {c4,c3,c2}S4 ={{c4,c3}}S3 = {{c3,c4},{c3,c2}}S2 = {{c2,c3}}

• Find a minimum subset of partially irredundant set such that combining with relatively essential cubes, it forms a cover.

c1

c2

c4c3

c5

Page 16: Irredundant Cover After performing Expand, we have a prime cover without single cube containment now. We want to find a proper subset which is also a cover

Irredundant Cover

• Define a matrix B. Each rows corresponds to a Si

Bij = 1 if Rpj in Si

0 otherwise

Ex: Rp = {c4,c3,c2}

S4 = {{c4,c3}}

S3 = {{c3,c4},{c3,c2}}

S2 = {{c2,c3}}

c2 c3 c4

S4 1 1

S3.1 1 1

S3.2 1 1

S2 1 1

minimum column cover of B minimal irredundant cover

Page 17: Irredundant Cover After performing Expand, we have a prime cover without single cube containment now. We want to find a proper subset which is also a cover

Irredundant Cover

• Two things: 1. find minimal set S 2. find minimal column covering

Page 18: Irredundant Cover After performing Expand, we have a prime cover without single cube containment now. We want to find a proper subset which is also a cover

Find Minimal Set S

For each r in Rp, find all minimal sets S

(Rp - S) E D does not cover r

Tautology((Rp - S) E D)r is not a tautology.

Let A = (Rp)r B = (E

D)r

A B 1 determine all minimal subset S A

such that (A - S) B 1

Page 19: Irredundant Cover After performing Expand, we have a prime cover without single cube containment now. We want to find a proper subset which is also a cover

Find Minimal Set S

D = A = (Rp)r

taut(A) If A is a unate cover with (A 1), then

there must be at least one row of 2’s in thecover Atake S to be the set of all such cubes, then

A - S 1

Let E

else binate select xj

split Axj, Axj’

Sxj taut(Axj)

Sxj’ taut(Axj’ )

merge: S = Sx Sx’

(A-S) 1 (Ax -Sx) 1 OR

(Ax’ - Sx’) 1 )

(

Page 20: Irredundant Cover After performing Expand, we have a prime cover without single cube containment now. We want to find a proper subset which is also a cover

Irredundant Cover

Let A =(Rp)r B=(E D)r

A B 1

find subset S A such that (A - S) B 1

subspace. for thisset S"" no be will

there thenpart, Bin appears ...2) 2, (2, If

unate. becomesit until function Split the

parts twoin listed BA

then0 BIf

Page 21: Irredundant Cover After performing Expand, we have a prime cover without single cube containment now. We want to find a proper subset which is also a cover

Example

ex: A =(Rp)r B =

x4x5x6

x4 x4’

x5 x5’

x5 x5’{5,7}{5,6}

{4,7}{4,6}

{{5,7},{5,6}} {{4,7},{4,6}}