Uploaded by juan- luis garcía zapata

PartAlg pres

advertisement
Partition Algebra for Boolean Optimization
Juan Luis García Zapata
Departamento de Matemáticas
Universidad de Extremadura
This work was supported by the Spanish “Ministerio de Ciencia e Innovación” under Project
PID2019-110315RB-I00/AEI/ 10.13039/501100011033 (APRISA), by the European Regional
Development Fund “A way to achieve Europe” (ERDF) and by the “Junta de Extremadura” under Grant
IB20040. Also, this work is partially supported by the “Consejería de Economía, Ciencia y Agencia
Digital (Junta de Extremadura),” and by the “Fondo Europeo de Desarrollo Regional de la Unión
Europea” under Grant GR21099.
1 Boolean functions
2 Partition algebra
3 Functions using systems of partitions
4 Applications
Boolean functions
Partition algebra
Functions using systems of partitions
Applications
B = {0, 1} is the set of Boolean values.
Bn = B × B × · · · × B = { 00 · · · 00
00 · · · 01
00 · · · 11
is the set of n-bit arrays.
······
11 · · · 10
11 · · · 11 }
A Boolean function is:
f:
Bn
−→ B
(x1 , x2 , . . . , xn ) 7−→ x
where x, xi = 0 or 1.
Partition Algebra for Boolean Optimization
Juan Luis García Zapata
Boolean functions
Partition algebra
Functions using systems of partitions
Applications
Expressing Boolean functions
• Tabular
(truth table)
• Algebraic
f (x1 , x2 , x3 ) =
= x1 x2 x3 + x1 x2 x3 + x1 x2 x3 + x1 x2 x3 =
= x1 x2 x3 + x1 x2 + x2 x3
• With a Binary
Decision Diagram
(BDD)
Partition Algebra for Boolean Optimization
Juan Luis García Zapata
Boolean functions
Partition algebra
Functions using systems of partitions
Applications
BDD advantages
Easy to build from the truth table or from formula.
Polynomial algorithms (in n, number of variables) for
conjunction, disjunction and negation.
Polynomial algorithms for permutation of the order of
variables.
Partition Algebra for Boolean Optimization
Juan Luis García Zapata
Boolean functions
Partition algebra
Functions using systems of partitions
Applications
Key aspects of Boolean functions on X = Bn
1
Each xi : X = Bn −→ B partitions X in two blocks (the
−1
on-set x−1
i (1) and the off-set xi (0)).
2
Each u ∈ X is univocally identified by
(x1 (u), x2 (u), . . . , xn (u)).
So, (x1 , x2 , . . . , xn ) is a set of partitions that codify the elements
of X.
We generalize that codification!
Partition Algebra for Boolean Optimization
Juan Luis García Zapata
Boolean functions
Partition algebra
Functions using systems of partitions
Applications
Partitions
A partition on a finite set X is a family of subsets
B1 , B2 , . . . , Bk ⊂ X verifiying
S
X = ki=1 Bi
Bi ∩ Bj = ∅ for i 6= j
A partition π = {B1 |B2 | · · · |Bk } is the same that an equivalence
relation.
Order: another partition σ = {C1 |C2 | · · · |Cm } is π ≤ σ iff for
each Bi there is a Cj with Bi ⊂ Cj . π is finer than σ.
Partition Algebra for Boolean Optimization
Juan Luis García Zapata
Boolean functions
Partition algebra
Functions using systems of partitions
Applications
The set of partitions
Π(X) is a lattice.
The maximum is the
trivial partition
π> = {X}
The minimum is the
partition in elements
π⊥ = {{u1 }|{u2 }| · · · |{uN }}
[Image: wikipedia]
Partition Algebra for Boolean Optimization
Juan Luis García Zapata
Boolean functions
Partition algebra
Functions using systems of partitions
Applications
The rank of π is it height
over π⊥ .
The meet is
π ∧ σ = {Bi ∩ Cj }
for Bi ∈ π and Cj ∈ σ.
The join is the transitive
closure J + of the relation
J defined by union of
equivalence classes of π
and σ.
uJv ⇔ u, v ∈ Bi ∪ Cj
π ∨ σ = J+
Partition Algebra for Boolean Optimization
Juan Luis García Zapata
Boolean functions
Partition algebra
Functions using systems of partitions
Applications
Systems of partitions
In (Π(X), ∧, ∨) there is a complement (not unique): each π has
at least one π 0 verifiying:
π ∧ π 0 = π⊥
π ∨ π 0 = π>
A system is an array of partitions (π1 , π2 , . . . , πn ).
A system is separator if
π1 ∧ π2 ∧ · · · ∧ πn = π⊥
That is, if for each u, v ∈ X there is a πi that has u and v in
different classes.
A separator system is minimal if no other system included in it is
separator.
Partition Algebra for Boolean Optimization
Juan Luis García Zapata
Boolean functions
Partition algebra
Functions using systems of partitions
Applications
Basis and rank
A minimal separator system is a basis of X.
We focus on binary partitions π = {B0 |B1 }, the maximal
non-trivial elements of Π(X). B0 = B1c . Other partitions are
∧-combinations of binary partitions.
Also focus on balanced binary partitions |B0 | = |B1 |. It has
maximum entropy.
Theorem
If |X| = 2n , a basis (π1 , π2 , . . . , πn ) of balanced binary partitions
has cardinal n.
Proof: Easy, by rank properties.
Partition Algebra for Boolean Optimization
Juan Luis García Zapata
Boolean functions
Partition algebra
Functions using systems of partitions
Applications
In X = Bn , each Boolean variable xi defines a balanced binary
−1
partition {x−1
i (0)|xi (1)}.
The system (x1 , x2 , . . . , xn ) is a balanced binary basis.
E.g. (x1 , x2 , x3 ) in X = B3 .
111
1
011
101
110
0
001
010
100
x2
1
There are other bases!
x1 (u) = 1
000
x3
0
x1
x1 (u) = 0
Partition Algebra for Boolean Optimization
Juan Luis García Zapata
Boolean functions
Partition algebra
Functions using systems of partitions
Applications
π1 is the parity function:
π1 (u) = x1 ⊕ x2 ⊕ x3
being ⊕ the exclusive or.
(π1 , x2 , x3 ) is a balanced
binary basis.
Partition Algebra for Boolean Optimization
Juan Luis García Zapata
Boolean functions
Partition algebra
Functions using systems of partitions
Applications
Basis and rank II
There is many balanced binary bases (bb-bases).
Lemma
A system (π1 , π2 , . . . , πk ) of k balanced binary partitions can be
extended to a bb-basis iff
rank(π1 ∧ π2 ∧ · · · ∧ πk ) = n − k
The rank is computed by a connected components finding
algorithm (Tarjan O(n)).
We.have many possible choices to extend the system: Each class
Vk
in X
i=0 πi is binary partitioned. One class of πk+1 is the union
of one part of each partition. The other class of πk+1 is its
complement.
Partition Algebra for Boolean Optimization
Juan Luis García Zapata
Boolean functions
Partition algebra
Functions using systems of partitions
Applications
Boolean function on a simpler basis
A bb-basis
∼
X −→ Bn
u
(π1 (u), π2 (u), . . . , πn (u))
is a coordinatization of X.
Under this bijection, a Boolean function
f
X ' Bn −→ B is to choose a subset
f −1 (1) = U ⊂ X.
The coordinatization allows us to define a
BDD following the πk :
Partition Algebra for Boolean Optimization
Juan Luis García Zapata
Boolean functions
Partition algebra
Functions using systems of partitions
Applications
For instance, the parity function f (u) = π1 (u) = x1 ⊕ x2 ⊕ x3
In bb-basis (π1 , x2 , x3 ).
In bb-basis (x1 , x2 , x3 ).
Partition Algebra for Boolean Optimization
Juan Luis García Zapata
Boolean functions
Partition algebra
Functions using systems of partitions
Applications
Minimization problems
For several combinatorial structures, we can find a compact
representation. For N = |X| and n = log2 (N ):
1
Subset U ⊂ X : equivalent to a Boolean function. One BDD.
2
Map X −→ X. If v = F (u), we express each “bit” of
(π1 (v), π2 (v), . . . , πn (v)) as a function of u: F is equivalent
to n different Boolean functions. n BDDs.
3
Graph X −→ P(X): equivalent to choose a subset for each
u ∈ X. N BDDs.
F
These representations are greatly reduced with the suitable choice
of a bb-basis.
Partition Algebra for Boolean Optimization
Juan Luis García Zapata
Boolean functions
Partition algebra
Functions using systems of partitions
Applications
To do
Algorithms for rank and change of basis. Also for operations
with the above structures. Complexity?
Relax the requirement of balanced partition in the basis. Also
binary requirement.
Gimpel reduction technique for the covering problem.
[Analogy with Linear Algebra]
Partition Algebra for Boolean Optimization
Juan Luis García Zapata
Boolean functions
Partition algebra
Functions using systems of partitions
Applications
References
Coudert, Olivier. "Two-level logic minimization: an overview."
Integration 17.2 (1994): 97-140.
Knuth, D. "Binary decision diagrams." The Art of Computer
Programming. Volume 4A: Combinatorial Algorithm, Part 1
(2011).
Kung, J.P., Rota, G.C. and Yan, C.H. Combinatorics: the Rota
way. Cambridge University Press (2009).
Partition Algebra for Boolean Optimization
Juan Luis García Zapata
Download