Manuscript Offprint
arXiv:2611.00289The Complexity of Choosing Parity Projections
Abstract
Cube attacks in cryptanalysis seek small sets of Boolean variables (cubes) whose parity sum is constant. We study the bounded constant derivative problem introduced by Smirnov (2026), which seeks a smallest cube with sum 1, and its sum-0 analogue. Despite their similarity, the problems differ sharply in parameterized complexity: the sum-1 problem admits a poly-time algorithm, where is cube size, whereas the sum-0 problem is not fixed-parameter tractable unless FPT = W[1]. Without a bound on cube size, both problems are -complete and NP-hard to approximate within for every fixed .
Our hardness proofs use a crown construction that embeds maximal monomials of parity-projected circuits into positive 2CNF. This yields completeness and inapproximability results, as well as a dichotomy for Boolean constraint languages of arity at most two: the bounded constant derivative problem is in P when all relations are affine and -complete otherwise. We also give algorithms parameterized by the number of quadratic rounds, treewidth, or ordered branching-program width, with lower bounds for all three unless NP SUBEXP. The treewidth lower bound holds for circuits; the case of 2CNF remains open.
1 Introduction
Let be a Boolean function of the variables and let be a nonempty set of these variables. Fixing the variables outside to a value and summing over all assignments to the variables in gives, modulo two, a Boolean function of ,
Cryptanalysts call a cube and its superpoly [DS09].
The bounded constant derivative problem (BCD) of [Smi26] asks, given as a formula or a circuit and a number , whether some set of at most variables has . We study BCD and its constant-zero counterpart, which asks the same question for .
Following Smirnov [Smi26], we call a set with a derivative certificate of (certificate for short) and write for the size of the smallest one. We call a set with a zero cube and write for the size of the smallest one. Both quantities are when no set exists.
The problem of the constant superpoly is well-motivated in cryptanalysis. Dinur and Shamir [DS09] showed that a cube whose superpoly is a simple function of the secret key yields an equation in the key bits. Sufficiently many such cubes recover the key of a reduced round stream cipher. For any small cube, a random polynomial is extremely unlikely to have a constant superpoly; for a uniformly random function of variables and a cube of size , the probability is . The problem involves searching for a cube with a constant superpoly given the function, which is provided either explicitly as a circuit or as a composition of low degree round maps.
In [DRS24], Dutta, Rajasree and Sarkar address the question of how hard this search is in the worst case. They show that monomial prediction is P-complete. Since every coefficient above the chosen set must be controlled and the set itself must be found, our problem is more demanding than monomial prediction.
Smirnov [Smi26] observed that both conditions have a simple description in terms of the algebraic normal form of . is a certificate exactly when is a term of that is contained in no larger term, and it is a zero cube exactly when no term of contains . Therefore, a certificate is a small maximal term and a zero cube is a small set that no term covers. When the terms of are listed, both are easy to find. However, a short formula may have exponentially many terms, and the description does not by itself give an algorithm. Smirnov showed that BCD is coNP-complete on circuits for each fixed , and that for variable it belongs to . Smirnov also posed an open question, namely, whether BCD is complete for . A preliminary manuscript by Sheshadri [She26] proved hardness results for circuits and for restricted 3CNF formulas. To the best of our knowledge, nothing in published literature addressed formulas with two literals per clause, the zero cube version, or the parameterized complexity of either problem.
Our proofs evolve from three lineages of prior work. Faben [Fab08] introduced reductions that preserve the number of solutions of a generalized satisfiability problem modulo , and used them to classify the complexity of counting those solutions modulo . His work was developed further by Kazeminia and Bulatov [KB25], who extended modular counting to general constraint problems and reduced them to problems with binary constraints only. However, note that a minimization problem is sensitive to the maximal terms of the resulting formula, which related work does not address.
Approximation bounds of the same kind appear in Umans [Uma99, Uma01], who proved strong inapproximability results for minimization problems such as the shortest implicant.
Whereas for algorithms based on structural width the closest results are those for quantified satisfiability [LM18] and projected model counting [FHM], where the summed variables are given, our problems require the set of summed variables to be part of the solution.
| Input, and what is asked | Certificates () | Zero cubes () |
|---|---|---|
| linear system , exact signed 2CNF, cube size | P (column basis), kernel of bits | NP-hard (minimum distance)coW[1]-hard to tell from , any computable |
| positive 2CNF, exact positive 2CNF, poly-time approximation | -complete and hard | -complete and hard |
| 3CNF, each fixed | P, but Horn 3CNF is coW[1]-hard in | coNP-complete |
| 4CNF, each fixed | coNP-complete | coNP-complete |
| quadratic rounds, inputs | , no | not treated here |
| treewidth (circuits) | , tight | same algorithm |
| ordered branching programs, width | , no | same algorithm |
Table 1: Summary of results. Approximation entries hold for every fixed unless P=NP; for certificates on positive 2CNF they hold under the weaker assumption . The lower bounds in the last three rows hold unless NP SUBEXP. The zero-cube hardness entries of the 2CNF rows hold on positive unit-free 2CNF that is satisfiable, has every variable essential, and comes with a zero cube supplied. The first row is the example of Section 2.
Notation. Throughout, is the number of variables of the input and is its encoding length. A signed 2CNF may contain both positive and negative literals, a positive 2CNF contains only positive literals, and a 2CNF is unit-free if every clause has two variables. FPT and W[1] are the standard notions of parameterized complexity [CFK]. A problem is coW[1]-hard if it is at least as hard as the complement of -Clique, and such a problem is not fixed-parameter tractable unless FPT=W[1]. SUBEXP is the class of problems that can be solved in time for every fixed . The Exponential Time Hypothesis (ETH) asserts that for some , 3SAT on variables cannot be solved in time [CFK]. ETH was recently refuted [Ope26]. Our conditional lower bounds therefore assume only that NP SUBEXP, a weaker hypothesis that remains open.
Our contributions. We determine the complexity of both problems on binary formulas.
Theorem 1.1. (a) On signed 2CNF, a minimum certificate of size at most can be found, or shown not to exist, in time, and the problem has a kernel with bits.
(b) On positive unit-free 2CNF, for every computable function , deciding whether or is coW[1]-hard. The hard instances are satisfiable, every variable is essential, and a zero cube is supplied with the instance.
In part (a) we establish an FPT algorithm and a kernel for minimum certificates on signed 2CNF (Theorem 3.1 and Theorem D.1). Part (b) concerns the exclusion of FPT algorithms that tell a small zero cube from a large one (Theorem 4.1). Note that the exclusion covers any FPT algorithm that approximates the smallest zero cube within a computable factor, even one whose running time depends on the true optimum rather than on (Theorem 4.3). Notice that the classical classification does not distinguish the two problems. Both are -complete on positive unit-free 2CNF (Theorem 5.4 and Theorem C.1), and are hard for the same reason, as both reductions go through the lifting theorem described below. The difference appears only when the cube is required to be small.
For the purposes of polynomial time approximation, we show that neither minimum can be approximated within on positive 2CNF, for any fixed . In terms of the bounds are for certificates on positive 2CNF and for zero cubes on satisfiable 3CNF, and for zero cubes on positive 2CNF.
All of the classical hardness results come from a single construction, the weighted lifting theorem of Section 5 (Theorem 5.3). It takes an arbitrary circuit, sums out some of its inputs, and produces a positive 2CNF whose certificates are exactly the maximal terms of the summed circuit.
The same construction gives a dichotomy for Boolean constraint languages of arity at most two. BCD is in P when all relations are affine and -complete otherwise (Theorem 6.1).
Additionally, we contribute algorithms parameterized by the number of quadratic rounds and by the treewidth , running in time poly() and poly() respectively, with lower bounds, unless NP SUBEXP, that rule out poly() time in a stated range of (Theorem 6.2) and poly() time for circuits (Theorem 6.3). For branching programs of width we give a n algorithm (Theorem I.1), and under the same assumption we rule out poly() time (Theorem I.2).
We note two boundaries. Clause width three already defeats the algorithm of part (a), because on Horn 3CNF certificates have the same arbitrary parameterized gap that zero cubes have on positive 2CNF (Theorem F.1). However, for each fixed the problem remains in P on 3CNF and becomes coNP-complete on 4CNF (Theorem F.2).
The positive-2CNF hardness survives on formulas whose independence complex strongly collapses to a point (Section J). These results are listed in Table 1.
The remainder of this paper is organized as follows. Section 2 explains the ideas behind the three main proofs. Sections 3 to 5 contain the proofs of part (a), of part (b), and of the classical results, and Section 6 treats the other representations. All deferred proofs are in the appendix.
2.1 The maximal-term rule
Every Boolean function has a unique representation as a multilinear polynomial over ,
where ranges over the subsets of the variables. This is the algebraic normal form of , and the sets with are its supports. Summing over a single variable either cancels a term or removes from it: a term with takes the same value for both settings of and cancels, while a term with vanishes at and loses the factor at . Iterating over the variables of gives the following.
Lemma 2.1 (Smirnov [Smi26]). . Consequently, for nonempty , if and only if is a support of and no strict superset of is one (we say that is a maximal support), and if and only if no support of contains .
Proof. Distinct supports containing remain distinct after is deleted, so there is no cancellation on the right-hand side. The sum is the constant 1 exactly when the empty product is the only term that survives, and it is 0 exactly when no term survives.
We denote the family of maximal supports of with . We maintain the conventions and . For example, consider: . The set is a certificate because is a term that no other term extends, and is a zero cube because no term contains both and .
Our remaining arguments reuse the following key consequences of this lemma. Firstly, zero cubes are closed under the addition of variables; whereas certificates are not – one more variable turns the constant one into zero. This would not be changed by complementing the output of : a nonempty cube has an even number of points, so , and a hardness result for one target says nothing about the other.
Secondly, complementing an input variable changes nothing at all, because inside it merely reorders the summation and outside it reorders the values . We therefore complement a variable whenever this is convenient, typically to make a variable that occurs only negatively occur only positively.
Thirdly, when is a CNF, a certificate must contain a variable of every clause that is not a tautology. Otherwise the clause can be falsified using the outside variables alone. This makes vanish at that point. Note that a zero cube is under no such obligation.
Finally, we call a variable essential if depends on it. By Theorem 2.1, this is the case exactly when lies in some support of , i.e., when is not a zero cube. In a positive unit-free 2CNF, every variable that occurs in a clause is essential, because setting the other variable of that clause to 0 and all remaining variables to 1 reduces the formula to .
2.2 Linear functions
We use linear functions to convey a quick visualizable intuition for the two problems. Since these may be analyzed by hand, they provide the reader with an intuitive grasp of the problems. Let be the indicator of the solutions of a consistent linear system over . Fix a set of columns, and fix a value of the other variables. The completions of to a solution of the system are the solutions of . A linear system has either no solution or of them, so every has an odd number of completions exactly when the columns in are linearly independent and span the remaining columns together with . Therefore when is a column basis of , and only then, . Certificates are therefore the nonempty column bases, and Gaussian elimination finds one.
Consider the case when the columns in are not independent of each other. Flipping the variables of a dependent subset leaves unchanged. This pairs up the completions of every , and all counts are even. Had the columns been independent, the value obtained from any solution would have had exactly one completion. Zero cubes are therefore the dependent column sets, and the smallest one is the minimum distance of the code ker , which is NP-hard to compute and hard to approximate [BGR25].
2.3 The approach
We begin by characterizing a certificate of a 2CNF. We observe that the fact that a certificate touches every clause implies that it is a vertex cover of the graph whose edges are the clauses. A maximal matching shows either (i) that no cover of size exists, or (ii) that a set of at most variables touches every clause.
Every other variable then necessarily interacts only with , and in one of possible ways. Note also that variables that interact in the same way are interchangeable. This reduces the search to candidate sets.
Further, a candidate can be checked without running through the outside assignments: fixing leaves each clause with at most one literal, so is a sum of products of literals. Whether such a sum is identically one is a question of linear algebra in dimension . Note that a zero cube need not touch any clause, and that the argument gives nothing for zero cubes.
For zero cubes, we establish hardness by translating a graph problem. A multicolored clique [FHRV09] is a clique in a graph whose vertices are split into color classes. Every class contributes exactly one vertex, and the clique has exactly vertices. In this setting, the problem introduced by Fellows, Hermelin, Rosamond and Vialette [FHRV09] asks whether a given graph with color classes contains a multicolored clique.
This problem has been shown to have no FPT algorithm unless [FHRV09, CFK]. We apply this framework to our problem as follows. First, we turn such a graph into a positive 2CNF that has a zero cube of size when the graph has no multicolored clique. Then, we ensure that when the graph has one, every zero cube of the formula has more than variables, for any computable fixed in advance. The hard part is to make picking a variable costly: choosing a vertex of the graph should cost the zero cube many variables, not one.
The usual device is to replace a variable by a product of new ones. Although we would normally expect this to work, it charges nothing. The terms that avoided the old variable avoid all new ones, so picking one new variable is as good as picking all of them. Instead, we need a block in which every proper subset is covered by some term, while nothing covers the whole block. This way, only the whole block is worth picking.
A triangle has this property: covers every proper subset of . It is simultaneously the positive 2CNF . Odd cliques do the same for every odd size.
For the classical results we must convert a circuit, with some of its inputs summed out, into a positive 2CNF whose maximal terms are known exactly. A parity-preserving encoding places the wanted terms among those that contain all of the auxiliary variables. However, it also creates other terms, any of which might be a small maximal term that was never intended. We therefore use the crown construction to add a marker variable for each auxiliary variable. The marker is joined to everything except that variable. This plants a large term that misses exactly that variable, so every unintended term sits inside a planted one and is no longer maximal.
2.4 Conventions
Circuits use a fixed bounded-fan-in basis and list all their inputs. In a gap statement the parameter is the supplied unless stated otherwise. is the second level of the polynomial hierarchy relative to a parity oracle. Of the class we need only one complete problem. Given a circuit , decide whether
Section B shows that this problem is complete, although a machine may query its oracle adaptively. Unused or inputs may be added so as to ensure . An unused may not be added, since it would make every vanish.
3 Finding a small certificate in a signed 2CNF
This section proves the algorithmic half of Theorem 1.1. Trying all sets of at most variables takes roughly time, which is polynomial for each fixed but not fixed-parameter tractable. We bring this down to .
Theorem 3.1. For a signed 2CNF , one can decide whether , and return a minimum certificate if there is one of size at most , in time.
There are two obstacles, the number of candidate sets and the cost of checking a single one. Both are removed by the observation that a certificate touches every clause. Fixing the variables of a certificate leaves each clause with at most one literal. This makes a candidate easy to check, and the fact that the certificate is a vertex cover of the clause graph ensures that candidates are few.
Checking one candidate. Fix a nonempty set with , after removing tautological clauses and repeated literals. If some clause contains no variable of , then is not a certificate. Otherwise consider the ways of fixing the variables of . Under each of them every clause that is not already satisfied remains a single literal. Therefore, the cofactor is either 0 or a product of literals in the remaining variables . So is a sum of at most such products. If expresses and , for example, the two cofactors are and , whose sum is 1, so is a certificate.
Lemma 3.2. Given a signed 2CNF and a nonempty set , one can decide whether in time.
Proof. Adding the constant 1, written as a product all of whose factors are 1, we must decide whether
Read the variables in order. After the first of them have been assigned, each product is either alive, meaning that all of its factors so far equal 1, or dead, and we record this as a row vector . The number of reachable rows may be exponential, but their span has dimension at most , and a basis of it suffices. If denotes the diagonal matrix with entries , then
since every reachable row extends by a 0 or a 1 and the maps are linear, so that is exactly the span of the rows reachable after steps. At the end, is the sum of the entries of the final row, a linear functional, which vanishes on every reachable row if and only if it vanishes on a basis of . Building the products costs and the linear algebra costs .
The lemma is identity testing for a read-once oblivious branching program of width [RS05, FS13].
Cutting down the candidates.
Proof of Theorem 3.1. Reject if , and remove tautologies, repeated literals and repeated clauses. An empty clause means , which has no certificate. Let be the set of variables occurring in unit clauses. Every certificate contains , so we reject if .
Form the graph with a vertex for each variable and an edge for each binary clause, disregarding signs, and greedily take a maximal matching among the edges with both ends outside . A certificate contains an endpoint of every matching edge, so we reject if the matching has more than edges. Otherwise let consist of and the endpoints of the matching. Then , and no clause has both of its variables outside , since such an edge could have been added to the matching.
A variable shares clauses only with variables of . Its type records, for each , which of the four clauses , , , are present. There are at most types, and exchanging two variables of the same type leaves unchanged.
Now keep together with up to representatives of each type. This pool contains at most variables, and any set of at most variables can be moved into it, type by type, by exchanges that do not affect whether the set is a certificate. The pool has nonempty subsets of size at most . We test them in order of increasing size with Theorem 3.2, and the first success is a minimum certificate.
Keeping representatives of each type and deleting the rest with their clauses yields a kernel of bits (Theorem D.1, Section D). Forbidden or mandatory variables are accommodated by splitting the types and enlarging . It is salient to point out that the argument gives nothing for zero cubes, which need not touch any clause. It also yields nothing for clause width three – fixing a certificate leaves a 2CNF rather than a product of literals. We note that this second limitation is inherent (Theorem F.1).
4 Small zero cubes are hard to find, even approximately
We now prove the hardness claimed in Theorem 1.1(b). To do so, we begin with the observation that the algorithm of Section 3 relies on the certificate touching every clause. A zero cube however is under no such obligation. The following theorem shows how much this costs.
Theorem 4.1. For every computable , distinguishing from is coW[1]-hard with respect to , even on positive unit-free 2CNF in which every variable is essential. The instances produced by the reduction are satisfiable and come with a zero cube. The reduction chooses an odd , and its two cases have optimum at most and exactly .
Recall the multicolored clique problem from Section 2.3. The reduction we describe starts from its complement. We build a formula in which summing over a particular set of variables gives the indicator of the multicolored cliques. Therefore, is a zero cube of size whenever there is no clique. When a clique exists we need every zero cube to be large, which requires making the variables outside expensive.
Making a variable cost more than one. We begin by demonstrating how an obvious approach fails. To establish a cost of 3 to pick variable , the natural approach would be to replace by a product of new variables. For certificates, this approach is correct, because a maximal term contains a block either entirely or not at all. For zero cubes, however, it fails for the following reason.
A term that did not contain contains none of , so the set is covered by exactly the terms that contained . Picking alone has the same effect as picking the whole block. Observe that the substitution left the proper subsets of the block uncovered. The remedy is to make the terms that avoided cover every proper subset, while still leaving the whole block uncovered. Put
A term containing will contribute , and a term not containing will contribute all three terms of . Note that whereas every proper subset of is contained in one of , the whole block is contained in none of them. Hence, a zero cube that meets the block must contain all of it.
Since , i.e., three copies of sum to one copy, the substitution can be applied to all terms at once, which forms . Note that is the triangle , so the result is still a positive 2CNF.
The same works for every odd block size. Assign to each variable a disjoint block of odd size and let
The polynomial equals 1 exactly when at most one variable of is 0. Hence, it is the clique formula on , and when the block is a singleton.
Lemma 4.2. For let be the set of blocks contained in . Then, with the convention ,
If , then , and if is a positive unit-free 2CNF, then so is .
Proof. Since is odd, , and therefore . Expanding the right-hand side produces one term for each choice of a support and, for each , of an omitted variable in . Different choices produce different supports, since can be read off as the set of blocks that appear entirely and the omitted variable can be read off in each remaining block, so no cancellation occurs.
Fix a support of . Some term produced by contains if and only if : a block contained in must appear entirely in the term, which forces its index into , and for the block is not contained in , so the omitted variable can be chosen outside . Hence some support of contains if and only if some support of contains , and Theorem 2.1 gives the first claim.
For the second claim let and let be a zero cube of . Then , because . Removing the partial blocks from leaves unchanged and shrinks , and conversely every zero cube of lifts to the zero cube of . This gives the formula for . For the last claim, is the clique on , and a clause of becomes , so that blocks become cliques and edges become complete bipartite graphs.
The clique formula
Proof of Theorem 4.1. Let the Multicolored Clique instance have nonempty color classes with , and set . Two distinct vertices are incompatible if they belong to the same class, or to different classes without being adjacent. Introduce a variable for each vertex, with the meaning that is in the clique, and a selector for each class, and let
The first group of clauses requires the chosen vertices to be pairwise compatible. The second group forces as soon as some vertex of class i is chosen and leaves unconstrained otherwise, so that for fixed the sum over is 1 in the first case and 0 in the second. With this gives
the indicator of the multicolored cliques.
Complementing every turns into a positive 2CNF and, by Section 2.1, changes no derivative. Add an unused variable and apply Theorem 4.2 with weight 1 on each selector and an odd weight , , on every vertex variable and on . Call the result .
If there is no clique, then , hence , and since the selectors form singleton blocks, is a zero cube of of size .
If there is a clique, let be any set of fewer than variables. Such a set contains neither a full vertex block nor the full block of , so . Were a zero cube, the lemma would give with (as ), and then , contradicting . Hence . On the other hand the block of is a zero cube, because does not depend on , so , and this block is the zero cube supplied with the instance.
The all-ones assignment satisfies . No vertex of the graph of is isolated, since each block of size is a clique and each selector is adjacent to the block of some vertex of its nonempty class, so every variable is essential by Section 2.1. With the formula has variables and clauses, and depends only on , so this is an FPT reduction.
Notice a cogent detail here: the supplied zero cube has size in both cases, and the optimum is at most in both cases. Therefore, an algorithm whose running time depends on the optimum rather than on gains nothing.
Corollary 4.3. Unless FPT = W[1], no algorithm always returns a zero cube of size at most in time on positive 2CNF with a zero cube, for any computable h and . Unless P=NP, there is no polynomial-time approximation for any fixed , and no approximation for any fixed .
The proof, given in Section C.1, chooses so large that an approximate answer in the small case must have fewer than variables. This is impossible in the large case. The exponent reflects the clauses of a block. The 3CNF construction of Section C uses no blocks and reaches .
5 Lifting a circuit into positive 2CNF
Of the three main results we present, the last concerns classical complexity: BCD is -complete on positive unit-free 2CNF and hard to approximate. Since hardness has to start from the circuit problem (1) and end in positive 2CNF, a parity-preserving encoding of circuits is required. The difficulty is that BCD concerns maximal terms. An encoding that produces the terms we want also produces others, and any of them may be a small maximal term that was never intended.
Hence we proceed in three steps. A compiler makes the wanted terms exactly those that contain all of the auxiliary variables . A crown plants a larger term above every unwanted one, and weights give the original variables a price. The outcome, Theorem 5.3, lists the certificates of the final formula completely.
The compiler. Let be a circuit and let be the function obtained by summing out the inputs .
Lemma 5.1 (Positive parity compiler). There is a positive unit-free 2CNF with
in which every clause has two distinct variables, at least one of them in . One may take odd and at least 3. The number of auxiliary variables and the number of clauses are , where is the size of including its declared inputs.
The proof is in Section A: gate variables are introduced in the usual way, each clause is replaced by binary clauses on a private variable whose parity reproduces it, and negative literals are eliminated by Faben's triangle [Fab08]. By Theorem 2.1, equation (3) says that the terms of containing all of are the terms with a term of . The remaining terms of each miss some variable of , and we have no control over them.
The crown. Write , add an unused variable , and let . For each introduce a marker , joined by a positive clause to every variable of other than :
Setting forces every variable of except to 1, which satisfies regardless of because each clause of has two distinct variables. Hence has a term consisting of all of but together with all markers but , and every unwanted term of , which misses some , is contained in the corresponding planted term. The variable serves to keep the planted terms distinct from anything that already had. Writing , the maximal supports of are as follows.
Lemma 5.2 (The crown's maximal supports). Let . The certificates of are exactly
The sets in (6) and (7) are 2m guards, each of size . Every variable of is essential.
The first family consists of the wanted terms with all markers attached, and such a term is maximal in exactly when it was maximal in . The guards are the planted terms and their mirror images. The full term is absent because is odd, which is why the guards are maximal. The calculation is in Section A.2.
Weights. Our reduction needs picking some variables to cost more than others. The proof of Theorem 5.4 gives weight 1 to the variables that encode the existential bits , and weight to each universal variable. Then every certificate of a NO instance is larger by at least than the smallest certificate of a YES instance. Taking large turns this difference into an approximation gap.
We give a variable the weight as follows. We replace in by the product of a block of new variables. Since the blocks are disjoint and new, different terms of stay different after the substitution, so no two of them cancel. Also, one term contains another after the substitution exactly when it did before. Therefore, picking costs exactly for certificates.
Hence, a maximal term of the substituted formula contains each block either entirely or not at all. Zero cubes do not behave this way, which is why Section 4 needed odd cliques instead.
We carry out this substitution before adding the crown, so that the markers are joined to the block variables as well. The result is still a positive 2CNF. Each clause of contains at most one variable of , and a clause splits into the binary clauses . The auxiliary variables are untouched.
Theorem 5.3 (Weighted maximal-support lifting). Given a circuit and positive integer weights in unary, one can construct in polynomial time a positive unit-free 2CNF whose certificates are exactly
where , , , and the guards are those of (6)-(7) for . In particular and
an empty minimum being read as . If every , then has variables and clauses. All variables are essential, and the guards are explicit certificates of size .
Proof. After the substitution, the terms of the compiler that contain are for the supports of , and such a term is contained only in terms that also contain , so it is maximal exactly when is maximal in . Theorem 5.2 then lists the certificates of as claimed. The substituted compiler has clauses, and the crown adds more.
The reduction
Theorem 5.4. BCD is -complete on positive unit-free 2CNF. For every fixed , a polynomial-time algorithm that always returns a certificate of size at most cert, or of size at most cert, would imply . The hard instances have every variable essential and an explicit certificate of size .
Proof. Take an instance (1). We arrange for the choice of a certificate to amount to the choice of , representing each bit by a pair of variables , where choosing means and choosing means . Let
and sum out and . For the product is the single term that takes the chosen member of each pair, so that
Two different values of disagree in some pair, so a term arising from one can never contain a term arising from the other, and the maximal supports arising from are the sets with .
Apply Theorem 5.3 with weight 1 on every and weight on every universal variable , and put . A certificate arising from costs . If some is identically one, its only maximal support is and the cost is exactly . If no is identically one, then every nonzero is nonconstant, all of its maximal supports are nonempty, and every certificate of this kind costs at least . The guards cost . A YES instance thus has and a NO instance has . With this is a polynomial-time reduction and proves hardness. Membership in is immediate: guess the set, universally choose the outside assignment, and ask a parity oracle (Section B gives the fixed-length encoding). For the approximation statements take to be a sufficiently large polynomial in . An approximation within either ratio must then return a certificate of size below on a YES instance and cannot do so on a NO instance (Section A.3).
The same construction gives -completeness for zero cubes (Theorem C.1, Section C). There the guards force a zero cube to contain all of , and the rest of the argument goes through unchanged.
6 Other representations
The results so far concern CNF formulas, and it is natural to ask how much they depend on that choice. To examine how far they generalize, we consider several other scenarios, such as binary constraints rather than clauses, and functions given by rounds of quadratic maps in the cryptographic setting. We also consider two structural restrictions, treewidth and branching-program width, under which the problem admits algorithms. Length restrictions prevent us from listing all of our proofs here. We encourage readers to refer to our appendix for full details.
Binary constraint languages. Our hardness results were proved for the single binary constraint OR, that is, for positive 2CNF. A relation of arity is a set of tuples in . For example, OR is the set . A constraint applies a relation to a tuple of variables, and is satisfied when their values form one of its tuples. A Boolean constraint language is a finite set of relations. An instance over is a conjunction of constraints whose relations come from . A positive 2CNF is thus an instance over .
A relation is affine if its tuples are exactly the solutions of a system of linear equations over . For example, and are affine. Among relations of arity at most two, only those with exactly three tuples fail to be affine. There are four of them, one for each excluded tuple. OR excludes 00, NAND excludes 11, the implication excludes 10, and its reverse excludes 01.
Theorem 6.1. For a finite Boolean constraint language of arity at most two, is in if every relation in is affine, and -complete otherwise. In every case there is a poly() algorithm with respect to the certificate size .
The affine case we consider is the example of Section 2. Recall that in this scenario, certificates are the nonempty column bases, and Gaussian elimination finds one. OR is Theorem 5.4. NAND reduces to OR by complementing every variable, which changes no derivative.
Implication needs more work. The relation is the clause , so it treats its two variables differently. Complementing turns it into OR. However, a variable can be the tail of one implication and the head of another, so in general no single complementation turns every implication into OR. The crown also depends on how clauses are satisfied. An OR clause is satisfied by setting either of its variables to 1. An implication is satisfied by setting its tail to 0 or its head to 1. Hence the crown has to be rebuilt to account for both moves. Section G carries this out. It proves the lifting theorem with implications only, even when the implication graph is acyclic and has height at most four.
Finally, the parameterized algorithm of Theorem 3.1 applies to every binary language, because any binary relation is a signed 2CNF of constant size.
Quadratic rounds. In cryptographic applications, the function is typically one output bit of a cipher, viewed as a function of its key and public input bits. It is given as a sequence of rounds. We take a round to be an explicitly listed map over all of whose coordinates have degree at most two. The dimensions may change from round to round, the whole description counts towards , and denotes the number of initial inputs. Since a round can at most double the degree of each coordinate, as a polynomial in the initial inputs, after rounds the function has degree at most . Hence one can simply compute all of its coefficients. Unless NP SUBEXP, the exponent cannot be made subexponential in .
Theorem 6.2. BCD on quadratic rounds is solvable in poly() time. For every fixed , unless NP SUBEXP, no algorithm runs in time with , even on instances with .
We prove the lower bound in Section H by a reduction from 3SAT on variables. We do so by splitting the variables into groups of about variables each, and introducing one input for every group and every assignment to it. Picking one input from each group then describes a complete assignment. Note that this only needs inputs and rounds. An algorithm whose exponent is only would therefore solve 3SAT in time .
Treewidth. A large formula may nevertheless decompose into pieces that share few variables. The treewidth of the formula directly measures how far this is the case. In comparison to most standard problems on tree decompositions, our case is complicated by the fact that the cube is chosen once and must work for every outside assignment.
Theorem 6.3. Let be a product of local Boolean factors, given with a tree decomposition of width of its primal graph, in which two variables are adjacent if they occur in a common factor. A minimum certificate can be found in poly() time. Variables may be declared forbidden, or summed out at zero cost, so the same bound holds for circuits with respect to the width of their gate-constraint graph. Unless NP SUBEXP, BCD on circuits admits no poly() algorithm, even when a path decomposition of width is supplied.
Note, therefore, that our algorithm is a dynamic program over a tree decomposition, whose bags hold at most variables each. To see what the dynamic program must remember, consider the part of the formula below a bag , and fix the part of the cube that lies there. Each assignment to the outside variables below then leaves a table of bits, one for each assignment to .
Since the dynamic program cannot remember these entries separately (because it would lose track of which entries came from the same outside assignment), it must remember the whole family of tables, which can be very large. Instead, we store the smallest affine subspace containing the family, called its affine hull.
Our approach works because the dynamic program never needs the family itself, only its affine hull. To see this, recall what the dynamic program does at each step. It either sums out a chosen variable, keeps both restrictions of an unchosen variable, or joins two children. Summing out is a linear map on tables. Keeping both restrictions produces the union of two linear images of the family. Joining two children multiplies their tables pointwise, which is a bilinear map. For all three operations, the affine hull of the result is determined by the affine hulls of the inputs. Hence the dynamic program can pass hulls from the leaves to the root without ever storing a family.
At the root, we may assume the bag is empty, so each table is a single bit. The cube is a certificate exactly when every outside assignment yields 1, that is, when the hull is . It is a zero cube exactly when the hull is . This is why we use affine hulls rather than linear spans. The span of {1} equals the span of {0,1}, so a span could not tell a certificate from a cube that fails. Finally, the number of possible hulls at a bag is the number of affine subspaces of , which is doubly exponential in . This bounds the number of states, and gives the running time poly( ).
For the lower bound, we build a circuit of pathwidth . It reads an address naming one clause of a SAT instance, and checks only that clause against a proposed assignment. The certificate condition quantifies over all outside assignments, and hence over all addresses. This supplies the quantification over all clauses. The details are in Section E. The correct dependence on treewidth for 2CNF remains open.
For ordered branching programs, the fixed variable order allows a cheaper version of the same dynamic program. For each candidate set, it keeps the span of the rows of its strict supersets. This gives an algorithm running in time in the width (Theorem I.1, Section I). Unless NP SUBEXP, no algorithm runs in time times a polynomial (Theorem I.2).
Appendix
In this appendix, we present the proofs that were deferred from the main text. For the convenience of the reader, the table below lists what each part contains.
| Appendix | What it proves |
|---|---|
| A | the positive parity compiler and the crown lemma; size calculation for approximation |
| B | the quantified-parity normal form behind , and membership |
| C | zero cubes: the approximation corollary, classical completeness, fixed thresholds, 3CNF |
| D | the -bit kernel for signed 2CNF |
| E | the treewidth algorithm and the lower bound for circuits |
| F | the clause-width boundary: Horn 3CNF, fixed thresholds, checking a given set |
| G | the implication version of the lifting theorem and the binary-language dichotomy |
| H | the number of quadratic rounds |
| I | ordered branching programs |
| J | hardness with a strongly collapsible independence complex |
A Details of the lifting construction
The lifting theorem of Section 5 rests on two lemmas, and in this appendix we give their proofs. We begin with the compiler, which turns a circuit into a positive 2CNF, and then prove the crown lemma, which lists the maximal supports of the final formula. Lastly, we carry out the size calculation that turns the reduction of Theorem 5.4 into an approximation gap.
A.1 Converting a circuit to positive binary clauses
We now prove Theorem 5.1. The proof converts the circuit in three passes, and none of the passes touches the free inputs X. Firstly, we express the evaluation of the circuit by clauses. Secondly, we replace each clause by binary clauses whose auxiliary assignments have the correct parity. Thirdly, we remove the negative literals.
Circuit constraints. We introduce a variable for every gate, impose its truth table by a constant number of CNF clauses, and pin the output to one. Note that once the inputs are fixed, the value of every gate is determined. Hence there is exactly one satisfying assignment of the gate variables when the circuit outputs one, and none when it outputs zero. Summing over the gate variables therefore recovers the output of the circuit.
Replacing a clause by binary clauses. Let be one of these clauses. To replace it by binary clauses without disturbing any parity, we introduce a variable that is private to this clause, and replace by
Consider the two cases. If is false, every is zero and may take either value, so the two values cancel modulo two. If is true, some is one and forces , which leaves exactly one allowed value. Consequently, . Since different clauses have different private variables, their parity sums can be taken independently of each other. Note that this also turns unit clauses into binary clauses – constants in the circuit are represented by pinned gates, so we never need an empty clause.
Removing negative literals. For every variable of the binary formula, we add two new variables and together with the positive triangle
We then replace every occurrence of by . Observe that at this stage is merely a new name, and nothing in the clauses forces it to be the complement of . The triangle enforces the complement through parity instead: summing it over gives , which is one exactly when . Summing over thus restores the negative literal in the rest of the formula. This is Faben's triangle construction [Fab08].
We let contain every variable except those of , i.e., the original inputs , the gate variables, the private variables , and the two variables added by each triangle. Summing first over the triangle variables restores the signed binary formula. Summing over the variables then restores the circuit constraints, and summing over the gate variables and finally gives . This proves .
Further, every clause has two distinct variables, and every clause meets . A clause inherited from contains or its new complement variable, whereas a triangle clause contains one of the new triangle variables. Since the circuit basis has bounded fan-in, each of the three passes increases the size by at most a constant factor.
The crown also needs to be odd and at least three, which we can always arrange. If is even, we add a disjoint path on three new vertices and put its variables in . Its positive edge formula has five satisfying assignments, so summing over these three variables multiplies the parity by one, and becomes odd. If , we instead add a disjoint edge, which has three satisfying assignments and brings up to three. This completes the proof of Theorem 5.1.
A.2 The maximal supports of the crown
We now prove Theorem 5.2. Recall that is positive, that its clauses are binary on distinct variables, and that it does not use the dummy variable . For the construction (4) we write
We determine by fixing its markers. If all markers are one, the added clauses impose no condition, and we are left with . If only is zero, the added clauses force every old variable except to one. Notice that this assignment satisfies regardless of , because every clause of has a second variable, and that variable is set to one. What remains is . If two or more markers are zero, their clauses together force every old variable to one, which leaves . We can therefore record the three cases as follows:
The indicator that all markers are one is , and the indicator that only is zero is . The remaining assignments to the markers are indicated by . Hence
Expanding this expression, and using the fact that is odd, gives
In particular, the full monomial cancels, since its coefficient before cancellation is .
Now consider the two kinds of near-full monomials, and . Each of them has size , and they are all distinct. Neither kind can cancel with a term of : the first contains , which does not use, whereas the second omits a marker, and every term of contains all of the markers. Since there is no full monomial above them, they are maximal. These are exactly the guards in (6) and (7). Note that the other explicit terms, and , are contained in guards.
We are left with the terms of . If such a term misses some , it is strictly contained in the guard , which contains its variables and also . If it contains all of , it cannot lie inside any guard, because each guard misses one variable of . The only terms that can contain it are therefore other terms of . Hence it is maximal in exactly when its old support is maximal in . This proves (5), together with the completeness of the list.
Finally, every variable occurs in at least one guard, and therefore in the unique multilinear polynomial of . Changing such a variable changes the function on some input, so every variable is essential.
A.3 The size calculation for approximation hardness
The reduction in the proof of Theorem 5.4 has optimum in the YES case and at least in the NO case. Our idea is to choose so large that an approximation must still return a set with fewer than variables on a YES instance. The size of the returned set then separates the two cases.
Let be the size of the unweighted source. For an explicit binary encoding of the clause list, the construction gives
Fix , choose an integer , and set . Then
The same conclusion holds with in place of , since gives an even smaller bound. Therefore, for all sufficiently large source instances, an approximation with either ratio must return a certificate with fewer than variables in the YES case, whereas no such certificate exists in the NO case. The finitely many smaller source sizes can be solved directly.
Since is fixed, the reduction has polynomial size. An algorithm with either ratio would therefore decide a -complete problem in polynomial time, which proves the approximation part of Theorem 5.4.
B The quantified-parity normal form
Our classical completeness results reduce from the quantified circuit problem (1). In this appendix, we explain why that problem is complete for , and why BCD belongs to . The only subtlety is that a machine may query its parity oracle adaptively, i.e., a later query may depend on the answers to earlier ones.
B.1 Combining adaptive parity queries
The closure is standard [BG92]. We nevertheless include the transcript argument here, because it shows directly why adaptivity causes no difficulty.
Consider a deterministic polynomial time machine with a parity oracle, padded so that it always makes the same polynomial number of queries. Suppose that we predict all of the oracle answers in advance, and write them as a bit string . The machine can then be simulated without its oracle. Let be the acceptance bit of this simulation, and let denote its th query. Note that this query may depend on the earlier predicted answers. If denotes the true answer to a query , then
is one exactly when the th prediction is correct. The product of all these factors is therefore one for the single transcript that is correct throughout, and zero for every other one. Consequently, the true acceptance bit of the machine is
We observe that this expression is itself a parity predicate. Adding the constant one to a factor can be implemented by adding one accepting branch. A product of parities is implemented by choosing independent witnesses for its factors, and accepting only when all of their predicates accept. The outer parity sum then chooses b. Since there are polynomially many factors, each with a witness of polynomial length, the resulting witness length is polynomial. It is salient to point out that when fixed witness lengths require padding, the extra positions have to be forced to zero. Leaving them free would duplicate every witness and destroy its parity.
B.2 The complete problem and membership
The standard relativized characterization of the second level gives an existential block, followed by a universal block and a deterministic computation with a parity oracle. The closure we just proved replaces the final computation by a single parity predicate, and encoding this predicate by a circuit gives exactly (1). Conversely, a machine can make the existential and universal choices and then ask a single parity query. Hence the quantified circuit problem is complete for .
Membership of BCD in follows from the same form. With declared inputs, we guess an -bit indicator of a set with . We then universally choose , which supplies the inputs outside . Finally, we take the parity over of
Notice that only the coordinates selected by are allowed to vary in . Every assignment to therefore contributes exactly once, and the parity is . Requiring this value to be one for every is exactly the certificate condition.
C Further complexity results for zero cubes
In Section 4, we proved the parameterized gap for zero cubes. In this appendix, we derive its approximation consequences, and we then classify zero cubes in the classical and fixed threshold settings. Our last construction keeps the formula satisfiable while making its satisfying assignments far apart, which yields stronger approximation bounds when clauses of size three are allowed.
C.1 The approximation bounds
Proof of Theorem 4.3. Suppose that an algorithm achieves the approximation factor in time . We choose
and use the reduction of Theorem 4.1 with its odd . If the optimum is some , the algorithm must return a set of at most variables. If the optimum is , every feasible answer has at least variables. Hence the size of the returned set distinguishes the two cases.
We must also bound the running time in both cases. The supplied zero cube of size guarantees , so the time is at most
Since depends only on , this would be an FPT algorithm for the complement of Multicolored Clique, and it would imply FPT=W[1]. Note that taking the maxima above avoids any assumption that or is monotone.
For ordinary polynomial time approximation, we start from a Multicolored Clique instance with vertices in total, and choose an odd for a sufficiently large fixed constant . The small optimum is at most , whereas the large optimum is . The output has
For the two approximation factors, the ratio between the largest answer permitted in the small case and the optimum in the large case is bounded by
For each permitted , both expressions tend to zero once B is large enough. Such an approximation would therefore distinguish the two cases, and decide Clique in polynomial time. Since B is fixed, the construction remains polynomial, and the finitely many small source instances can be decided directly.
C.2 Classical complexity and fixed thresholds
We now turn to the classical setting, in which the cube size is part of the input. The theorem below collects all of our results for zero cubes in this setting.
Theorem C.1. Deciding is -complete on positive unit-free 2CNF. For every fixed , it is polynomial-time decidable on signed 2CNF, and coNP-complete on 3CNF. On satisfiable, unit-free, all-essential 3CNF, coNP-completeness holds for every fixed . On the same class, for every fixed , no polynomial-time or approximation exists unless .
Proof of classical completeness. Membership follows directly from the definition. We guess a nonempty set of at most coordinates, universally choose an assignment to the other coordinates, and use a single parity query to test whether the number of satisfying completions is even.
For hardness, we start from the quantified parity problem (1). We would like the choice of a cube to amount to the choice of an existential assignment . To do so, we introduce a pair of variables
for each existential bit , where choosing represents and choosing represents . Let be the set of all coordinates of and , and form the circuit
For a fixed , the product is the monomial that uses exactly the chosen member of every pair. Summing over and therefore gives
The added indicator contributes one to the parity sum, also when w is empty. In this way the condition becomes exactly the zero derivative we want.
We still have to force a small cube to include and one member of each pair. To do so, we add an unused coordinate , let be the set of all coordinates including , and put
Since every added term contains , none of them can cancel with a term of , and the added terms are also distinct from each other. A zero cube must avoid being contained in any of them. The term that misses only therefore forces the cube to contain , and the term that misses only forces it to contain a member of that pair. At budget , these requirements leave exactly the sets . Their derivatives kill every added term, together with the monomial of every other assignment, which leaves . Hence exactly when the quantified parity instance is positive. Notice also that , and that its full monomial is absent.
To obtain a positive 2CNF, we apply the compiler and the crown construction to , treating every coordinate of , those of included, as a public input of Theorem 5.1, so that no circuit inputs are summed out. Each guard of Theorem 5.2 misses just one coordinate of , so a zero cube must contain all of . Once it does, the guards disappear from the sum. What remains is zero exactly when the public part of the cube is a zero cube of , or when the cube contains the unused coordinate of the crown. Using Theorem 4.2, we give an odd weight , and we give every other coordinate weight one. The new optimum is
The threshold therefore proves hardness on positive 2CNF. Note that selecting together with the whole block of d always supplies a feasible zero cube.
Proof of the fixed-threshold claims without promises. For signed 2CNF and a fixed , we enumerate all nonempty sets of at most variables. Fixing in all ways gives a list of cofactors, each of which is a 2CNF on the remaining variables. The derivative is nonzero exactly when some outside assignment makes an odd number of these cofactors true.
We can check this by enumerating the patterns of true and false values with an odd number of trues. For a given pattern, we conjoin all cofactors that are required to be true. For each cofactor required to be false, we choose one of its clauses to falsify, and add the corresponding unit requirements, of which there are at most two. The resulting formula is still a 2CNF, so 2SAT decides whether the pattern can occur. Constant cofactors are handled directly. For a formula with clauses there are at most choices, which is polynomial for fixed .
On circuits, the problem lies in coNP for each fixed . To certify that no candidate is a zero cube, it suffices to give, for every candidate, an outside assignment at which its derivative is odd.
There are only polynomially many candidates, and checking each of them uses at most circuit evaluations.
For hardness on 3CNF, we take a 3CNF source and replace each of its variables by copies, which binary clauses force to be equal. Each original occurrence is kept on one representative copy. If the source is unsatisfiable, the resulting function is zero, and every set is a zero cube. If the source is satisfiable, any two distinct satisfying assignments differ in at least coordinates. Given any proposed cube of at most coordinates, we fix the outside coordinates as in a satisfying assignment. The cube then contains exactly one satisfying assignment, so its derivative is one at that point, and is not a zero cube. This is a reduction from unsatisfiability, for which a source with at least one variable suffices.
C.3 Keeping the formula satisfiable and every variable essential
The reduction above uses an unsatisfiable formula for its small optimum case, and we now remove that feature. Our new construction always has two satisfying assignments that are close to each other. Whereas these two exist regardless of the source, a satisfiable source circuit also produces satisfying assignments that are far from every other satisfying assignment. These isolated assignments are what prevent small zero cubes.
Proof of the promised bounds in Theorem C.1. Let be a circuit of size , and let be given in unary. We first simplify constant gates, as well as AND and OR gates with repeated inputs. If this leaves a constant circuit, we replace it by when it is satisfiable and by otherwise. We then encode the gate truth tables by a unit-free 3CNF , with inputs and wire variables , and leave the output unpinned. Note that each input has a unique wire assignment.
We add a switch and the clauses
When , all inputs are zero, which gives one state of the inputs and wires. When , the output must be one, so the states correspond to the satisfying inputs of . We then replace every input, wire and switch variable by copies, using binary clauses to force them to be equal, and keep the old occurrences on a representative. As a result, distinct states differ in at least coordinates.
Next, we give each state two control assignments. We introduce , impose , and for impose
At , the controls are or , which gives two satisfying assignments at distance two, regardless of . At , the controls are or . Hence every satisfying assignment with is at distance at least from every other satisfying assignment: changing the state changes an entire block of copies, while changing only the controls changes all of them.
Notice that the whole control block is always a zero cube, since every outside assignment has zero or two satisfying extensions. If is unsatisfiable, only the two assignments at remain. In this case is a zero cube, whereas no singleton is one, because a cube of one coordinate through either satisfying assignment contains only that assignment. Thus .
If is satisfiable, we take a satisfying assignment with . Every cube of fewer than coordinates through it contains exactly one satisfying assignment, so no such set can be a zero cube, and . Finally, in both cases every satisfying assignment has distance at least two from every other one. Flipping a single coordinate of a satisfying assignment therefore makes the formula false, and consequently every coordinate is essential.
The construction uses variables and clauses, so . Taking proves the promised coNP-hardness for each fixed , and membership was proved above. For approximation, we take with a fixed integer . Then
An approximation with this factor must return fewer than coordinates in the unsatisfiable case, whose optimum is two, whereas every feasible answer in the satisfiable case has at least coordinates. Such an approximation would therefore decide satisfiability in polynomial time. The same calculation with proves the bound, and this completes the proof of Theorem C.1.
D Reducing signed 2CNF to a small equivalent instance
In this appendix, we prove the kernel claimed in part (a) of Theorem 1.1. The algorithm of Section 3 searches among representatives, but still checks every candidate against the original formula. A kernel, on the other hand, has to justify deleting the other variables altogether. Although we would normally expect copies of each type to be enough, they are not – a candidate could select all of them, which would remove the assignments that the deleted copies used to supply. We therefore keep two extra copies of each type, so that this never happens.
Theorem D.1. BCD on signed 2CNF has a polynomial-time kernel with at most
variables and encoding length.
Proof. We use the preprocessing, the cover and the types from the proof of Theorem 3.1, and replace an instance rejected there by a fixed NO instance. For every remaining type, we keep at most variables, and delete the others together with their incident clauses. We now show that the resulting formula has a certificate of each size at most exactly when the original formula does.
To do so, we first leave all cover variables unassigned, and write for them. For one outside type, let be the conjunction of the clauses joining a representative to the cover, and write . Each copy of the type contributes the same factor on its own variable. Suppose that a proposed certificate selects copies. Summing over them contributes the factor
The equality holds because a Boolean valued function satisfies for every positive integer .
Now consider the copies that are left outside the proposed certificate. Their assignments produce the following possible functions of the cover:
| possible products | |
|---|---|
| 0 | |
| 1 | |
| . |
This is because with at least two copies, an assignment is all zero, all one, or contains both values, and repeating a factor has no effect. Two unselected copies thus already supply every product that a larger number of copies can supply. It is salient to point out that we compare these products as functions of , rather than value by value. This matters because some cover variables may later be summed over, and the outside assignment has to remain fixed during that sum.
If a type originally had more than copies, a selection of at most variables necessarily leaves at least two of them unselected, both before and after the deletion. We can therefore keep the same selected count . Its summed factor is unchanged, and by the table, its unselected copies provide exactly the same family of functions of .
Since the choices for different types are independent, multiplying these factors with the clauses contained entirely in gives the same family of functions on for both formulas. Finally, we sum over the selected cover variables. In either formula, every remaining assignment gives one exactly when the same holds in the other, and this is the certificate condition. Matching the selected counts within each type preserves the size of the certificate in both directions.
Partitioning the variables into types and deleting the excess copies takes polynomial time. There are at most cover variables and at most types, which gives the stated bound on variables. Further, once repeated clauses are removed, the number of signed binary clauses is at most quadratic in the number of remaining variables. Relabeling the variables therefore gives an encoding of bits.
E Proofs for structural width
In this appendix, we prove the treewidth results summarized in Section 6. We begin by describing the information that the dynamic program stores at a bag, and we show why it suffices to store its affine hull. We then give the dynamic program itself. Lastly, we show that for circuits the doubly exponential dependence on the width is necessary, unless NP SUBEXP.
E.1 The information stored at a separator
We write the input as a product of local Boolean factors,
Our algorithm allows some variables to be summed in advance. We call this set mandatory, and we call a second set , disjoint from , eligible. Selection of all remaining variables is forbidden. The task is to minimize over nonempty for which . Note that ordinary BCD is the case and .
Theorem E.1. Given a width- tree decomposition of the factor primal graph, this optimum and a minimizing set can be found in poly() time, or infeasibility can be reported. Here includes the factors and the decomposition.
We root the decomposition and consider a bag . The variables that occur below but not in are its internal variables, and we fix a selection among them. For each assignment to the internal unselected variables, we sum the product of the factors below over the selected and mandatory internal variables. What remains is a function of the bag variables, or equivalently a vector
whose entries are indexed by the assignments to . We call it a response table. The family is nonempty, even when every table in it is zero. Observe that the selection stays fixed while varies.
The dynamic program needs whole tables, rather than information kept entry by entry. For example, consider: consists of a single variable, and the two families are
Both families allow both values in each entry, so information kept entry by entry cannot distinguish them. However, summing out the bag variable gives one on every table of the first family, whereas the second family also produces zero.
Keeping the exact family would be costly. Instead, we store its affine hull, which over consists of all linear combinations of members of the family whose coefficients sum to one. The next lemma shows that this compression is safe.
Lemma E.2. For nonempty vector families, linear maps , and a bilinear map ,
Proof. A linear map takes an affine combination to the same combination of the images, which proves the first identity. Applying it to each , and then taking the affine hull of the union, proves the second.
For the third, let . Bilinearity gives
Combining two points from the affine hulls thus produces an affine combination of the original products, which gives one containment. The other follows because each original family is contained in its affine hull.
E.2 The dynamic program
Proof of Theorem E.1. We use a rooted nice tree decomposition whose root and leaves are empty, and assign each factor to one bag that contains all of its variables. Such a bag exists, since these variables form a clique in the primal graph.
For each bag, a state consists of an affine space of response tables together with a bit, which records whether an eligible variable has been selected. For each state, we store the smallest cost of a selection that produces it. The bit is needed because the final selection must be nonempty, and summing mandatory variables alone does not meet that requirement. At an empty leaf, the response space is , the bit is false, and the cost is zero.
It is easiest to describe the transitions on exact families first, and then to apply Theorem E.2 so as to use affine hulls instead.
-
When a variable is introduced, we extend each table so that it does not depend on the new coordinate. When a factor is introduced, we multiply each table pointwise by the factor.
-
At a join, we take every pointwise product of a table from the first child with a table from the second. We add their costs, and take the OR of their bits.
-
When we forget a selected variable , we replace each table by , add one to the cost, and set the bit to true.
-
When we forget an unselected variable, we keep both restrictions and of each table r, which forms the union of the two restricted families.
-
A mandatory variable uses the summed transition at zero cost and leaves the bit unchanged. A forbidden variable uses the unselected transition, and an eligible variable is allowed both choices.
We observe that these transitions preserve the meaning of a response family. At a join, the internal variables of the two children are disjoint. Their unselected assignments therefore vary independently, and the parity sums over their selected variables multiply. Further, a bag variable is selected only at its unique highest forget node, so its occurrences in different children cannot lead to conflicting choices. When a forgotten variable is summed, its two values are added within the same table, in which all other unselected variables have the same assignment.
Every transition is a linear map, a union of linear images, or a bilinear product. By Theorem E.2, applying it to affine hulls gives the correct affine hull of the new response family. It follows by induction that two selections with the same state and bit are interchangeable in all later computations, and we can discard the more expensive one.
At the empty root, no bag variables are left, so each response is a single bit. A nonempty family of bits has affine hull exactly when every response is one, which is the certificate condition. We therefore accept the affine space with the bit set to true.
We now bound the number of states and the cost of updating them. We put . Since an affine space in can be specified by a base vector and at most generators, there are at most possibilities. Gaussian elimination gives a canonical representation, in which the linear transitions are immediate. For the join, suppose that the spaces are and , with bases and . Their product hull is
where denotes pointwise multiplication. Expanding proves containment in the displayed affine space. Conversely, and are differences of two products, and is a sum of four products, so every displayed generator lies in the direction space of the product hull.
Each update takes time polynomial in for a state, or for a pair of states. Since , the total running time is
Storing the choices that produced each retained entry recovers a minimum set.
For zero cubes, we change only the accepting state at the root, to . The same argument then shows that every outside assignment has even parity. Here too the algorithm allows mandatory, eligible and forbidden variables.
Corollary E.3. For a fan-in-two circuit, BCD is solvable in poly( ) time given a width-w decomposition of its functional gate-constraint primal graph.
Proof. We give every gate a wire variable and a factor enforcing its truth table, and add a factor requiring the output to be one. For a fixed input, exactly one wire assignment satisfies all gate factors, so summing the product over the wires gives the value of the original circuit. We declare the wires mandatory at zero cost. In this setting, only the selected input variables contribute to the cost and to the bit for a nonempty selection, and we can apply Theorem E.1.
E.3 The lower bound for circuits
We now show that for circuits the doubly exponential dependence on the width cannot be improved, unless NP SUBEXP. The difficulty is that a bag of small width cannot hold an entire SAT instance. Our reduction therefore uses an address, and the circuit examines only the clause named by that address. Since an assignment must satisfy every clause, we need a universal quantification over addresses, and the requirement of a constant derivative supplies it.
Theorem E.4. Unless NP SUBEXP, circuit BCD has no poly() algorithm when is the pathwidth of its functional gate-constraint primal graph, even with a decomposition supplied. The same lower bound therefore holds for treewidth.
Proof. We start with 3SAT on variables. We remove duplicate and tautological clauses, and handle an empty clause, or fewer than two remaining clauses, directly. There are then clauses, and we duplicate clauses until their number is a power of two. An address of bits then selects one clause. For a variable and a value , we define to be zero if assigning the value to variable satisfies a literal of the addressed clause, and one otherwise.
We represent the two possible values of source variable i by a pair of new variables , and consider the Boolean function
For a source assignment , let contain when , and when . Expanding the products gives
The product is one exactly when no variable satisfies the addressed clause under . Hence is the indicator that satisfies the addressed clause.
Every has size , and different choices are incomparable. A monomial arising from one assignment therefore cannot contain a monomial arising from another. For a fixed , the maximal supports are the sets with . Such a support has size at most exactly when is maximal, i.e., when . By Theorem 2.1,
Next, we implement (11) with small pathwidth. The function is one plus the XOR of the address minterms of the clauses that contain a literal on variable i satisfied by the value b. Since these minterms are disjoint, their XOR is the indicator of those clauses. We compute each minterm with an AND chain and add it to an XOR accumulator, using new gates for different uses. The two products in (11) are computed sequentially over i.
Our path decomposition keeps the address inputs throughout. It also keeps the two product accumulators, the current pair , and a constant number of temporary wires. For each gate, we introduce its output before forgetting any of its inputs at their last use. The scope of each gate then lies in a bag, and each variable occurs in an interval of bags. Hence the width is , and the circuit has polynomial size. Note that replacing the XOR gates by constant size circuits of AND, OR and NOT gates changes neither bound asymptotically.
A hypothetical poly( ) algorithm, applied with this decomposition, would therefore solve 3SAT in time
In that case 3SAT, and with it every problem in NP, would be in SUBEXP.
F The clause-width boundary for constant one
In this appendix, we ask how much the 2CNF assumption matters for finding a small certificate. We show that increasing the clause width from two to three changes the parameterized problem dramatically. Strikingly, this happens even for Horn formulas, whose satisfiability problem is decidable in polynomial time.
Theorem F.1. For every computable with , distinguishing from is coW[1]-hard parameterized by the supplied threshold . This holds on satisfiable, unit-free Horn 3CNFs with every coordinate essential and only one variable occurring positively.
Proof. We reduce from the complement of Multicolored Clique, and our construction has three parts. Firstly, selectors make a derivative recognize a multicolored clique. Secondly, a switch changes this derivative to its complement. Thirdly, blocks make every alternative certificate too large.
Take a graph with nonempty color classes , where . We call two distinct vertices incompatible if they belong to the same class, or form a nonedge between different classes. A variable records whether vertex is selected, so that
allows at most one vertex per class, and requires the selected vertices to be pairwise adjacent. However, it does not yet require a vertex from every class. For that purpose, we introduce and set
Fix . If class contains a selected vertex, its clauses force , and summing over gives one. If no vertex of the class is selected, either value of is allowed, and the sum gives zero. Consequently,
The function is the indicator of multicolored cliques. In particular, it is identically zero exactly when there is no such clique.
In that case, we need a derivative equal to one. To do so, we add a switch s and let
At the formula is , and at it is . Taking the parity of these two cases gives
Hence is a certificate exactly when there is no clique. Note also that . Setting all vertex variables to zero in the displayed formula for therefore gives , and the only ANF supports of that avoid the vertex variables are , and .
We still have to exclude other small certificates. We put and , and replace every by the OR of new bits. We claim that a maximal monomial that uses any bit of a block must use the whole block. To see this, write
In the substituted polynomial, the blocks used by a term identify the original vertex variables in that term, and together with its unchanged variables they identify the original support. Different original terms therefore cannot cancel. Further, every nonempty subset of a used block occurs, so a term that uses only part of a block lies inside a larger term that uses all of it, and cannot be maximal.
Consequently, every certificate of size less than must avoid the blocks, and of the three supports listed above, only can be maximal. The OR substitution preserves whether is zero, because every assignment to the old vertex variables is realized by an assignment to the blocks. By (13), the optimum is therefore when there is no clique, and at least when there is one.
We finish by checking the promised class of formulas. Every occurrence of a vertex variable in is negative, so replacing it by an OR and distributing the clauses keeps the width at most three, with clauses. We complement all selectors . Before the block substitution, the clauses then take the forms
After substitution and distribution they remain Horn and unit-free, with only s occurring positively. Recall that complementing inputs preserves certificates.
Satisfiability and essentiality are easiest to check before this last complementation. Taking and all satisfies the formula. At , changing any selector from one to zero changes the output. At with one selector at zero, changing changes the output. For a bit in the block of a vertex in class , we take , , all other selectors one, and all other block bits zero. Changing that bit from zero to one then changes the output. Every variable is therefore essential. Finally, depends only on , so the construction is an FPT reduction.
F.1 Fixed thresholds
Theorem F.1 rules out an FPT algorithm under the usual assumption. However, it does not rule out a polynomial time algorithm for each fixed k. Whereas at width three such an algorithm exists, at width four even this weaker possibility fails unless P=NP.
Proposition F.2. For every fixed , BCD is polynomial-time decidable on 3CNF and coNP-complete on 4CNF.
Proof. For 3CNF, we enumerate the nonempty sets of at most variables, after discarding tautological clauses. If misses a remaining clause, it is not a certificate. Otherwise, fixing the variables of leaves a 2CNF, since every surviving clause has lost at least one literal. There are at most such cofactors, one for each assignment to .
The derivative is the parity of these cofactors. To disprove that it is always one, we must find an outside assignment that makes an even number of cofactors true. We therefore enumerate all even patterns of true and false values. For a chosen pattern, we include every clause of each cofactor that is required to be true. For each cofactor required to be false, we choose one of its clauses to falsify, which amounts to imposing at most two unit requirements. The resulting test is a 2SAT instance.
Constant cofactors are handled directly, since a constant cofactor is consistent only with its own value and requires no clause choice. There are at most patterns and clause choices per pattern, where is the number of input clauses, which is polynomial for fixed . An attainable even pattern rejects , and if none exists, is a certificate.
For width four, we first take k = 1. Given a 3CNF , we introduce new variables x, u, v and form
Observe that the last two clauses force any singleton certificate to be . At the formula is one, and at it is , so , which is identically one exactly when is unsatisfiable. For a larger fixed , we conjoin new unit variables. Every maximal ANF support then gains exactly those variables, so a certificate of size at most exists exactly when has a singleton certificate. This proves coNP-hardness.
For membership in coNP, a NO instance can give, for each candidate set, one outside assignment with derivative zero. There are polynomially many candidates when is fixed, and each derivative value can be checked with at most evaluations of the input formula.
F.2 Checking a specified set
The same cofactor argument also classifies the task of checking one proposed certificate, where the set is supplied and its size is the parameter.
Proposition F.3. Given a 3CNF and a specified nonempty , deciding whether is coW[1]-complete parameterized by . Hardness already holds for the unamplified Horn construction in Theorem F.1.
Proof. For hardness, we use (13), complement the selectors as above, and prescribe . The specified set is a certificate exactly when the source graph has no multicolored clique. Note that no block amplification is needed here.
For membership, we reduce the complementary problem to Clique. We first remove tautological clauses. If misses a remaining clause, then is immediately not a certificate, and we output a fixed YES instance of Clique. Otherwise, we form the cofactors of width two and enumerate the even patterns as in the preceding proof. Fix one pattern. Its true cofactors give a base 2CNF , and if is unsatisfiable we discard the pattern. Every nonconstant cofactor required to be false asks us to choose a clause to falsify, and each such choice is a bundle of at most two unit assumptions. Constant cofactors are handled as before.
These choices can be encoded by a graph, because of the following property. A satisfiable 2CNF together with unit assumptions is satisfiable whenever each assumption, and each pair of assumptions, is consistent with the base formula. To see this, we existentially eliminate, by resolution, all variables not fixed by the assumptions. The resulting formula on the fixed variables is still a 2CNF. If the assumed values were inconsistent with it, they would falsify a clause of size at most two, or the assumptions themselves would contain a contradictory pair. Either failure would already be visible in one or two assumptions.
We make one vertex group for each cofactor that requires a clause choice, and one vertex for each clause it could falsify. We delete the choices whose bundle is inconsistent with , and we join vertices from different groups exactly when their two bundles are jointly consistent with . A clique that chooses one vertex from every group is then a set of pairwise consistent choices. By the property above, these choices are jointly consistent, and hence give an assignment that realizes the pattern. Conversely, such an assignment falsifies a clause of every false cofactor, and these clauses form a clique.
There are at most groups. We add singleton groups, whose vertex is adjacent to every vertex of every other group, until there are exactly groups. A pattern that requires no choices then produces a -clique, as needed, since its base is satisfiable. We take the disjoint union of these graphs over all patterns that were not discarded. Since , we have , and a -clique must lie in one component. The final graph therefore has a -clique exactly when some even pattern is attainable. Constructing it takes FPT time, and depends only on .
G Implications and the binary-language dichotomy
In this appendix, we prove the dichotomy for binary constraint languages stated in Section 6. The only hard case that needs new work is implication. An implication forbids just the assignment x = 1, y = 0, and we use this simple constraint to obtain the same family of certificates as in the lifting theorem for positive 2CNF. The difficulty is that an implication treats its two ends differently. To satisfy many implications at once, we can either set their tails to zero or set their heads to one, and our construction uses both of these moves.
Theorem G.1 (Implication lifting). Let be a circuit of size , including its declared inputs, and let . Given positive unary weights , one can construct a conjunction of implications on distinct variables with the following exact certificate family:
Here , , and there is one further variable. Thus and
If all weights are at most , the formula has variables and clauses. Its implication graph is acyclic of height at most four. Every coordinate is essential, and the displayed guards are explicit certificates.
Proof. We begin with the construction for weights equal to one, which has three tasks. Firstly, we represent as a parity sum of an implication formula. Secondly, we add guards that exclude unwanted maximal monomials. Thirdly, we introduce the weights without leaving the implication language.
Representing a positive clause by implications. We start with the positive compiler of Theorem 5.1. For each clause , we introduce a private variable e and replace the clause by
If , either value of is allowed, which gives even parity, and otherwise must be one, which gives odd parity. Summing over therefore recovers . Since different clauses have different private variables, summing over all of them recovers .
In the resulting formula , every implication goes from an old variable to one of the new private variables. We call the old variables sources and the private variables sinks. Note that all public variables are sources, and that the variables we must sum over are the old set together with all sinks. We will need an odd number, at least three, of each kind of mandatory variable. The number of sources already has this property. To adjust the number of sinks, we append disjoint components consisting of two new sources pointing to one new sink, with all three variables mandatory. Each component has five satisfying assignments, one when the sink is zero and four when it is one, so its parity is one and it does not change . Since each component adds two sources and one sink, at most three such components suffice.
Let be the set of mandatory sources and the set of mandatory sinks, and put . We now have , both odd, and .
Adding the guards. Let contain all variables of , together with one extra variable that does not use. For every , we introduce a marker , whose implications constrain every coordinate of except :
We conjoin these implications with to obtain . For a source marker, the value forces all other old variables to one, which satisfies because every sink is one. For a sink marker, the value forces all other old variables to zero, which also satisfies , because every source is zero. Notice that the direction of the implications is chosen so that both of these assignments are safe.
To treat the two kinds of marker together, we write for and for , since complementing coordinates does not change certificate sets. In these coordinates, means that the marker is active. With no active marker, is just , and one active marker leaves only its paired old variable unconstrained. Two or more active markers of the same kind force every old variable to the same extreme value. Active markers of different kinds are impossible, because they would force to be both zero and one, and this is the role of in the construction.
Next, we translate these cases into a polynomial identity. We define
These are the indicators of the extreme assignments just described. For , we put and write . The case with no active marker contributes . The case with only marker active contributes if , and the analogous expression with if . Further, the indicator of at least two active source markers and no active sink marker is
The first expression removes, from all assignments to these markers, the cases with zero or one active source marker, and the equality uses that is odd. The calculation for sink markers is identical. Adding all cases gives, in the complemented marker coordinates,
The maximal monomials. The full support has coefficient zero, since omits , every omits , and every other summand omits a marker. On the other hand, each support missing just one coordinate of has coefficient one. If the missing coordinate is an old variable , its term comes from , because any other omits and omits . If the missing coordinate is the marker of , its term comes from , and the last two summands of (14) omit at least three markers, so they cannot cancel it. These supports of size are therefore maximal, and they are the guards of the theorem.
Every term outside misses an old mandatory variable or a marker, and is therefore contained in a guard. The same is true of every term of that misses an old mandatory variable. We are left with the terms of that contain all of . No guard contains them, and no other summand can cancel them. Moreover, none of them contains a guard, since they omit . Their maximality is consequently decided entirely within .
The identity says exactly that the supports of containing are the sets for the supports of . Hence the remaining maximal supports of are , with , and this also covers and . Since the guards together contain every coordinate, every coordinate occurs in the ANF and is essential.
Assigning weights. Before adding the markers, we replace each public source by the OR of new variables, which form a block . This substitution stays within implication formulas, because an arc is replaced by the arcs with , so the number of clauses grows only linearly with the size of the block.
To see that this substitution gives the intended cost, recall that the ANF of an OR contains every nonempty monomial on its block. Each monomial obtained by substitution identifies the original support through the blocks it meets, so different original supports cannot cancel. Within one block, any partial support can be enlarged to the whole block and still occurs. It follows that maximal supports use whole blocks, and correspond exactly to the old maximal supports. The substitution commutes with , since the public blocks are disjoint from , and the mandatory sources and sinks do not change. The guard argument therefore applies to the substituted compiler, and proves the claimed family.
There are old variables and clauses, and each of the markers adds one implication for each old variable except its partner, which gives clauses in total. All arcs go forward through four layers: source markers, old sources together with , old sinks, and sink markers. Some arcs skip a layer, but none of them goes backward, so the implication graph is acyclic of height at most four. The counts of variables and the formula for cert() now follow from the displayed family of certificates. As with every implication formula, both the all zero and the all one assignments satisfy .
G.1 Proof of the dichotomy
Proof of Theorem 6.1. Suppose first that every allowed relation is affine. Combining their linear equations gives a system over . If it is inconsistent, the represented function is zero and has no certificate, so we assume from now on that it is consistent.
We choose a set of variables, and fix the other variables to . The remaining system is
This system has either no solution or exactly of them. For every fiber to have odd parity, two conditions must therefore hold. Firstly, the columns in must be independent. Secondly, every right hand side in the display must lie in their span. Taking , and then each unit vector, shows that the second condition requires and all columns outside to lie in that span, so must be a column basis of . Conversely, a column basis works: consistency places in the column span of , and each remaining system then has exactly one solution. The certificates are therefore exactly the nonempty column bases, and Gaussian elimination gives cert = rank when the rank is positive. At rank zero the function is constant one, and the requirement of a nonempty set leaves no certificate.
Next, we identify all remaining languages. Every unary relation is affine, including the empty relation, which is described by an inconsistent system. A binary relation with zero, one, two or four tuples is also affine, since two distinct vectors over form an affine line. A binary relation that is not affine must therefore contain exactly three tuples. Depending on which tuple it excludes, it is OR, NAND, implication, or reversed implication.
Hardness for OR is Theorem 5.4, and complementing every variable gives hardness for NAND. For implication, we apply Theorem G.1 to the selector construction (8), giving weight one to its paired assignment variables and weight to its universal variables. This yields the same gap as before, against at least . Reversing the two arguments handles reversed implication. Note that these reductions use no constants, since every new variable is an input of the constructed formula, and that membership in is proved as for BCD.
Finally, any unary or binary relation can be expressed by a signed 2CNF of constant size, with one clause for each forbidden tuple. This changes the input size by only a constant factor, so Theorem 3.1 supplies the stated parameterized algorithm.
The implication construction also preserves the two approximation bounds of Theorem 5.4, since it has the same bound on clauses. It has a useful interpretation in terms of orders as well. The coordinates set to one form an upset of the partial order defined by the acyclic implication graph, so the hardness holds for upsets of posets of height four. This depends, however, on how the poset is encoded. A DAG encoding, or its transitive reduction, retains the size bound used in the approximation proof, whereas writing out the full matrix of the transitive closure may not.
H The number of quadratic rounds
In this appendix, we prove Theorem 6.2. The upper bound follows from the degree of the computed function. The lower bound needs more care, since a SAT instance must be represented using few quadratic rounds, while keeping the number of inputs small enough that an exponent of would place NP in SUBEXP.
Proof of Theorem 6.2. We begin with the algorithm. After rounds, every coordinate has Boolean degree at most , because a quadratic map multiplies at most two coordinates at a time, and reducing to can only decrease the degree. We can therefore compute each coordinate by storing its table of multilinear coefficients. To multiply two tables, we take the union of each pair of supports and add the resulting coefficients modulo two.
At the last round, we list the nonzero supports and discard every support that is contained in a larger one. By Theorem 2.1, the smallest remaining nonempty support is a smallest certificate, and if none remains, there is no certificate. Since the tables contain at most entries, even pairwise multiplication and containment tests fit within poly( ) time.
Encoding assignments by monomials. For the lower bound, we start with a 3SAT instance on variables. We remove duplicate and tautological clauses, and decide empty clauses, as well as instances with fewer than two remaining clauses, directly. We then pad the clause list by duplication until its length is a power of two, say . Since there are only distinct clauses of width at most three, we have and .
Fix the constant of the theorem. We divide the variables into groups, where , and pad the last group with unused SAT variables if needed. For every group and every assignment to that group, we introduce an input variable . Selecting one such variable from each group then describes a full SAT assignment. Note that the added unused SAT variables are ordinary assignment choices, and that we never sum over them as parity variables.
For each group, we define
The product has one monomial for every full assignment, and the product keeps exactly those monomials whose assignments falsify clause . A group not used by that clause imposes no restriction, so its factor is simply .
We would like to test each clause separately, because adding these products over all clauses would let two false clauses cancel each other. To do so, we introduce address inputs , and let be the indicator of address , i.e., the product of the literals that specify that address. Consider
At a fixed address , the second summand removes the monomials of the assignments that falsify clause . Writing for the inputs that encode a full assignment , we therefore have
where is one exactly when satisfies the addressed clause. In particular, exactly when satisfies every clause.
The sets are pairwise incomparable, because each of them chooses exactly one input from each group. A monomial associated with one assignment can therefore never contain a monomial associated with another assignment, even after address variables are added. Within the terms for a fixed , the maximal supports are together with a maximal support of , and they have size at most exactly when . If , that assignment contributes no term at all. We conclude that
Computing the polynomial in few rounds. One affine linear map forms all , all , the address literals, and the constant one. Next, we compute all products in (15) by binary product trees, in which the group products have factors and the address indicators have factors. Padding with factors equal to one lets all of these trees run in parallel for
rounds. One final quadratic coordinate forms the sum in (15), where each term multiplies a computed address indicator by a computed group product. This last step is permitted, because a coordinate of a quadratic map may sum many quadratic terms. The total number of rounds is .
For sufficiently large we have , and the number of initial inputs and the number of rounds then satisfy
All maps together have description length . Now suppose that an algorithm runs in time with . Since for large , we have , and further . On this construction, the running time would therefore be
Then 3SAT would be in SUBEXP, and so would every problem in NP. Eliminating from the displayed counts of inputs and rounds yields
which is the claimed range.
We note that the restriction to this range matters. Once is comparable to or larger, computing the full truth table can already improve on the bound based on degree. The reduction also does not rule out a running time with an arbitrary additional factor that depends only on .
I Ordered branching programs
In this appendix, we prove Theorem I.1 and its lower bound. A fixed variable order gives another way to keep the search small: we read one variable at a time, and decide whether to include it in the cube. For the derivative to be the constant one, the coefficient of the cube's own monomial must be one, and the coefficients of all larger supports must be zero. Note that we do not need to store those larger supports separately, because their coefficient computations can be represented by a vector space.
Theorem I.1. Given
over , with matrices of dimension at most and each variable appearing in one layer, one can compute and a minimizing certificate, or report infeasibility, in time . The same bound holds for .
I. 1 Keeping track of larger monomials
Proof. We pad the matrix dimensions to . To obtain the coefficient of , we choose at each layer and at every other layer, and then multiply on the left by and on the right by .
After the first layers, the chosen matrices give a row vector, which the remaining layers will turn into a coefficient. For a fixed selected set , we keep two pieces of information, namely the row for itself and the span of the rows for all of its strict supersets in this prefix. Formally, we put if and otherwise, and define
If there is no strict superset, is the zero space. The span suffices, because testing whether all of these rows eventually give zero is a linear condition.
A state of the dynamic program is a triple , where the bit says whether is nonempty, and we store the least size of a selection that produces each state. Initially, the state is at cost zero. At the next layer, we write its two matrices as .
If we select the new variable, every relevant monomial must use it. Hence we multiply both the exact row and the rows of strict supersets by :
The cost increases by one, and the bit becomes true.
If we skip the new variable, the exact row becomes pA. A strict superset of the new selection then has three possibilities: it adds old variables only, it adds the new variable as well as old variables, or it adds only the new variable. The corresponding rows belong to WA, WB and respectively. Thus the transition for a skipped variable is
with unchanged cost and bit. Note that both transitions preserve the definitions of p and W.
After the last layer, multiplying by v gives the actual coefficients. In particular, pv is the coefficient of , and every coefficient of a strict superset vanishes exactly when every row in W is orthogonal to v. By Theorem 2.1, we accept a certificate exactly when
For a zero cube, we change to , which requires all coefficients whose supports contain S, including S itself, to vanish. Since equal states have the same transitions and acceptance conditions under every continuation, retaining only the cheapest selection is valid. Stored predecessor choices recover a minimizing set.
There are possible rows and at most subspaces of , since a basis of at most rows specifies any such space. We use bases in reduced row echelon form to compare spaces, and to compute the transitions in time polynomial in . Including the bit and all layers gives time.
Restrictions on the selection are accommodated by the same algorithm. We disable the selected transition at forbidden layers, and force it, with the prescribed cost, at mandatory layers. When mandatory variables represent an initial parity projection, they do not set the bit, which records nonemptiness among the eligible inputs only.
This includes complete layered OBDDs. If are the transition matrices for the two values of variable i, we take
Then is at and at , and the width is the number of states in a complete layer. An OBDD that skips tests must first be completed, and our bound uses its width after completion. Note also that the verifier in Theorem 3.2 is another instance of the same ordered matrix calculation.
I. 2 A lower bound for OBDD width
We now show that a running time of poly( ) is impossible, unless NP SUBEXP.
Proposition I.2. BCD is NP-complete on complete deterministic OBDDs. Unless NP SUBEXP, it has no poly( ) algorithm in their layered width w.
Proof. For a prescribed set, we follow only its chosen transitions in the preceding algorithm. There is one row and one subspace to update at each layer, so verification takes polynomial time, and guessing the set proves membership in NP.
For hardness, we start with a 3SAT formula on variables and nonempty clauses, and handle the trivial cases directly. We duplicate clauses to obtain clauses, indexed by address bits , and use the same Boolean function as in (11):
where is zero if the value b for source variable i satisfies a literal of the addressed clause, and one otherwise. As shown in the proof of Theorem E.4,
Here chooses one variable from each pair , and indicates that the addressed clause is satisfied. Since the different are incomparable and have size , a maximal support of size at most exists exactly when some is identically one. Thus exactly when the source formula is satisfiable.
To compute with an OBDD, we read the address bits first and retain the clause index. We then read , keeping, besides the index, two accumulator bits that are initially one. After reading pair , we update
While reading the second member of a pair, we also retain the value of the first member, and at the end we output . These transitions are deterministic and use at most states in each layer. Since the number of layers and the total size of the OBDD are polynomial, this proves NP-hardness.
For the lower bound, note that the width is , which is at most linear in the length of the source formula. A poly( ) algorithm would therefore decide 3SAT in time , and 3SAT, together with every problem in NP, would then be in SUBEXP.
We acknowledge, however, that the bounds leave a wide gap: the algorithm has an exponent quadratic in , whereas the lower bound only excludes an exponent of . Note also that the fixed read-once order is important for the algorithm. For example, as a Boolean polynomial, whereas treating its two occurrences of as independent variables would give a nonzero polynomial and a false certificate. The argument above therefore does not extend to programs that read a variable more than once.
J Hardness for strongly collapsible independence complexes
In this appendix, we prove the last remark of the introduction. A positive 2CNF can be viewed as a graph in which each clause becomes an edge , and its satisfying assignments are then the vertex covers of the graph. It is natural to ask whether the hardness comes from a complicated independence complex. We show that it persists even when this complex can be reduced to a point by a particularly simple kind of collapse.
For a graph G, we write
The independence complex consists of all independent vertex sets, including the empty set. A vertex of a simplicial complex is dominated by another if every maximal face containing the first also contains the second, and deleting dominated vertices is called a strong collapse [BM12].
The following extension has two useful features: its effect on the smallest certificate is known exactly, and its independence complex has an explicit collapse sequence.
Lemma J.1. Suppose is nonconstant and its full ANF coefficient is zero. Add a vertex adjacent to all of , forming . Add , join both and to every vertex of , and add the edge . The resulting graph is connected, every coordinate of is essential, and
Moreover, has an explicit strong collapse to a point.
Proof. We first compute the change in the size of a certificate. Let . In the first extension, setting leaves , whereas setting forces every old variable to one. Thus
In the second extension, if some coordinate of is zero, its edges to and force both of these variables to one, and the edge is then satisfied regardless of . If all coordinates of are one, only the constraint remains. Since the product of the coordinates of is , these two cases give
The last expression makes the maximal supports explicit. The terms and are contained in , so neither of them is maximal. The terms from contain both and , and neither remaining displayed term contains both. Also, the full old support is absent from . It follows that the maximal supports are exactly
Writing , their smallest size is
For the equality, note that a nonconstant polynomial has a nonempty maximal support, and the absent full term makes its size at most . The last two displayed supports together contain every coordinate, so every coordinate occurs in the ANF and is essential. The added edges also make connected.
Now consider the collapse. The neighbors of are all the vertices of , whereas the neighbors of are those same vertices together with , and are not adjacent. Any independent set containing can therefore include as well. In particular, every maximal such set already contains , so is dominated by in , and we delete . The vertex is now isolated in the remaining graph. Since every maximal independent set contains it, it dominates every other vertex of the remaining independence complex. Deleting those vertices one by one leaves only , which is the promised strong collapse.
Every output of the crown in Theorem 5.2 satisfies the hypotheses of Theorem J.1, since it is nonconstant and its full ANF coefficient is zero. The extension adds four vertices, edges, and exactly three to the optimum. Applying it to the gap construction of Theorem 5.4 therefore preserves completeness and the nearly linear approximation lower bounds, and the collapse sequence can be supplied with the instance. Thus a simple topology for the whole independence complex does not make the certificate problem easy.
AI methodology
AI assistants (ChatGPT and Claude) were used to explore constructions, develop and review proof arguments, check related work and write finite verification programs. The computational checks compare finite truth tables, ANF supports, and algorithm outputs; they are supplementary to the proofs.
References
[BG92] Richard Beigel and John Gill. Counting Classes: Thresholds, Parity, Mods, and Fewness. Theoretical Computer Science, 103(1):3–23, 1992.
[BGR25] Vijay Bhattiprolu, Venkatesan Guruswami, and Xuandi Ren. PCP-free APX-Hardness of Nearest Codeword and Minimum Distance. Technical Report TR25-029, Electronic Colloquium on Computational Complexity, 2025.
[BM12] Jonathan Ariel Barmak and Elias Gabriel Minian. Strong Homotopy Types, Nerves and Collapses. Discrete & Computational Geometry, 47(2):301–328, 2012.
[CFK 15] Marek Cygan, Fedor V. Fomin, Łukasz Kowalik, Daniel Lokshtanov, Dániel Marx, Marcin Pilipczuk, Michał Pilipczuk, and Saket Saurabh. Parameterized Algorithms. Springer, 2015.
[DRS24] Pranjal Dutta, Mahesh Rajasree, and Santanu Sarkar. Complexity of Monomial Prediction in Cryptography and Machine Learning. EasyChair Preprint 14972, 21 September 2024.
[DS09] Itai Dinur and Adi Shamir. Cube Attacks on Tweakable Black Box Polynomials. In Advances in Cryptology – EUROCRYPT 2009, volume 5479 of Lecture Notes in Computer Science, pages 278–299. Springer, 2009.
[Fab08] John Faben. The Complexity of Counting Solutions to Generalised Satisfiability Problems Modulo k, 2008. arXiv:0809.1836.
[FHM 23] Johannes K. Fichte, Markus Hecher, Michael Morak, Patrick Thier, and Stefan Woltran. Solving Projected Model Counting by Utilizing Treewidth and Its Limits. Artificial Intelligence, 314:103810, 2023.
[FHRV09] Michael R. Fellows, Danny Hermelin, Frances Rosamond, and Stéphane Vialette. On the Parameterized Complexity of Multiple-Interval Graph Problems. Theoretical Computer Science, 410(1):53–61, 2009.
[FS13] Michael A. Forbes and Amir Shpilka. Quasipolynomial-Time Identity Testing of Non-Commutative and Read-Once Oblivious Algebraic Branching Programs. In Proceedings of the 54th Annual IEEE Symposium on Foundations of Computer Science (FOCS 2013), pages 243–252. IEEE Computer Society, 2013.
[KB25] Amirhossein Kazeminia and Andrei A. Bulatov. Modular Counting CSP: Reductions and Algorithms. In 42nd International Symposium on Theoretical Aspects of Computer Science (STACS 2025), volume 327 of Leibniz International Proceedings in Informatics, pages 60:1–60:18. Schloss Dagstuhl-Leibniz-Zentrum für Informatik, 2025.
[LM18] Michael Lampis and Valia Mitsou. Treewidth with a Quantifier Alternation Revisited. In 12th International Symposium on Parameterized and Exact Computation (IPEC 2017), volume 89 of Leibniz International Proceedings in Informatics, pages 26:1–26:12. Schloss Dagstuhl-Leibniz-Zentrum für Informatik, 2018.
[Ope26] OpenAI. The Exponential Time Hypothesis is False. Preprint, 25 October 2026, github.com/openai/math.
[RS05] Ran Raz and Amir Shpilka. Deterministic Polynomial Identity Testing in Non-Commutative Models. Computational Complexity, 14(1):1–19, 2005.
[She26] Karthik Sheshadri. Bounded constant derivative: Completeness, approximation, and Lean verification. Preliminary author-shared manuscript, October 2026.
[Smi26] Nicholas Smirnov. Boolean Derivative Certificates and Maximal ANF Terms. Technical Report TR26-083, Electronic Colloquium on Computational Complexity, 2026.
[Uma99] Christopher Umans. Hardness of Approximating Minimization Problems. In Proceedings of the 40th Annual IEEE Symposium on Foundations of Computer Science (FOCS 1999), pages 465–474. IEEE Computer Society, 1999.
[Uma01] Christopher Umans. The Minimum Equivalent DNF Problem and Shortest Implicants. Journal of Computer and System Sciences, 63(4):597–611, 2001.