GENERALISED IF-THEN-ELSE OPERATOR FOR COMPACT POLYNOMIAL REPRESENTATION OF MULTI OUTPUT FUNCTIONS Ilya Levin, Osnat Keren Tel Aviv University, Bar Ilan University, Israel DSD 2011
Outline Logic functions vs. System of Logic functions Preliminaries Generalised ITE (GITE) operator EvP and ExP Partition algebra of EvP Boolean algebra of ExP Dichotomy property Decomposition Conclusions
Logic Function vs. System of Logic Functions b 4 6 4 6 5 7 b 5 7 b d 1 0 3 2 13 9 c 12 8 a 15 11 14 10 c d 1 0 3 2 13 c 12 8 15 14 10 c d 9 a 11 d
Logic Function b 4 6 I. Single Logic 5 7 b function 0 2 c 12 14 II. Two-block 1 3 13 15 Partition of Boolean Cube d 9 8 a 11 10 c d
System of Logic Functions 4 6 I. n Logic 5 7 b functions 0 2 c 12 14 II. n-block 1 3 13 15 Partition of Boolean Cube d 8 10 c 9 a 11 d
Two Domains Boolean Algebra of output vectors Partitions Algebra of input vectors
Partitions Definition. A partition on a set C is a collection of disjoint subsets of C whose set union is C, i.e. π = { B } α such that: B B = ( α β)and { B } = C. α β α Example: S = { 1,2,3,4,5,6,7,8 } { { }} = 1; 2; 3, 4, 7; 5,6,8 π = { 1}, { 2}, { 3,4,7}, 5,6,8 1 { }
Partitions A product π prd = π 1 iπ 2 of partitions π 1 and π 2 is a partition comprising intersections of blocks π 1 and π 2 : s t ( π iπ ) iff s t ( π ) & s t ( π ). 1 2 2 1 A sum ( π + π )of the partitions π and π defined as follows: 1 2 1 2 s t ( π + π ) iff a chain s,s,,s exists in C such as: 1 2 0 1 n s = s,s,,s = t, for which either s s ( π ) or 0 1 n i i+1 1 s s ( π ), 0 i n 1. i i+1 2
Algebra of Partitions The algebraic structure of partitions is known as a lattice. This lattice has both Zero (the smallest partition π 0 ) and One (the biggest partition π 1 ) elements defined as follows: π 0 { = s ; ;s }; 1 m (π 1 +π 2 ) π 1 { = s,, s }. 1 m π 1 π 2 (π 1 π 2 )
Algebraic Decision Diagrams (ADD) ü Proposed in 1993 by R. Baher, E. Frohm, C. Gaona, G. Hachtel, E. Macii, A. Parvo, F. Somenzi ü Multi Output Functions as ADD ü Different forms of representation of ADDs ü Operations: Apply and If-Then-Else operation ü Used for: matrix multiplication, shortest path algorithms, and numerical linear algebra.
Algebraic Decision Diagram An ADD is a function: { } n S f : 0,1 where S is the finite carrier of the algebraic structure. ADD is a form for representation of Multi Output Functions (MOF).
Algebraic Decision Diagram ü ADDs representations MTBDD Matrix ü ADD operations Apply If-Then-Else (ITE)
Apply operation Apply( f,g,op) = f op g f = 1 1 0 0 1 1 0 0 0 0 1 1 0 0 1 1 ; g = 4 4 4 4 4 4 4 4 2 2 2 2 2 2 2 2 Apply( f, g, + ) = 5 5 4 4 5 5 4 4 2 2 3 3 2 2 3 3
If-Then-Else (ITE) operation ( ) = f ig + f ih ITE f,g, h f = 1 1 0 0 1 1 0 0 0 0 1 1 0 0 1 1 ; g = 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 ; h = 4 4 4 4 4 4 4 4 2 2 2 2 2 2 2 2 ITE( f, g, h) = 3 3 4 4 3 3 4 4 2 2 3 3 2 2 3 3 The ITE comprises a Boolean function operation as a binary condition being a two-block partition of the Boolean space
ITE vs. GITE ITE - two-block partition on the Boolean cube GITE - n-block partition on the Boolean cube
Generalised ITE operation Definition. Generalized ITE (GITE) is GITE( π,y ) where: π = B ; ; B 1 m is a partition on the Boolean space; Y = Y,,Y 1 m a set of operators - binary vectors. Y ( i =1,,m )corresponds to a certain block B of the partitionπ. i i Thus, GITE consists of a partition portion (Evolution Part) and an operator portion (Execution Part).
Multi Output Function as GITE Definition A Multi Output Function (MOF) is a mapping f : { 0,1} n Y, which is GITE( π,y ) defined on two sets: a) the partitions π and b) the set Y of operators.
Polynomial representation of GITE Example : D = B 1 Y 1 + B 2 Y 2 + B 0 Y 0 B 1 = x 1 ; B 2 = x 1 x 2 ; B 0 = B 1 + B 2
GITE D = AB( 11) + AB( 10) + AB( 01) + AB( 00) A X EvP B B 00 01 10 11 ExP Y
GITE algebra is a product of two algebras EvP Partitions Algebra ExP Boolean Algebra
GITE algebra The GITE algebra is a product of two algebras: the algebra of partitions on the Evolution Part the Boolean algebra on the Execution Part
Partitions Algebra of GITE Evolution Part
GITE Apply operation Definition: GITE Apply operation ( ) = D a opd b = Apply D a, D b,op = GITE( π a iπ ;Y opy,y opy,y b a1 b1 a1 b2 am opy ), bm GITE Apply operation is performed by multiplying partitions π and by pair-wise op operation on operators Y.
GITE Apply operation Definition. Apply operation on GITE-polynomial we call Product of GITE-polynomials and define as follows: m Let D = Y 1 i +B 1 0 Y 0, D = Y 2 k +B 2 0 Y 0 i=1 l. k=1 D D = Apply( D 1 2 1, D 2,op)= B ij for each pair of terms from D 1 and D 2, 1 Bkl 2, Y i opy k { } B1 Bkl 2 is a logic product (AND) of B-functions; ij Y i opy j - is the Apply operation between Y i and Y k
GITE Apply operation The Apply operation between D 1 = GITE( π 1 ;Y 11,,Y ) 1m and D 2 = GITE( π 2 ;Y 21,,Y 2m ): D op = Apply( D 1, D ) 2 = D 1 op D 2 = GITE( π 1 iπ 2 ;Y 11 opy 21,,Y 1m opy 2m ). D1 D2 Dop op = π 1 π 2 π 1 π 2
Factorization of GITE expressions The product of GITE partitions corresponds to the Apply operation, The sum of GITE partitions corresponds to factorization of GITEs. Define the factorization of GITEs as follows: ( ), D = D i op D j = GITE π i + π j ; D 1,, D f ( ) where f is a number of blocks in π i + π j D 1,, D f stand for GITEs representing remaining functions.
Example Let D 1 = x 1 Y 1 + x 1 x 2 Y 2 + x 1 x 2 Y 3, D 2 = x 1 Y 4 + x 1 x 3 Y 5 + x 1 x 3 Y 6. D D = GITE π ;Y,Y,Y 1 2 1 1 2 3 GITE π ;Y,Y,Y 2 4 5 6 = GATEπ +π ; D, D 1 2 23 456 D D = D D, D = x D + x D ; 1 2 3 23 456 1 23 1 456 where: D =Y x Y + x Y 23 1 3 5 3 6 D = x Y + x Y 456 2 2 2 3 Y 4 ; =
Substitution Let D 1, D 2, D 3 be : ( ( D = GITE π ;Y,Y ), D = GITE π ;Y,,Y ), 1 1 11 12 2 2 21 2m ( ) D 3 = GITE π 3 ;Y 31,,Y 3m After substitution: Y 11 D 2 Y 12 D 3,we have: ( ) D 1 = GITE π 1 ;D 2, D 3
Boolean algebra of GITE Execution Part
Boolean algebra of GITE Execution Part A A B + = B B 00 10 00 01 00 01 10 11
Boolean algebra of GITE Execution Part Example 1: X + Y = ( X & Y ) A B A & = 11 01 11 10 B B X & Y 11 10 01 00
Boolean algebra of GITE Execution Part Example 2 A X Y A B + = B B 000 001 000 011 000 011 001 011
Boolean algebra of GITE Execution Part Example 2 X A Y B A & = B B 111 110 000 011 000 011 000 010
Boolean algebra of GITE Execution Part Example 2: X + X & Y = X + Y A A + X & Y = B B 000 001 000 011 001 011
Decomposition Beginning from the initial implicant table to construct a network consisting of a number of component GITE Minimise component independently Each of the components have to be dichotomic
Dichotomic Fragment We say that a set of product terms forms a dichotomic fragment, if the set is straightforwardly mappable into an MTBDD. The dichotomic property guarantees that there exists a Shannon expansion that will not bring additional product terms to the initial GITE. The dichotomic property means that the paths of the MTBDD are in one-to-one correspondence with product terms of the GITE.
Dichotomy Property We study cases where GITE is represented by a MTBDD. Our hypothesis is that the GITE can be more efficiently represented by a set of dichotomic fragments. The whole GITE would be considered a set of sub-gite, functionally equal to the initial GITE. Any GITE can be decomposed into a network of dichotomic fragments connected by the Apply and the Substitution operations.
Algebraic Decomposition Method The proposed decomposition algorithm is based on grouping of the set of cubes representing the function to a set of blocks. The algorithm is algebraic decomposition method. Function F is represented as: F = D Q + R where D, Q and R, are the divisor, quotient and remainder.
Algebraic Decomposition Method Decomposition is performed simultaneously on the set of functions that are represented as a single GITE - polynomial. Our algebraic decomposition has the form: D = GITE ( π h, D 1,...D ) j R. Where: divisor π h is a block header, quotient ( D 1,...D j ), D i, i = 1,..., j, is a block fragment, Reminder R consists of the remaining cubes that were not included in the block. The partition π h together with the GITE-polynomials D i form a block.
Decomposition!
Two Algorithms of Decomposition ü Two algorithms have been developed and studied: a density algorithm and a dichotomy algorithm ü Both algorithms use one and the same general decomposition method ü The general method is the partitioning of the set of cubes into a number of components. This partitioning is performed recursively ü On each step of the recursive procedure, the corresponding component is partitioned into two subsets: a common header and a remainder ü Each common header is implemented as a conventional MTBDD ü The main concern of the general decomposition method is searching for optimal common headers, for obtaining optimal resulting MTBDD
Dichotomy Oriented Decomposition Begin stack<=pla stack<= 0 (PLA) PLA<=stack stack<= 1 (PLA Stack 1 End Shannon expansion 0 1 0 Column without Decomposition
Density Block density corresponds to a number of literals in the block s cubes normalised by the maximal possible number of literal in this block. The success of the decomposition strongly depends on the density.
Experimental Results - Low Density
Experimental Results - High Density
Conclusions ü Generalised ITE (GITE) operation is introduced ü Multi output functions can be expressed by the GITE ü GITE comprises Evolution Part (EvP) and Execution Part (ExP) ü GITE algebra is a product of two algebras: Partition algebra of ExP and Boolean algebra of EvP ü The problem of GITE decomposition is formulated ü Mutual effect of the algebras are used as a base of the decomposition algorithm