Disjoint Sum of Products by Orthogonalizing Difference-Building ⴱ

Abstract The orthogonalization of Boolean functions in disjunctive form, that means a Boolean function formed by sum of products, is a classical problem in the Boolean algebra. In this work, the novel methodology ORTH[ⴱ] of orthogonalization which is an universally valid formula based on the combination technique »orthogonalizing difference-building ⴱ« is presented. Therefore, the technique ⴱ is used to transform Sum of Products into disjoint Sum of Products. The scope of orthogonalization will be solved by a novel formula in a mathematically easier way. By a further procedure step of sorting product terms, a minimized disjoint Sum of Products can be reached. Compared to other methods or heuristics ORTH[ⴱ] provides a faster computation time.


Introduction and Preliminaries
A Boolean function of n variables is defined as the mapping f (x) : {0, 1} n → {0, 1}. Four normal forms of Boolean functions exist, the disjunctive normal form (DNF), conjunctive normal form (CNF), antivalence normal form (ANF) and equivalence normal form (ENF), which consist of either product terms p k (x) := ⋀︀ n i=1 x i = x 1 ∧ .. ∧ xn or sum of terms s k (x) := ⋁︀ n i=1 x i = x 1 ∨ .. ∨ xn (with n ≥ 1 as the number of the variables; dimension) in which variables are either negated x i or not-negated [1,2]. The normal form is the canonical representation of the Boolean function. That means that all given variables are included in a product term or sum of term respectively. The reduced form, i.e. non-canonical representation of terms, are called disjunctive, conjunctive, antivalence and equivalence forms DF, CF, AF and EF. The disjunctive form is also considered as the Sum of Products (SOP) and notes as A is the index set of the running index i. The AF is a special form of Exclusive-Or Sum of Products (ESOP) and is defined as with N > 1 as the upper bound of the number of the product terms [? ]. The orthogonality of a Boolean functions is a special attribute. A function is orthogonal if their terms have the characteristic of being disjoint in pairs in at least one variable. Thus, the following applies for the disjoint Sum of Products (dSOP): dSOP(x) := N ⋁︁ k=1 p k (x) whereby p i (x) ∧ p j (x) = 0 . (3) An orthogonal representation of a SOP, that means dSOP, is characterized by product terms which are disjoint to one another in pairs [3,4]. Consequently, the intersection of these product terms results in 0. The orthogonal representation of a DF -disjoint Sum of Products -is equal to the orthogonal form of an AF -the disjoint Exclusive-Or Sum of Products. In this case, it applies dSOP(x) = dESOP(x) [3][4][5]. That means, the dSOP is equivalent to dESOP consisting of the same product terms and differ only in the logical connectivity between the product terms. This relationship can be explained well with the following definition out of [6], if both product terms p i (x) and p j (x) are disjoint to each other. A SOP of two product terms can be transformed into an ESOP by: ) . (4) In the special case, that both products terms are disjoint, building their conjunction results to 0. As x i ⊕ 0 = x i is, following relation follows from the Eq. (4): In this case, the left side is equal to the right side which means that a dSOP is equivalent to a dESOP. It applies dSOP(x) = dESOP(x).
x 1 x 2 x 3 In a K-map a dSOP is characterized by nonoverlapping cubes (Figure 1). Special calculations can be easier solved in another form. It simplifies the handling of further calculations in applications of electrical engineering, e.g. calculation of suitable test patterns for combinational circuits for verifying feasible logical faults, which can mathematically be determined by Boolean Differential Calculus (BDC) [1,7]. That means, the orthogonalization of a SOP facilitates the transformation into an equivalent dESOP [1,3,8] and this characteristic simplifies the handling of BDC especially in Ternary-Vector-List (TVL) arithmetic [3,[9][10][11]. Due to the restricted number of variables the terms of SOP are not priory disjoint. However, the disjoint form can be calculated by using a novel Boolean formula based on the novel combining technique of »orthogonalizing difference-building ⊖«.

Orthogonalizing Difference-Building ⊖
Orthogonalizing difference-building ⊖ is the composition of two calculation steps -the usual difference-building out of the set theory and the subsequent orthogonalization, as shown in Figure 2. The result of ⊖ is orthogonal in contrast to the result out of the method differencebuilding. Both results are different in their representations but homogenous in their covering of 1s. They only differ in their form of coverage, whereas the method ⊖ constitutes the solution in already orthogonal form. This method ⊖ is generally valid and equivalent to the usual method of difference-building [3]. The orthogonalizing differencebuilding ⊖ corresponds to the removal of the intersection which is formed between the minuend product term pm(x) and the subtrahend product term ps(x) from the minuend product term pm(x), which means pm(x) − (pm(x) ∧ ps(x)). The result consists of several product terms which are pairwise disjoint to each other. The Equation (6) applies with n, n ′ ∈ N as the dimension of pm(x) and ps(x). In this case, the formula ( [4] is used to describe the orthogonalizing difference-building in a mathematically easier way. The method of orthogonalizing difference-building ⊖ is demonstrated by the following Example 1. 1 and it appears a result, which consist of pairwise disjoint product terms. The explanation of Eq. (6) is given by the following points: -The first literal of the subtrahend, here x 2 , is taken complementary and build the intersection with the minuend, here x 1 . Consequently, the first term of the difference is x 1 x 2 . -Then the second literal, here x 3 , is taken complementary and the intersection with the minuend and the first literal x 2 of the subtrahend is built. Therefore, the second term is -Following the next literal, here x 4 , is taken complementary and the intersection with the minuend and the first literal x 2 and second literal x 3 of the subtrahend is built. Thus, the third term of the difference is -This process is continued until all literals of the subtrahend are singly complemented and linked by building the intersection with the minuend in a separate term.
n orth as the number of product terms in the orthogonal result corresponds to the number of literals presented in the subtrahend ps(x) and are not presented in the minuend pm(x) at the same time. Following rules must be followed to get correct results for the application of ⊖: 1. If the subtrahend is already orthogonal to the minuend (ps(x) ⊥ pm(x)) the result corresponds to the minuend: 2. The difference between 0 and the subtrahend is the subtrahend itself: 3. The result between 1 and subtrahend is the complement of the subtrahend which results in a dSOP: 4. Thereby, the subset symbol ⊆ of the set theory is transferred to switching algebra. The result between subtrahend and minuend is empty if the subtrahend is already completely contained in the minuend. If the subtrahend is the subset of the minuend (ps(x) ⊆ pm(x)), the result is 0:

Mathematical Methodology
The orthogonalization of every SOP(x) consisting of at least two product terms (N > 1) can be performed by Eq. (11) which bases on the Eq. (6), which is based on the combination technique of ⊖ [3]. The order of the calculation is important. That means, the first two product terms must be calculated and then the third product term must be calculated with the result of the two product terms before, and so on. The result of dSOP(x) can diversify depending on the starting product term. As a SOP has the characteristic of being commutative, the order of their product terms can be changed for getting results with fewer number of disjoint product terms called as N orth . To obtain better result is often reached by ordering the product terms from higher number of variables to fewer number of variables. Following Example 2 gives an overview about the procedure orthogonalizing by Eq. (11) and afterwards the Example 3 with an additional process of sorting.
Function dSOP 1 (x) consists of four disjoint product terms (N orth = 4) and is the orthogonalized form of SOP 1 (x). Both are equivalent. They only differ in their form of coverage which is illustrated in the K-maps as shown in Figure 3.
Function sort dSOP 1 (x) is another equivalent orthogonal form of SOP 1 (x) which consists of two disjoint product terms (N orth = 2) that is also illustrated in third K-map ( Figure 3). The coverage of 1s is done by two cubes. By sorting, a minimized dSOP can be reached. The comparison of the three functions shows their equivalence. They are homogenous and only differ in their form of superimposition.

Algorithm
The corresponding Algorithm ORTH[⊖], whose pseudo code is shon in the Table 1 outlines the computational procedure of orthogonalization of a SOP according to the formula in Eq. (11). To obtain dSOP with fewer number of product terms, the sub-functions absorb() and sort() are additionally used. absorb() is a function which reduces the number of product terms of the SOP, which serves as the input of the algorithm. The reduction is achieved by by absorption of smaller product terms, which consists of higher number of variables, by larger product terms, which consists of lower number of variables if those are already covered by the larger ones (following example): The product term x 1 is absorbing the other two product term. Additionally, absorb() reduces duplicated product terms to a single term which is demonstrated with the following example: Consequently, by using absorb() the number of product terms, that have to be treated decreases. With the optionally function sort() follows the resorting of the product terms from smaller product terms to larger product terms. After proceeding these two sub-functions absorb() and sort() the process of orthogonalization ORTH[⊖] according to the method ⊖ is performed.

N orth before and after Sorting
However, to make a statement about the optimized form, the optimum minimization would have to be defined, which has not yet been clarified. Table 2 illustrates the percentage of reduced terms by the use of subsequent procedure of sorting. The procedure of sorting brings an advantage for gaining minimized dSOP. Firstly, a list of ten non-orthogonal functions in respect to N = {5, 10, 15} and dimension xn = {5, 6, . . . , 50} were created. Consequently, per each N has produced 50 different nonorthogonal SOPs. Subsequently, each SOP was orthogonalized according to the method ⊖ before and after sorting. The resulting number of product terms N orth in dSOP and sort N orth in sort dSOP in respect to N and xn were determined ( Figure 4) and compared. The number of product terms of a sorted SOP is fewer then the unsorted SOP. It follows sort N orth (N, xn) < N orth (N, xn). An average value of these values was calculated for each dimension xn. Thereby, the results of the quotients of the average number of disjoint product terms were obtained. Furthermore,   can be deduced from this. Probably, this benefit is given by the use of "espresso.exe" , which is a program used as heuris-

Comparison in Computation Time
In   Figure 6a) -f). The measurements are limited to the dimension xn = 50. Against this, for dimension xn > 50 similar results are expected.

Summary and Conclusions
This work introduced a generally valid method of »orthogonalizing difference-building ⊖« which is used to calculate the orthogonal difference of two product terms. Fur-thermore, rules for this method were explained which must be followed to get correct results. By a novel formula based on the combining technique ⊖ every Sum of Products (SOP) can easily be orthogonalized mathematically. Thus, we get disjoint Sum of Products (dSOP).
A minimized dSOP can also be reached by two additional procedures of sorting and absorbing of terms before the process of orthogonalization. By sorting the product terms of a SOP are resorted from smaller number of variables to higher number of variables. This resorting brings an advantage of approximately 17% and 26% depending on N to reach minimized dSOP.