1 Introduction
The interest in decomposition of positive DNFs stems from computationally hard problems in game theory, reliability theory, the theory of hypergraphs and set systems. A survey of relevant literature can be found in [1]. In the context of voting games, boolean variables are used to represent voters and the terms of a positive DNF correspond to the winning coalitions, i.e., the groups of voters, who, when simultaneously voting in favor of an issue, have the power to determine the outcome of the vote (i.e., in this case the DNF is evaluated as true). Dual to them are blocking coalitions, i.e., those that force the outcome of the vote to be negative, irrespective of the decisions made by the remaining voters. The problem to find blocking coalitions with a minimal number of voters is easily shown to be equivalent to the hitting set problem, which is NPcomplete. Decomposing a DNF into components allows for reducing this problem to inputs having fewer variables.
In this paper, we consider decomposition of a positive DNF into a conjunction of DNFs sharing a given (possibly empty) subset of variables (in this case we say that a DNF is decomposable). Decomposition of this kind facilitates finding a more compact representation of a positive boolean function. For example, the following positive DNF can be represented as a conjunction of two formulas:
(1) 
i.e., it is decomposable into the components and . The following positive DNF is not decomposable, but it is decomposable:
(2) 
which can be easily verified by converting the expression into DNF.
In other words, decomposition allows for common variables (from a set ) between the components and partitions the remaining variables of a given formula. In particular, each of the components has fewer variables than the given formula. Decomposition into variable disjoint components (i.e., decomposition for ) is known as disjoint conjunctive decomposition, or simply as ANDdecomposition. The notion of ORdecomposition is defined similarly.
The minimization of positive DNFs via decomposition in the sense above is related to open questions, not sufficiently addressed in the previous literature. For example, there is a fundamental work by Brayton et al. on the multilevel synthesis [2]
, which provides minimization methods with heuristics working well for arbitrary boolean functions. However, this contribution leaves space for research on minimization for special classes of functions, where the problem is potentially simpler. This is evidenced by the research in
[3] and [4], for example.It has been observed that the quality of multilevel decomposition (i.e., alternating AND/OR–decomposition) of DNFs strongly depends on the kind of decomposition used at the topmost level. As a rule, OR–decomposition has a priority over ANDdecomposition in applications, since it is computationally trivial (while ANDdecomposition is considered to be hard and no specialized algorithms for DNFs are known). However, choosing ANDdecomposition at the topmost level may provide a more compact representation of a boolean function. For example, application of “AND–first” strategy gives a representation of the following positive DNF
in the form Further, OR–decomposition of the second component gives and (the first component similarly ORdecomposes syntactically). Finally, ANDdecomposition of the obtained formulas gives a representation
which is a readonce formula of depth 4 having 13 occurrences of variables.
On the contrary, Espresso^{1}^{1}1a well–known heuristic optimizer based on the work of Brayton et al., which is often used as a reference tool for optimization of boolean functions, which implements OR–decomposition at the topmost level, gives a longer expression:
which is a formula of depth 5 having 18 occurrences of variables and this formula is not readonce.
Bioch [1] studied (variable disjoint) decompositions of positive boolean functions in the form , where is a partition of the variables of and are some (positive) boolean functions. The set is called a modular set of in this case. By taking , one can see that the number of modular sets of is exponential in (since any subset of the variables is modular). Bioch showed that one can compute a tree in time polynomial in the size of an input positive DNF, which succinctly represents all its modular sets. Given a modular set , the corresponding component can be also computed in polynomial time. These important results leave the question open however, which modular sets one should choose, when trying to find a compact representation of a boolean formula. For example, the modular tree for the DNF from equation (1) consists of the singleton variable subsets (plus the set of all the variables of being modular by definition), from which one can obtain representations of the form (and similarly for and selected). On the other hand, decomposition of this formula gives the representation , which is more compact.
It has been shown in [5] that decomposition of a positive DNF can be computed in time polynomial in the size of the input formula (given as a string). In fact, it has been proved that decomposition reduces to factorization of a multilinear boolean polynomial efficiently obtained from the input positive DNF. For the latter problem the authors have provided a polynomial time algorithm based on the computation of formal derivatives. In this paper, we generalize the results from [5]. First, we provide an algorithm, which computes the finest decomposition components of a positive DNF. Since decomposable formulas are expected to be rare, we consider the more general notion of decomposition. The problem of computing decomposition (for an arbitrary given ) can be reduced to decomposition: it suffices to test whether each of the (exponentially many) DNFs, obtained from the input one for (all possible) evaluations of variables, is decomposable with the same variable partition. The reduction holds for arbitrary boolean expressions, not necessarily positive ones. We show however that for positive DNFs, it suffices to make decomposition tests only for a polynomial number of (positive) DNFs obtained from the input one. As a result, we obtain a polynomial time algorithm, which computes the finest decomposition components of a positive DNF for a subset of variables .
2 Preliminaries
A boolean expression is a combination of constants and boolean variables using conjunction, disjunction, and negation. A boolean expression is a DNF if it is a disjunction of terms (where each term is a conjunction of literals and constants). We assume there are no double negations of variables in boolean expressions, no double occurrences of the same term in a DNF, or of the same literal in a term of a DNF. A DNF is positive if it does not contain negated variables and the constant . For a set of variables , a literal is a literal with a variable from . We use the notation for the set of variables of an expression . For boolean expressions and , we write if they are logically equivalent.
Definition 1 (decomposability)
Let be a boolean expression and a subset of variables. The expression is decomposable if it is equivalent to the conjunction of boolean expressions , where , such that the following holds:

;

, for all , ;

, for .
The expressions are called ()decomposition components of . If and the above holds then we call decomposable, for short.
Clearly, decomposition components can be subject to a more finegrained decomposition, wrt the same or different delta’s. It immediately follows from this definition that a boolean expression, which contains at most one nonvariable, is not decomposable. Observe that conditions in the definition are important: if any of them is omitted then every boolean expression turns out to be –decomposable, for any (proper) subset of variables .
Definition 2 (Finest Variable Partition wrt )
Let be a boolean expression, a subset, and a partition of . The expression is said to be decomposable with partition if it has decomposition components , for , such that .
The finest variable partition of (wrt ) is if is not decomposable. Otherwise it is the partition , which corresponds to the nondecomposable components of .
It will be clear from the results of this paper that for any , the finest variable partition of a positive DNF is unique. In the general case, (e.g., for arbitrary boolean expressions), this property follows from the result proved in [6] for a broad class of logical calculi including propositional logic. As will be shown below, once the finest variable partition of a DNF is computed, the corresponding (nondecomposable) components of are easily obtained.
Throughout the text, we use the term assignment as a synonym for a consistent set of literals. Given a set of variables , where , a assignment is a set of literals , where is a literal over variable , for .
Let be a DNF, a subset, and a assignment such that there is a term in , whose set of literals is contained in . Then the substitution of with , denoted by , is a DNF defined as follows:

if there is a term in such that every literal from is contained in then (and is called satisfying assignment for , notation: );

otherwise is the DNF obtained from by removing terms, whose set of literals is not contained in , and by removing literals in the remaining terms.
For example, for the positive DNF from (2) we have .
For DNFs and , we say that implies if for any assignment , it holds or . For a set of variables and a DNF , a projection of onto , denoted as , is the DNF obtained from as follows. If there is a term in which does not contain a variable from then . Otherwise is the DNF obtained from by removing literals with a variable not from in the terms of . It should be clear from this definition that implies (in the literature, projection is also known as a
uniform interpolant
or the strongest consequence of wrt ). For instance, for the DNF from (2) we have .Lemma 1 (Decomposition Components as Projections)
Let be a DNF, which is decomposable with a variable partition . Then , where , , are decomposition components of .
Proof
Since implies , for , it suffices to demonstrate that implies . Assume , where are decomposition components of , with , for . We show that implies , for all . For suppose there is a assignment such that and , for some . Then by the definition of the projection there exists an assignment such that and , which is a contradiction, since implies , for . As implies , we conclude that implies .
Let be a set of variables, a subset, and a set of assignments. By we denote the set of all assignments , for which there is an assignment such that . For a assignment , the notation stands for the set of assignments such that . Let be disjoint sets of variables and for , let be a set of assignments. Then the notation stands for the set of all assignments such that and . The intuitive relationship between the cartesian combinations of assignments is illustrated by the following remark and is put formally in the subsequent Lemma 2.
Remark 1 (Conjunction of DNFs is Similar to Cartesian Product)
Taking the conjunction of DNFs and gives a DNF, which has the form for all pairs , with , .
Lemma 2 (Decomposability Criterion)
Let be a DNF and the set of satisfying assignments for . Then is decomposable with a partition iff for all it holds that .
In this paper, we are concerned with the problem of finding the finest variable partition of a positive DNF wrt a subset of its variables. By Lemma 1, decomposition components of can be easily obtained from the finest variable partition. We assume that boolean expressions are given as strings and thus, the size of an expression is the length of the string, which represents .
For the sake of completeness, first we describe a factorization algorithm for multilinear boolean polynomials, which is based on the results from [5, 7]. Then we provide a decomposition algorithm for a positive DNF based on factorization of a boolean polynomial, which is obtained from by a simple syntactic transformation. Finally, we demonstrate that decomposition of a positive DNF reduces to decomposition of (a polynomial number of) positive DNFs obtained from the input one and devise the corresponding polynomial time decomposition algorithm.
3 Factorization of Boolean Polynomials
In [8], Shpilka and Volkovich established the prominent result on the equivalence of polynomial factorization and identity testing. It follows from their result that a multilinear boolean polynomial^{2}^{2}2a sum of products of boolean variables, where the product stands for the logical conjunction and the sum stands for the logical XOR. can be factored in time cubic in the size of the polynomial given as a string. This result has been rediscovered in [5, 7], where the authors have provided a factorization algorithm based on the computation of derivatives of multilinear boolean polynomials, which allows for deeper optimizations. Without going into implementation details, we employ this result here to formulate an algorithm, which computes the finest decomposition components of a positive DNF . Hereafter we assume that polynomials do not contain double occurrences of the same monomial.
Definition 3
A polynomial is factorable if , where and are some nonconstant polynomials. Otherwise is irreducible. The polynomials are called factors of . For a polynomial , the finest variable partition of is if is irreducible and otherwise consists of the sets of the variables of the irreducible factors of .
It is important to realize that since we consider multilinear polynomials (every variable can occur only in the power of ), the factors are polynomials over disjoint sets of variables. Note that the finest variable partition of a multilinear boolean polynomial is unique, since the ring of these polynomials is a unique factorization domain. We now formulate the first important observation, which is a strengthening of Theorem 5 from [5].
Theorem 3.1 (Computing Finest Variable Partition for Polynomial)
For a multilinear boolean polynomial , the (unique) finest partition of the variables of can be found in time polynomial in the size of .
It is proved in [5] that testing whether is factorable and computing its factors can be done in time polynomial in the size of given as a string. By applying the factorization procedure to the obtained factors recursively, one obtains a partition of the variables of , which corresponds to the irreducible factors of . This is implemented in FindPartition procedure given below, which is a modification of the factorization algorithm from [5]. It is also shown in [5, 7] that once a partition of variables, which corresponds to the factors of is computed, the factors can be easily obtained as projections of onto the components of the partition (see the notion of projection below).
The FindPartition procedure takes a boolean polynomial as an input and outputs the finest partition of in time polynomial in the size of . A few notations are required. For a polynomial , we denote by the set of the variables of . For a variable and a value , we denote by the polynomial obtained from by substituting with . A derivative is a shorthand for the polynomial . Given a set of variables and a monomial , the projection of onto (denoted as ) is if does not contain any variable from , or is equal to the monomial obtained from by removing all the variables not contained in , otherwise. The projection of a polynomial onto , denoted as , is the polynomial obtained by projecting the monomials of onto and by removing duplicate monomials.
Lines 24 of FindPartition is a test for a simple sufficient condition for irreducibility: if a polynomial is a constant then it cannot be factorable. Lines 515 implement a test for trivial factors: if some variable is present in every monomial of , then is an irreducible factor. In the recursive part of the procedure, the remaining sets from the finest variable partition of are computed as the values of the variable and are added to FinestPartition.
4 decomposition of Positive DNFs
A term of a DNF is called redundant in if there exists another term of such that every literal of is present in (i.e., ). For example, the term is redundant in . It is easy to see that removing redundant terms gives a logically equivalent DNF.
Let us note the following simple fact:
Lemma 3 (Existence of Positive Components)
Let be a positive boolean expression and a subset of variables. If is decomposable then it has decomposition components, which are positive expressions.
Proof
It is known (e.g., see Theorem 1.21 in [9]) that a boolean expression is equivalent to a positive one in a variable iff for the set of satisfying assignments for the following property holds: if , where are literals, then . Clearly, this property is preserved under decomposition: if a set of assignments satisfies the property and it holds that , then so do the sets , for . Thus, the claim follows directly from Lemma 2.
The next important observation is a strengthening of the result from [5], which established the complexity of decomposition for positive DNFs.
Theorem 4.1 (Computing the Finest Variable Partition wrt )
The finest variable partition of a positive DNF can be computed in time polynomial in the size of .
Let be a 11 mapping, which for a positive DNF gives a multilinear boolean polynomial over obtained by replacing the conjunction and disjunction with and , respectively. The theorem is proved by showing that decomposition components of a positive DNF can be recovered from factors of a polynomial constructed for a DNF , which is obtained from by removing redundant terms. The idea is illustrated in Decompose procedure below, which for a given positive DNF computes the finest variable partition of . It relies on the factorization procedure from Section 3 and is employed as a subroutine in decomposition algorithm in Section 5. The procedure uses a simple preprocessing, which removes redundant terms. The preprocessing also allows for detecting those variables (line 5 of the procedure) that does not depend on. By the definition of decomposability, these variables are decomposition components of , so they are added as singleton sets into the resulting finest variable partition (at line 6).
5 decomposition of Positive DNFs
Definition 4 (atom)
For a positive DNF and a subset , the set of variables of a term of is called atom of .
Note that by definition a atom can also be the empty set. Let be the set of unions of atoms of . Given a set , we introduce the notation as a shortcut for the DNF , where .
Let be a partition of . We say that a formula supports if every set from the finest variable partition of wrt is contained in some set from . It is easy to see that if is decomposable with , then supports , for any set of literals such that is defined.
We formulate two lemmas that are the key to the main result, Theorem 5.1, in this section.
Lemma 4 (Decomposability Criterion for Positive DNF)
Let be a positive DNF, a subset, and the set of unions of atoms of . Then is decomposable with a variable partition iff supports , for all .
Proof
: Take . Since is positive, is a consistent set of literals, is defined, and clearly, supports .
: Let be the set of satisfying assignments for and a assignment. Then there is such that , since is a DNF. Let be the maximal set from with this property. Then we have , so supports . This yields and since was arbitrarily chosen, it follows from Lemma 2 that is decomposable with .
Lemma 5 (Decomposition Lemma)
Let , where , be positive DNFs such that , for , is decomposable with a partition . Then so is .
Proof
Observe that the condition of the lemma implies that for all , is decomposable with partition . We prove the lemma by induction on for the case ; the general case is proved similarly by simultaneous induction on and .
The case is trivial. For the induction step , it suffices to show that is decomposable with a partition , for . This yields that the condition of the lemma holds for , where , and the induction assumption applies.
That said, it suffices only to consider the case . Let and . By Lemma 1, we have , for . We need to show that . For , we have and hence, is equivalent to
(3)  
By the condition of the lemma it holds , for all and hence,
It follows that (3) is equivalent to , so the lemma is proved.
Theorem 5.1 (Computing the Finest Variable Partition wrt )
Given a positive DNF and a subset , the finest variable partition of wrt can be computed in time polynomial in the size of .
Proof
Let be the set of atoms of and consist of all unions of sets from . Note that is bounded by the size of , while is exponential. By Lemma 4, is decomposable with a partition iff supports , for all .
For any , we have . Observe that is equivalent to the DNF , where is a term redundant in , (in case we assume that ) and it holds . Therefore, supports iff is decomposable with .
For any , has the form where and for , , where , a atom of . The formula is equivalent to , where and is a redundant term as introduced above. By Lemma 4, if is decomposable with a partition then supports , for any . For the other direction, if supports , for any then the condition of Lemma 5 holds for . It follows that supports , for any and hence by Lemma 4, is decomposable with .
By Theorem 4.1, a variable partition , which corresponds to the finest decomposition of , can be found in time polynomial in the size of (and hence, in the size of , as well). For any variables and a set , if then and cannot belong to different decomposition components of . Let be an equivalence relation on such that iff there are such that and belong to the same component of the finest variable partition of . Since is bounded by the size of , one can readily verify that the equivalence classes wrt can be computed in time polynomial in the size of and are equal to its finest variable partition.
We conclude the paper with a description of Decompose procedure, which for a positive DNF and a (possibly empty) subset computes the finest variable partition of wrt and outputs decomposition components, which correspond to the partition.
In Lines 810 of the procedure, a set of atoms of is computed, while skipping those ones, which subsume some term of . Clearly, if there is a term of , which consists only of variables for some subset , then it holds , which implies that supports any partition of (at this point necessarily contains at least nonvariables due to the test in line 4). Therefore, these atoms are irrelevant in computing decomposition and they can be omitted (similarly, the unions of atoms in line 13).
Lines 1117 implement a call for computing the finest variable partition wrt the empty for each DNF obtained from for a union of relevant atoms. The result is a family of partitions, which are further aligned by computing equivalence classes on the variables of . This is implemented in AlignPartitions procedure by computing connected components of a graph, in which vertices correspond to the variables of .
Finally, in lines 2225 the decomposition components of are computed as projections onto the sets of variables corresponding to the finest partition. The components are cleaned up by removing redundant terms and are sent to the output.
AlignPartitions(PartitionFamily)
References
 [1] Bioch, J.C.: Decomposition of Boolean functions. In Crama, Y., Hammer, P.L., eds.: Boolean Models and Methods in Mathematics, Computer Science, and Engineering. Volume 134 of Encyclopedia of Mathematics and its Applications. Cambridge University Press, New York, NY, USA (2010) 39–78
 [2] Villa, T., K. Brayton, R., SangiovanniVincentelli, A.: Synthesis of multilevel boolean networks. In Crama, Y., Hammer, P.L., eds.: Boolean Models and Methods in Mathematics, Computer Science, and Engineering. Volume 134 of Encyclopedia of Mathematics and its Applications. Cambridge University Press, New York, NY, USA (2010) 675–722
 [3] Boros, E.: Horn functions. In Crama, Y., Hammer, P.L., eds.: Boolean Functions: Theory, Algorithms, and Applications. Volume 134 of Encyclopedia of Mathematics and its Applications. Cambridge University Press, New York, NY, USA (2011) 269–325
 [4] Gursky, S.: Special classes of boolean functions with respect to the complexity of their minimization. PhD Thesis, Charles University in Prague (2014)
 [5] Emelyanov, P., Ponomaryov, D.: Algorithmic issues of conjunctive decomposition of boolean formulas. Programming and Computer Software 41(3) (2015) 162–169
 [6] Ponomaryov, D.: On decomposability in logical calculi. Bulletin of the Novosibirsk Computing Center 28 (2008) 111–120
 [7] Emelyanov, P., Ponomaryov, D.: On tractability of disjoint AND–decomposition of boolean formulas. In: Proceedings of the PSI 2014: 9 Ershov Informatics Conference. Volume 8974 of Lecture Notes in Computer Science., Springer (2015) 92–101
 [8] Shpilka, A., Volkovich, I.: On the relation between polynomial identity testing and finding variable disjoint factors. In: Proceedings of the 37 International Colloquium on Automata, Languages and Programming. Part 1 (ICALP 2010). Volume 6198 of Lecture Notes in Computer Science., Springer (2010) 408–419
 [9] Crama, Y., Hammer, P.L.: Boolean Functions  Theory, Algorithms, and Applications. Volume 142 of Encyclopedia of mathematics and its applications. Cambridge University Press (2011)
Comments
There are no comments yet.