geometric interpretation & cubes paolo prinetto politecnico di torino (italy) university of...
TRANSCRIPT
Geometric Geometric interpretation interpretation
& Cubes& Cubes
Geometric Geometric interpretation interpretation
& Cubes& Cubes
Paolo PRINETTOPolitecnico di Torino (Italy)
University of Illinois at Chicago, IL (USA)
[email protected] [email protected]
www.testgroup.polito.it
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 Bn of a Boolean Algebra can be seen as an n-dimensional space, where each generic element v Bn (usually called a vertex), is represented by a vector of n coordinates, each B.
8 3.2
x
z
00 10
1101
B = { 0, 1}
B 2
9 3.2
x
y
z
000
111
100
101001
010
011
110
B = { 0, 1}
B3
10 3.2
x
y
zB = { 0, 1 }
B4
w
11 3.2
K-cube
A k-dimensional sub-space (or k-cube)
Sk Bn
is a set of 2k vertices, in which n-k variables get the same constant value.
12 3.2
x
z
00 10
1101
0-cube = vertex
B = { 0, 1 }
B2
13 3.2
x
y
z
000
111
100
101001
010
011
110
B = { 0, 1 }
B3
0-cube = vertex
14 3.2
x
y
z
000
111
100
101001
010
011
110
B = { 0, 1 }
B3
1-cube = edge
15 3.2
x
y
z
000
111
100
101001
010
011
110
B = { 0, 1 }
B3
2-cube = face
16 3.2
B = { 0, 1 }
B4
2-cube = face
x
y
z
w
17 3.2
Remarks
Not all the sub-sets of Bn with cardinality 2k are k-cubes.
18 3.2
x
y
z
000
111
100
101001
010
011
110
B = { 0, 1 }
B3
An example of set of 22 vertices which is not a 2-cube
19 3.2
Remarks
Not all the sub-sets of Bn with cardinality 2k are k-cubes
The empty set is not a k-cube
20 3.2
Remarks
Not all the sub-sets of Bn with cardinality 2k are k-cubes
The empty set is not a k-cube
The total # of different k-cubes is:
N n! 2(n k)! k!
n-k
21 3.2
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
N n! 2(n k)! k!
n-k
22 3.2
Outline
Geometric interpretation of Boolean Algebras
K-cubes representation
Advanced operations on K-cubes.
23 3.2
K-cubes representation
k-cubek-cube
24 3.2
K-cubes representation
AlgebraicAlgebraicnotationnotation
CubicCubicnotationnotation
k-cubek-cube
25 3.2
K-cubes representation
AlgebraicAlgebraicnotationnotation
CubicCubicnotationnotation
Product termProduct term Sum termSum term
k-cubek-cube
26 3.2
K-cubes representation
CubicCubicnotationnotation
k-cubek-cube
list of n valueslist of n values { 0, 1, { 0, 1, –– }, },one for each one for each coordinatecoordinate
27 3.2
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 2k possible combinations of values).
Cubic notation (cont’d)
28 3.2
x
z
00 10
1101
0-cube in cubic notation
B = { 0, 1 }
B2
1010
29 3.2
x
y
z
000
111
100
101001
010
011
110
B = { 0, 1 }
B3
0-cube in cubic notation
111111
30 3.2
x
y
z
000
111
100
101001
010
011
110
B = { 0, 1 }
B3
1-cube in cubic notation
1100
31 3.2
x
y
z
000
111
100
101001
010
011
110
B = { 0, 1 }
B3
2-cube in cubic notation
00
32 3.2
B = { 0, 1 }
B4
2-cube in cubic notation
x
y
z
w
11 00
33 3.2
Cubes representation
AlgebraicAlgebraicnotationnotation
k-cubek-cube
list of n-k literals, one for list of n-k literals, one for each variable that gets the each variable that gets the
same value in all the same value in all the vertices of the cubevertices of the cube
34 3.2
Cubes representation
AlgebraicAlgebraicnotationnotation
Product termProduct term
k-cubek-cube
35 3.2
Cubes representation
AlgebraicAlgebraicnotationnotation
Product termProduct term
k-cubek-cubeEach k-cube is represented by a Each k-cube is represented by a logiclogic product product of n-k variables where:of n-k variables where:• variables assuming constantly the variables assuming constantly the
1 value are asserted1 value are asserted• variables assuming constantly the variables assuming constantly the
0 value are complemented.0 value are complemented.
36 3.2
x
z
00 10
1101
0-cube by product terms
B = { 0, 1 }
B2
x zx z’’
37 3.2
x
y
z
000
111
100
101001
010
011
110
B = { 0, 1 }
B3
0-cube by product terms
x y zx y z
38 3.2
x
y
z
000
111
100
101001
010
011
110
B = { 0, 1 }
B3
1-cube by product terms
x zx z’’
39 3.2
x
y
z
000
111
100
101001
010
011
110
B = { 0, 1 }
B3
2-cube by product terms
yy’’
40 3.2
2-cube by product terms
B = { 0, 1 }
B4
x
y
z
w
x zx z’’
41 3.2
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.
42 3.2
f ( x1, x2, x3 )
10 -
- 1 -
110
From cubic notation to algebraic notation by product
terms
43 3.2
f ( x1, x2, x3 )
10 - x1 x2’
- 1 - x2
110 x1 x2 x3’
From cubic notation to algebraic notation by product
terms
44 3.2
f ( x1, x2, x3 )
x1 x2’
x2
x1 x2 x3’
From algebraic notation by product terms to cubic notation
45 3.2
f ( x1, x2, x3 )
x1 x2’ 10 -
x2 - 1 -
x1 x2 x3’ 110
From algebraic notation by product terms to cubic notation
46 3.2
Minterm
A minterm (or fundamental product) is the representation of a 0-cube by a product term.
k-cube representation
1 0 1 x y ’ z minterm
0 1 1 x’ y z minterm
0 0 x’ z’ not a minterm
1 y not a minterm
47 3.2
Cubes representation
AlgebraicAlgebraicnotationnotation
Sum termSum term
k-cubek-cube
48 3.2
Cubes representation
AlgebraicAlgebraicnotationnotation
Sum termSum term
k-cubek-cube
Each k-cube is represented by a Each k-cube is represented by a logiclogic sum sum of n-k variables where:of n-k variables where:• variables assuming constantly variables assuming constantly
the 1 value are complementedthe 1 value are complemented• variables assuming constantly variables assuming constantly
the 0 value are asserted.the 0 value are asserted.
49 3.2
x
z
00 10
1101
0-cube by sum terms
B = { 0, 1 }
B2
xx’ + ’ + yy
50 3.2
x
y
z
000
111
100
101001
010
011
110
B = { 0, 1 }
B3
0-cube by sum terms
xx’ + ’ + yy ’ + ’ + zz’’
51 3.2
x
y
z
000
111
100
101001
010
011
110
B = { 0, 1 }
B3
1-cube by sum terms
xx’ + ’ + zz
52 3.2
x
y
z
000
111
100
101001
010
011
110
B = { 0, 1 }
B3
2-cube by sum terms
yy
53 3.2
2-cube by sum terms
B = { 0, 1 }
B4
x
y
z
w
xx’ + ’ + zz
54 3.2
Remark
The universe set is usually represented, in this notation, by the symbol 0.
55 3.2
Maxterm
A maxterm (or fundamental sum) is the representation of a 0-cube by a sum term.
k-cube representation
1 0 1 x’ + y + z’ maxterm
0 1 1 x + y ’ + z’ maxterm
0 0 x + z not a maxterm
1 y ’ not a maxterm
56 3.2
Outline
Geometric interpretation of Boolean Algebras
K-cubes representation
Advanced operations on K-cubes.
57 3.2
Several advanced operators have been defined on k-cubes, including:
Splitting Coverage Intersection Distance Union Complement Cofactor Consensus …
Advanced operations on K-cubes
58 3.2
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.
59 3.2
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.
60 3.2
Example
–11–0
61 3.2
Example
–11–0111–0
011–0
62 3.2
Example
–11–0
11110
11100
01110
01100
111–0
011–0
63 3.2
Coverage
We have to distinguish between:
Coverage among cubes
Coverage among sets of cubes
64 3.2
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.
65 3.2
Example
a = - 0 -
b = - 0 0
a b
000
111
100
101001
010 110
011
b
aa
66 3.2
“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 = – 0 1 1 a b
67 3.2
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 ?
68 3.2
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
69 3.2
000
111
100
101001
010110
011
C[1]
C[2]
aC[1] = 0–1
C[2] = 10–
a = – 0 1
70 3.2
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
71 3.2
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.
72 3.2
Example
y
z
000
111
100
101001
010
011
x
110
73 3.2
Example
y
z
000
111
100
101001
010
011
x
110aa
a = - 0 -
74 3.2
Example
y
z
000
111
100
101001
010
011
x
110aa
a = - 0 -
b
b = 1 - 0
75 3.2
Example
y
z
000
111
100
101001
010
011
x
110aa
a = - 0 -
b
b = 1 - 0 D(a, b) = 0
76 3.2
Example
y
z
000
111
100
101001
010
011
x
110aa
a = - 0 -
b
b = 1 - 0 D(a, b) = 0
c
c = 1 1 1
77 3.2
Example
y
z
000
111
100
101001
010
011
x
110aa
a = - 0 -
b
b = 1 - 0 D(a, b) = 0
c
c = 1 1 1 D(a, c) = 1
78 3.2
Example
y
z
000
111
100
101001
010
011
x
110aa
a = - 0 -
b
b = 1 - 0 D(a, b) = 0
c
c = 1 1 1 D(a, c) = 1
xyz 00 01 11 10
0
1