Geometric interpretation & Cubes Paolo PRINETTO Politecnico di Torino (Italy) University of Illinois at Chicago, IL (USA) Lecture 3.2
2 3.2 Goal This lecture first introduces a geometric interpretation of Boolean Algebras, focusing, in particular, on the concept of K-cubes. It then presents several ways of representing K-cubes. Eventually some advanced operators on cubes are defined.
3 3.2 Prerequisites Lecture 3.1
4 3.2 Homework No particular homework is foreseen
5 3.2 Further readings Students interested in a deeper knowledge of advanced operators on cubes can refer, for instance, to: G.D. Hachtel, F. Somenzi: “Logic Synthesis and Verification Algorithms,” Kluwer Academic Publisher, Boston MA (USA), 1996
6 3.2 Outline Geometric interpretation of Boolean Algebras K-cubes representation Advanced operations on K-cubes.
7 3.2 Geometric interpretation The carrier B n of a Boolean Algebra can be seen as an n-dimensional space, where each generic element v B n (usually called a vertex), is represented by a vector of n coordinates, each B.
8 3.2 x z B = { 0, 1} B 2
9 3.2 x y z B = { 0, 1} B 3
x y z B = { 0, 1 } B 4 w
K-cube A k-dimensional sub-space (or k-cube) S k B n is a set of 2 k vertices, in which n-k variables get the same constant value.
x z cube = vertex B = { 0, 1 } B 2
x y z B = { 0, 1 } B 3 0-cube = vertex
x y z B = { 0, 1 } B 3 1-cube = edge
x y z B = { 0, 1 } B 3 2-cube = face
B = { 0, 1 } B 4 2-cube = face x y z w
Remarks Not all the sub-sets of B n with cardinality 2 k are k-cubes.
x y z B = { 0, 1 } B 3 An example of set of 2 2 vertices which is not a 2-cube
Remarks Not all the sub-sets of B n with cardinality 2 k are k-cubes The empty set is not a k-cube
Remarks Not all the sub-sets of B n with cardinality 2 k are k-cubes The empty set is not a k-cube The total # of different k-cubes is:
Examples n = 3 k = 2 : 2-cubes : faces N = 3! 2 / 1! 2! = 6 n = 3 k = 1 : 1-cubes : edges N = 3! 4 / 2! 1! = 12 n = 3 k = 0 : 0-cubes : vertices N = 3! 8 / 3! 0! = 8
Outline Geometric interpretation of Boolean Algebras K-cubes representation Advanced operations on K-cubes.
K-cubes representation k-cube
K-cubes representation Algebraic notation Cubic notation k-cube
K-cubes representation Algebraic notation Cubic notation Product term Sum term k-cube
K-cubes representation Cubic notation k-cube list of n values { 0, 1, – }, one for each coordinate
In such a list there will be: n-k values set at 0, or at 1, and in particular: at 0 if the corresponding coordinate gets the value 0 in all the vertices of the cube at 1 if the corresponding coordinate gets the value 1 in all the vertices of the cube – k values set at a particular value, conventionally represented by “–” and read “don’t care” (they correspond to the k coordinates which assume all the 2 k possible combinations of values). Cubic notation (cont’d)
x z cube in cubic notation B = { 0, 1 } B 2 10
x y z B = { 0, 1 } B 3 0-cube in cubic notation 111
x y z B = { 0, 1 } B 3 1-cube in cubic notation 10101010
x y z B = { 0, 1 } B 3 2-cube in cubic notation 0000
B = { 0, 1 } B 4 2-cube in cubic notation x y z w 10101010
Cubes representation Algebraic notation k-cube list of n-k literals, one for each variable that gets the same value in all the vertices of the cube
Cubes representation Algebraic notation Product term k-cube
Cubes representation Algebraic notation Product term k-cube Each k-cube is represented by a logic product of n-k variables where: variables assuming constantly the 1 value are assertedvariables assuming constantly the 1 value are asserted variables assuming constantly the 0 value are complemented.variables assuming constantly the 0 value are complemented.
x z cube by product terms B = { 0, 1 } B 2 x z’
x y z B = { 0, 1 } B 3 0-cube by product terms x y z
x y z B = { 0, 1 } B 3 1-cube by product terms x z’
x y z B = { 0, 1 } B 3 2-cube by product terms y’y’y’y’
cube by product terms B = { 0, 1 } B 4 x y z w x z ’
Remark The universe set, i.e., the n-cube, which, according to the previous rules should be represented by “no” variable, is usually represented by the symbol 1.
f ( x 1, x 2, x 3 ) 10 - 110 From cubic notation to algebraic notation by product terms
f ( x 1, x 2, x 3 ) 10 - x 1 x 2 ’ x x 1 x 2 x 3 ’ From cubic notation to algebraic notation by product terms
f ( x 1, x 2, x 3 ) x 1 x 2 ’ x 2 x 1 x 2 x 3 ’ From algebraic notation by product terms to cubic notation
f ( x 1, x 2, x 3 ) x 1 x 2 ’ 10 - x 2 x 1 x 2 x 3 ’ 110 From algebraic notation by product terms to cubic notation
Minterm A minterm (or fundamental product) is the representation of a 0-cube by a product term. k-cube representation 1 0 1x y ’ z minterm 0 1 1x’ y z minterm 0 0x’ z’ not a minterm 1 y not a minterm
Cubes representation Algebraic notation Sum term k-cube
Cubes representation Algebraic notation Sum term k-cube Each k-cube is represented by a logic sum of n-k variables where: variables assuming constantly the 1 value are complementedvariables assuming constantly the 1 value are complemented variables assuming constantly the 0 value are asserted.variables assuming constantly the 0 value are asserted.
x z cube by sum terms B = { 0, 1 } B 2 x’ + y
x y z B = { 0, 1 } B 3 0-cube by sum terms x’ + y ’ + z’
x y z B = { 0, 1 } B 3 1-cube by sum terms x’ + z
x y z B = { 0, 1 } B 3 2-cube by sum terms y
cube by sum terms B = { 0, 1 } B 4 x y z w x ’ + z
Remark The universe set is usually represented, in this notation, by the symbol 0.
Maxterm A maxterm (or fundamental sum) is the representation of a 0-cube by a sum term. k-cube representation 1 0 1x’ + y + z’ maxterm 0 1 1x + y ’ + z’ maxterm 0 0x + z not a maxterm 1 y ’ not a maxterm
Outline Geometric interpretation of Boolean Algebras K-cubes representation Advanced operations on K-cubes.
Several advanced operators have been defined on k-cubes, including: Splitting Coverage Intersection Distance Union Complement Cofactor Consensus … Advanced operations on K-cubes
Note Since most of them are of interest for peculiar applications, only (e.g., advanced techniques for logic minimization), they are not fatherly dealt with in the present course. Just a couple of them are going to be presented here. Interested students can refer to the book suggested in slide 5 for a deeper analysis.
Splitting Splitting allows us to find all the vertices of a given k-cubes. Algorithm Assign each “–” all the possible combinations of the related input variable, until no “–” are present.
Example –11–0
Example –11–0 111–0 011–0
Example –11– –0 011–0
Coverage We have to distinguish between: Coverage among cubes Coverage among sets of cubes
Coverage among cubes A cube a covers (or contains) a cube b, and we denote it as: a b Iff all the vertices of b are vertices of a as well. In such a case we say that b implies a or that a is implied by b.
Example a = b = a b b a aa a
“Working” Definition A cube a covers a cube b, iff the cube b can be derived from a by replacing, in a, one (or more) “–” by 0 or 1. Examples a = – 0 – b = – 0 0 a b a = 1 0 – 1 b = – a b
Coverage among sets of cubes A set of cubes C covers a cube a iff each vertex of a is a vertex of at least one of the cubes of C. Example C = { 0–1, 10– } a = –01 ?
Solution We first split the vertices of a : 001, covered by C[1] = 0–1 101, covered by C[2] = 10– As a consequence C = { 0–1, 10– } a = –01 Even if, when considered individually C[1] a and C[2] a
C[1] C[2] a C[1] = 0–1 C[2] = 10– a = – 0 1
Hamming distance between cubes We define Hamming distance between 2 cubes a and b, and we denote it as D (a, b) the # of coordinates of the 2 cubes such that: a[i] = 0 and b[i] = 1 or a[i] = 1 and b[i] = 0
Properties Two cubes have a null distance iff they share one or more vertices Two cubes having unit distance are usually referred to as being logically adjacent.
Example y z x 110
Example y z x 110 a a = - 0 -
Example y z x 110 a a = b b = 1 - 0
Example y z x 110 a a = b b = 1 - 0D(a, b) = 0
Example y z x 110 a a = b b = 1 - 0D(a, b) = 0 c c = 1 1 1
Example y z x 110 a a = b b = 1 - 0D(a, b) = 0 c c = 1 1 1D(a, c) = 1
Example y z x 110 a a = b b = 1 - 0D(a, b) = 0 c c = 1 1 1D(a, c) = 1 xy z