0% found this document useful (0 votes)
5 views

lecture03

Uploaded by

Kuann C
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

lecture03

Uploaded by

Kuann C
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 68

Logic Synthesis and

Verification
Jie-Hong Roland Jiang
江介宏

Department of Electrical Engineering


National Taiwan University

Fall 2024

1
SOPs and Incompletely
Specified Functions

Reading:
Logic Synthesis in a Nutshell
Section 2

most of the following slides are by


courtesy of Andreas Kuehlmann
2
Boolean Function Representation
Sum of Products
 A function can be represented by a sum of cubes (products):
◼ E.g., f = ab + ac + bc
Since each cube is a product of literals, this is a “sum of
products” (SOP) representation

 An SOP can be thought of as a set of cubes F


◼ E.g., F = {ab, ac, bc}

 A set of cubes that represents f is called a cover of f


◼ E.g.,
F1={ab, ac, bc} and F2={abc, abc’, ab’c, a’bc} are covers of
f = ab + ac + bc.

3
List of Cubes (Cover Matrix)
 We often use a matrix notation to represent a
cover:
◼ Example
F = ac + c’d =

abcd abcd
ac → 1212 or 1-1-
c’d → 2201 --01

 Each row represents a cube


 1 means that the positive literal appears in the cube
 0 means that the negative literal appears in the cube
 2 (or -) means that the variable does not appear in the
cube. It implicitly represents both 0 and 1 values.

4
Programmable Logic Array (PLA)

5
PLA
 A PLA implements a (multiple-output) function f :
Bn → Bm represented in SOP form
n=3, m=3 cover matrix

a a b b c c
abc f1f2f3
10- 1 - -
-11 1 - -
0-0 - 1 -
111 - 1 1
00- - - 1

f1 f2 f3
6
PLA
 Each distinct cube appears just once in the AND-
plane, and can be shared by (multiple) outputs in
the OR-plane, e.g., cube (abc) in the previous
slide
 Extensions from single-output to multiple-output
minimization theory are straightforward

7
SOP
 The cover (set of cubes) can efficiently represent many
practical logic functions (i.e., for many practical functions,
there exist small covers)

 Two-level minimization seeks the cover of minimum size


(least number of cubes)

bc ac

= onset minterm
ab
c Note that each onset minterm is
b “covered” by at least one of the
cubes!
None of the offset minterms is
a covered
8
Irredundant Cube
 Let F = {c1, c2, …, ck} be a cover for f, i.e.,
f = ik=1 ci
A cube ci F is irredundant if F\{ci}  f

◼ Example
f = ab + ac + bc
bc ac bc

Not covered
ab ac
c
b

F\{ab}  f
a
9
Prime Cube
 A literal x (a variable or its negation) of cube c  F (cover
of f) is prime if (F \ {c})  {cx}  f,
where cx (cofactor w.r.t. x) is c with literal x of c deleted

 A cube of F is prime if all its literals are prime

 Example
f = xy + xz + yz yz
c = xy; cy = x (literal y deleted)
(F \ {c})  {cy} = x + xz + yz x
z xz

inequivalent to f since y
offset vertex is covered
x
10
Prime and Irredundant Cover
 Definition 1. A cover is prime (resp. irredundant) if all its
cubes are prime (resp. irredundant)

 Definition 2. A prime (cube) of f is essential (essential


prime) if there is a onset minterm (essential vertex) in that
prime but not in any other prime

 Definition 3. Two cubes are orthogonal if they do not have


any minterm in common
◼ E.g. c1= xy c2 = y’z are orthogonal
c1= x’y c2 = yz are not orthogonal

11
Prime and Irredundant Cover
 Example
f = abc + b’d + c’d is prime and irredundant.
abc is essential since abcd’abc, but not in b’d or c’d or ad

abc

bd

c
b
d
a cd
Why is abcd not an essential vertex of abc?
What is an essential vertex of abc?
What other cube is essential? What prime is not essential?

12
Incompletely Specified Function
 Let F = (f, d, r) : Bn → {0, 1, *}, where *
represents “don’t care”
◼ f = onset function f(x)=1  F(x)=1
◼ r = offset function r(x)=1  F(x)=0
◼ d = don’t care function d(x)=1  F(x)=*

 (f,d,r) forms a partition of Bn, i.e,


◼ f + d + r = Bn
◼ (f  d) = (f  r) = (d  r) =  (pairwise disjoint)
(Here we don’t distinguish characteristic functions and
the sets they represent)

13
Incompletely Specified Function
 A completely specified function g is a
cover for F = (f,d,r) if
f  g  f+d
◼ gr = 
◼ if xd (i.e. d(x)=1), then g(x) can be 0 or 1;
if xf, then g(x) = 1; if xr, then g(x) = 0
 We “don’t care” which value g has at xd

14
Prime of Incompletely Specified
Function
 Definition. A cube c is a prime of F = (f,d,r) if c 
f+d (an implicant of f+d), and no other implicant
(of f+d) contains c (i.e., it is simply a prime of
f+d)

 Definition. Cube cj of cover G = {ci} of F = (f,d,r)


is redundant if f  G\{cj}; otherwise it is
irredundant

 Note that c  f+d  c  r = 

15
Prime of Incompletely Specified
Function
 Example
Consider logic minimization of F(a,b,c)=(f,d,r) with
f=a’bc’+ab’c+abc and d = abc’+ab’c’

F1={a’bc’, ab’c, abc} on

Expand abc→a off

don’t care
F2={a, a’bc’, ab’c}

ab’c is redundant c
b
a is prime
F3= {a, a’bc’} a
Expand a’bc’ → bc’

F4= {a, bc’}

16
Checking of Prime and
Irredundancy
Let G be a cover of F = (f,d,r), and D be a cover for d
 ci  G is redundant iff
ci  (G\{ci})  D (1)

(Let Gi  G\{ci}  D. Since ci  Gi and f  G  f+d, then ci  cif+cid and cif


 G\{ci}. Thus f  G\{ci}.)

 A literal l  ci is prime if (ci\{ l }) ( = (ci)l ) is not an implicant of F


 A cube ci is a prime of F iff all literals l  ci are prime
Literal l  ci is not prime  (ci)l  f+d (2)

Note: Both tests (1) and (2) can be checked by tautology (to be explained):

 (Gi)ci  1 (implies ci redundant)


 (fd)(ci)l  1 (implies l not prime)
The above two cofactors are with respect to cubes instead of literals

17
(Literal) Cofactor
 Let f : Bn → B be a Boolean function, and x= (x1, x2, …, xn)
the variables in the support of f; the cofactor fa of f by a
literal a = xi or a = xi is
 fxi (x1, x2, …, xn) = f (x1, …, xi-1, 1, xi+1,…, xn)
 fxi (x1, x2, …, xn) = f (x1, …, xi-1, 0, xi+1,…, xn)

The computation of the cofactor is a fundamental operation


in Boolean reasoning!

 Example
f = abc + abc fa = bc

c c
b b
a a
18
(Literal) Cofactor
 The cofactor Cxj of a cube C (representing some
Boolean function) with respect to a literal xj is
◼C if xj and xj’ do not appear in C
◼ C\{xj} if xj appears positively in C, i.e., xj  C
◼  if xj appears negatively in C, i.e., xj’  C

 Example
C = x1 x4’ x6,
C x2 = C (x2 and x2’ do not appear in C)
Cx1 = x4’ x6 (x1 appears positively in C)
C x4 =  (x4 appears negatively in C)

19
(Literal) Cofactor
 Example

F = abc’ + b’d + cd
Fb = ac’ + cd

(Just drop b everywhere and throw away cubes


containing literal b’)

Cofactor and disjunction commute!

20
Shannon Expansion
Let f : Bn → B
Shannon Expansion:
f = xi fxi + xi’ fxi’

Theorem: F is a cover of f. Then


F = xi Fxi + xi’ Fxi’

We say that f and F are expanded about xi, and


xi is called the splitting variable

21
Shannon Expansion
 Example
F = ab + ac + bc

F = a Fa + a’ Fa’
= a (b+c+bc)+a’ (bc)
= ab+ac+abc+a’bc

Cube bc got split into two cubes


ac
bc

ab
c c
b b

a a 22
(Cube) Cofactor
 The cofactor fC of f by a cube C is f with the fixed
values indicated by the literals of C
◼ E.g., if C = xi xj’, then xi = 1 and xj = 0

◼ For C = x1 x4’ x6, fC is just the function f restricted to the


subspace where x1 = x6 = 1 and x4 = 0
 Note that fC does not depend on x1,x4 or x6 anymore
(However, we still consider fC as a function of all n variables,
it just happens to be independent of x1,x4 and x6)

◼ x1 f  f x 1
 E.g., for f = ac + a’c, afa = af = ac and fa=c

23
(Cube) Cofactor
 The cofactor of the cover F of some function f is
the sum of the cofactors of each of the cubes of F

 If F={c1, c2,…, ck} is a cover of f, then Fc= {(c1)c,


(c2)c,…, (ck)c} is a cover of fc

24
Containment vs. Tautology
 A fundamental theorem that connects functional containment and
tautology:

Theorem. Let c be a cube and f a function. Then c  f  fc  1.

Proof.
We use the fact that xfx = xf, and fx is independent of x.
()
Suppose fc  1. Then cf = fcc = c. Thus, c  f.
()
Suppose c  f. Then f+c=f. In addition, fc = (f+c)c = fc+1=1. Thus,
fc=1.

f
c

25
Checking of Prime and Irredundancy
(Revisited)
Let G be a cover of F = (f,d,r). Let D be a cover for d
 ci  G is redundant iff
ci  (G\{ci})  D (1)

(Let Gi  G\{ci}  D. Since ci  Gi and f  G  f+d, then ci  cif+cid and cif


 G\{ci}. Thus f  G\{ci}.)

 A literal l  ci is prime if (ci\{ l }) ( = (ci)l ) is not an implicant of F


 A cube ci is a prime of F iff all literals l  ci are prime
Literal l  ci is not prime  (ci)l  f+d (2)

Note: Both tests (1) and (2) can be checked by tautology (explained):

 (Gi)ci  1 (implies ci redundant)


 (fd)(ci)l  1 (implies l not prime)
The above two cofactors are with respect to cubes instead of literals

26
Generalized Cofactor
 Definition. Let f, g be completely specified
functions. The generalized cofactor of f with
respect to g is the incompletely specified function:

co( f , g) = ( f  g, g, f  g)

 Definition. Let  = (f, d, r) and g be given. Then

co(, g) = ( f  g,d + g,r  g)

27
Shannon vs. Generalized Cofactor
 Let g = xi . Shannon cofactor is
fxi (x1, x2, …, xn) = f (x1, …, xi-1, 1, xi+1,…, xn)

 Generalized cofactor with respect to g=xi is


co( f , xi ) = ( f  xi , xi , f  xi )

 Note that
f  xi  fxi  f  xi + xi = f + xi

In fact fxi is the unique cover of co(f, xi )


independent of the variable xi .

28
Shannon vs. Generalized Cofactor

on
f = abc + abc + abc + abc off
Don’t care

co( f , a) = ( f  a, a, f  a) fa = bc + bc

29
Shannon vs. Generalized Cofactor

co( f , a) = ( f  a, a, f  a)

 

f a fa fa + a

So f  a  fa  f + a
30
Shannon vs. Generalized Cofactor

Shannon Cofactor Generalized Cofactor

x  fx + x  fx = f f = g  co( f , g) + g  co( f , g)
( fx )y = fxy co(co( f , g),h) = co( f , gh)
( f  g )y = f y  gy co( f  g,h) = co( f ,h)  co(g,h)

(f ) = ( f )
x x
co( f , g) = co( f , g)

We will get back to the use of generalized cofactor later

31
Data Structure for SOP
Manipulation

most of the following slides are by


courtesy of Andreas Kuehlmann
32
Operation on Cube Lists
 AND operation:
◼ take two lists of cubes
◼ compute pair-wise AND between individual cubes and put result on
new list
◼ represent cubes in computer words
◼ implement set operations as bit-vector operations

Algorithm AND(List_of_Cubes C1,List_of_Cubes C2) {


C = 
foreach c1  C1 {
foreach c2  C2 {
c = c1 & c2
C = C  c
}
}
return C
}

33
Operation on Cube Lists
 OR operation:
◼ take two lists of cubes
◼ computes union of both lists

 Naive implementation:

Algorithm OR(List_of_Cubes C1, List_of_Cubes C2) {


return C1  C2
}

 On-the-fly optimizations:
◼ remove cubes that are completely covered by other cubes
 complexity is O(m2); m is length of list
◼ conjoin adjacent cubes (consensus operation)
◼ remove redundant cubes?
 coNP-complete
 too expensive for non-orthogonal lists of cubes

34
Operation on Cube Lists
Simple trick:
◼ keep cubes in lists orthogonal
check for redundancy becomes O(m2)
but lists become significantly larger (worst case:
exponential)

◼ Example
01-0
01-0 0-1- 1-01
OR =
1-01 1-11 001-
0111
1-11

35
Operation on Cube Lists
 Adding cubes to orthogonal list:

Algorithm ADD_CUBE(List_of_Cubes C, Cube c) {


if(C = ) return {c}
c’ = TOP(C)
Cres = c-c’ /* chopping off minterms may result in multiple cubes */
foreach cres  Cres {
C = ADD_CUBE(C\{c’},cres)  {c’}
}
return C
}

 How can the above procedure be further improved?


 What about the AND operation, does it gain from orthogonal cube lists?

36
Operation on Cube Lists
 Naive implementation of COMPLEMENT operation
◼ apply De’Morgan’s law to SOP
◼ complement each cube and use AND operation
Example
Input non-orth. orthogonal
01-10 => 1---- => 1----
-0--- 00---
---0- 01-0-
----1 01-11

 Naive implementation of TAUTOLOGY check


◼ complement function using the COMPLEMENT operator and
check for emptiness
 We will show that we can do better than that!

37
Tautology Checking
 Let A be an orthogonal cover matrix, and all cubes of A be
pair-wise distinguished by at least two literals (this can be
achieved by an on-the-fly merge of cube pairs that are
distinguished by only one literal)

Does the following conjecture hold?

A1  A has a row of all “-”s ?

This would dramatically simplify the tautology check!

38
Tautology Checking
Algorithm CHECK_TAUTOLOGY(List_of_Cubes C) {
if(C == ) return FALSE;
if(C == {-...-})return TRUE; // cube with all ‘-’
xi = SELECT_VARIABLE(C)
C0 = COFACTOR(C,Xi)
if(CHECK_TAUTOLOGY(C0) == FALSE) {
print xi = 0
return FALSE;
}
C1 = COFACTOR(C,Xi)
if(CHECK_TAUTOLOGY(C1) == FALSE) {
print xi = 1
return FALSE;
}
return TRUE;
}

39
Tautology Checking
 Implementation tricks
◼ Variable ordering:
pick variable that minimizes the two sub-cases (“-”s
get replicated into both cases)

◼ Quick decision at leaf:


return TRUE if C contains at least one complete “-”
cube among others (case 1)
return FALSE if number of minterms in onset is < 2n
(case 2)
return FALSE if C contains same literal in every cube
(case 3)

40
Tautology Checking
-1-0
Example --10
1-11 x1
0--- -1-0
x1 tautology (case 1)
-1-0 --10
--10 ----
x2
--11
--10
x2 not tautology (case 3)
---0 --11
x3
--10
---0 not tautology (case 3)
--11
x3 ---- tautology (case 1)
x4
---0
---1
x4 ---- tautology (case 1) 41
Special Functions
 Definition. A function f : Bn → B is symmetric with respect
to variables xi and xj iff
f(x1,…,xi,…,xj,…,xn) = f(x1,…,xj,…,xi,…,xn)

 Definition. A function f : Bn → B is totally symmetric iff any


permutation of the variables in f does not change the
function

Symmetry can be exploited in searching BDD since

f xi x j = f xi x j
- can skip one of four sub-cases
- used in automatic variable ordering for BDDs

42
Special Functions
 Definition. A function f : Bn → B is positive unate in variable
xi iff
fx  fx
i i

◼ This is equivalent to monotone increasing in xi:


f (m − )  f (m + )
for all min-term pairs (m-, m+) where

m−j = m+j , j  i
mi− = 0
mi+ = 1
 Example
(1001, 1011) with i = 3

43
Special Functions
 Similarly for negative unate fx  fx
i i

monotone decreasing f (m − )  f (m + )

 A function is unate in xi if it is positive unate or negative


unate in xi

 Definition. A function is unate if it is unate in each variable

 Definition. A cover F is positive unate in xi iff xi  cj for all


cubes cjF

 Note that a cover of a unate function is not necessarily unate!


(However, there exists a unate cover for a unate function.)

44
Special Functions
 Example

f = ab + bc + ac
m+ positive unate in a,b
negative unate in c
c
b f(m-)=1  f(m+)=0

m-
a

45
Unate Recursive Paradigm
 Key pruning technique is based on exploiting the
properties of unate functions
◼ based on the fact that unate leaf cases can be
solved efficiently

 New case splitting heuristic


◼ splitting variable is chosen so that the
functions at lower nodes of the recursion tree
become unate

46
Unate Recursive Paradigm
 Unate covers F have many extraordinary properties:
◼ If a prime cover F is minimal with respect to single-
cube containment, all of its cubes are essential primes
 In this case F is the unique minimum cube representation
of its logic function

◼ A unate cover represents a tautology iff it contains a


cube with no literals, i.e., a single tautologous cube

 This type of implicit enumeration applies to many sub-


problems (prime generation, reduction, complementation,
etc.). Hence, we refer to it as the Unate Recursive Paradigm.

47
Unate Recursive Paradigm
1. Create cofactoring tree stopping at unate covers
◼ choose, at each node, the “most binate” variable for splitting
◼ iterate until no binate variable left (unate leaf)
2. “Operate” on the unate cover at each leaf to obtain the result for that leaf.
Return the result
3. At each non-leaf node, merge (appropriately) the results of the two
children.
a

b c merge

 Main idea: “Operation” on unate leaf is computationally less complex


 Operations: complement, simplify, tautology, prime generation, ...

48
Unate Recursive Paradigm
Binate select heuristic
◼ Tautology checking and other programs based
on the unate recursive paradigm use a
heuristic called BINATE_SELECT to choose the
splitting variable in recursive Shannon
expansion

The idea is, for a given cover F, choose the variable


which occurs, both positively and negatively, most
often in the cubes of F

49
Unate Recursive Paradigm
 Binate select heuristic
◼ Example
Unate and non-unate covers:
a b c d is unate
G = ac+cd’ 1 - 1 -
- - 1 0

a b c d
F = ac+c’d+bcd’ 1 - 1 - is not unate
- - 0 1
- 1 1 0
 Choose c for splitting!

◼ Binate variables of a cover are those with both 1’s and 0’s in the
corresponding column
◼ In the unate recursive paradigm, the BINATE_SELECT heuristic
chooses a (most) binate variable for splitting, which is thus eliminated
from the sub-covers

50
Unate Recursive Paradigm
Example
f = ac + c d + bc d c
1 0 1 - 1 -
1--- F= - - 0 1
FC F C
-1-0 ---1 - 1 1 0
unate unate

f = ace + c d + bc d e
c
1 0
1---0 1 - 1 - 0
---1-
-1-01 e F= - - 0 1 -
0 unate
- 1 1 0 1
1
-1-0- 1----
unate unate 51
Unate Recursive Paradigm
Unate Reduction
 Let F(x) be a cover. Let (a,c) be a partition of the variables x,
and let

A C 
F = 
T F 
where
1. the columns of A (a unate submatrix) correspond to
variables a of x
2. T is a matrix of all “-”s

 Theorem. Assume A 1. Then F1  F*1

52
Unate Recursive Paradigm
Unate Reduction
Example
1 − 0 1
− 1 1 0 1 1
A C 
F =  − − 1 1 − 0
T F  − − − 0 − 1
− − − 1

We pick for the partitioning unate variables because it is easy to decide that A1

53
Unate Recursive Paradigm
Unate Reduction
 Example

0 1
A1 1 0
B1
− − − − − − − A3 A4
− − − − − − −− − − − −
− − − − − − −− − − − − 1 D
0 1
A2 0 0 B2
1 1

◼ Assume A1 and A2 are unate and have no row of all “-”s.


◼ Note that A3 and A4 are unate (single-row sub-matrices)
◼ Consequently only have to look at D1 to test if this is a tautology

54
Unate Recursive Paradigm
Unate Reduction
 Theorem:
A C 
F = 
T F 

Let A be a non-tautological unate matrix (A1)


and T is a matrix of all -’s. Then F  1  F*  1.

 Proof:
If part: Assume F*  1. Then we can replace F*
by all -’s. Then last row of F becomes a row of all
“-”s, so tautology.

55
Unate Recursive Paradigm
Unate Reduction
 Proof (cont’d):
Only if part: Assume F* 1. Then there is a
minterm m2 (in c variables) such that F*m2 = 0
(cofactor in cube), i.e. m2 is not covered by F*.
Similarly, m1 (in a variables) exists where Am1 = 0,
i.e. m1 is not covered by A. Now the minterm
m1m2 (in the full variable set) satisfies Fm1m2 = 0.
Since m1m2 is not covered by F, F 1.

56
Unate Recursive Paradigm
Application – Tautology Checking
 Improved tautology check

Algorithm CHECK_TAUTOLOGY(List_of_Cubes C) {
if(C == ) return FALSE;
if(C == {-...-}) return TRUE; // cube with all ‘-’
C = UNATE_REDUCTION(C)
xi = BINATE_SELECT(C)
C0 = COFACTOR(C,xi)
if(CHECK_TAUTOLOGY(C0) == FALSE) {
return FALSE;
}
C1 = COFACTOR(C,xi)
if(CHECK_TAUTOLOGY(C1) == FALSE) {
return FALSE;
}
return TRUE;
}

57
Unate Recursive Paradigm
Application – Tautology Checking
-1-0 Unate reduction 0---
 Example --10
not tautology (case 2 and 3)
1-11 x1
0--- -1-0
x1 tautology (case 1)
-1-0 --10
--10 x2 ----
--11
--10 not tautology (case 3)
x2
---0 --11
x3
--10
---0 not tautology (case 3)
--11
x3 x4 ---- tautology (case 1)
---0
---1
x4 ---- tautology (case 1) 58
Unate Recursive Paradigm
Application – Complement
 We have shown how tautology check (SAT check) can be
implemented recursively using the Binary Decision Tree
 Similarly, we can implement Boolean operations recursively,
e.g. the COMPLEMENT operation:

 Theorem. f = x  fx + x  fx
 Proof.
g = x  fx + x  fx
f = x  fx + x  fx

f  g = 0
 g = f
f + g = 1
59
Unate Recursive Paradigm
Application – Complement
 Complement operation on cube list

Algorithm COMPLEMENT(List_of_Cubes C) {
if(C contains single cube c) {
Cres = complement_cube(c) // generate one cube per
return Cres // literal l in c with l
}
else {
xi = SELECT_VARIABLE(C)
C0 = COMPLEMENT(COFACTOR(C,xi))  xi
C1 = COMPLEMENT(COFACTOR(C,xi))  xi
return OR(C0,C1)
}
}

60
Unate Recursive Paradigm
Application – Complement
 Efficient complement of a unate cover
 Idea:
◼ variables appear only in one polarity on the original cover
(ab + bc + ac)’ = (a’+b’)(b’+c’)(a’+c’)

◼ when multiplied out, a number of products are redundant


a’b’a’ + a’b’c’ + a’c’a’ + a’c’c’+ b’b’a’ + b’b’c’ + b’c’a’ + b’c’c’ =
a’b’ + a’c’ + b’c’

◼ we just need to look at the combinations for which the


variables cover all original cubes (see the following example)
 this works independent of the polarity of the variables because of
symmetry to the (1,1,1,…,1) case (see the following example)

61
Unate Recursive Paradigm
Application – Complement
 Map (unate) cover matrix F into Boolean matrix B

F B
a b c d e a b c d e
− 1 − 0 − 0 1 0 1 0
− − 0 0 1 0 0 1 1 1
1 1 − − 1 1 1 0 0 1
1 − 0 − 1 1 0 1 0 1

convert: “0”,”1” in F to “1” in B (literal is present)


“-” in F to “0” in B (literal is not present)

62
Unate Recursive Paradigm
Application – Complement
 Find all minimal column covers of B.
◼ A column cover is a set of columns J such that for each row i,
jJ such that Bij = 1

 Example
{1,4} is a minimal column cover for matrix B
1 2 3 4 5
0 1 0 1 0 1
0 0 1 1 1 1
1 1 0 0 1 1
1 0 1 0 1 1

All rows “covered” by at least one 1

63
Unate Recursive Paradigm
Application – Complement
 For each minimal column cover create a cube with opposite
column literal from F

 Example
By selecting a column cover {1,4}, a’d is a cube of f’

1 2 3 4 5 1 2 3 4 5
a b c d e a b c d e
− 1 − 0 − 0 1 0 1 0
− − 0 0 1 0 0 1 1 1
1 1 − − 1 1 1 0 0 1
1 − 0 − 1 1 0 1 0 1
64
Unate Recursive Paradigm
Application – Complement
 The set of all minimal column covers = cover of f

 Example
a b c d e a b c d e
− 1 − 0 − 0 1 0 1 0
− − 0 0 1 0 0 1 1 1
1 1 − − 1 1 1 0 0 1
1 − 0 − 1 1 0 1 0 1

◼ {(1,4), (2,3), (2,5), (4,5)} is the set of all minimal covers.


This translates into:

f = ad + bc + be + de
65
Unate Recursive Paradigm
Application – Complement
 Theorem (unate complement theorem):
Let F be a unate cover of f. The set of cubes associated with
the minimal column covers of B is a cube cover off.

 Proof:
We first show that any such cube c generated is in the
offset of f, by showing that the cube c is orthogonal with
any cube of F.
◼ Note, the literals of c are the complemented literals of F.
 Since F is a unate cover, the literals of F are just the union
of the literals of each cube of F).
◼ For each cube miF, jJ such that Bij=1.
 J is the column cover associated with c.
◼ Thus, (mi)j = xj  cj =xj and (mi)j =xj  cj = xj. Thus
mic = . Thus c  f .

66
Unate Recursive Paradigm
Application – Complement
 Proof (cont’d):
We now show that any minterm m f is contained in some
cube c generated:
◼ First, m must be orthogonal to each cube of F.
 For each row of F, there is at least one literal of m that
conflicts with that row.
◼ The union of all columns (literals) where this happens is a
column cover of B
◼ Hence this union contains at least one minimal cover and the
associated cube contains m.

67
Unate Recursive Paradigm
Application – Complement
 The unate covering problem finds a minimum
column cover for a given Boolean matrix B
◼ Unate complementation is one application based on the
unate covering problem

 Unate Covering Problem:


Given a matrix B, with Bij{0,1}, find x, with
xi{0,1}, such that Bx  1 (componentwise
inequality) and j xj is minimized

◼ Sometimes we want to minimize


j cjxj
where cj is a cost associated with column j

68

You might also like