Manuscript Offprint
arXiv:2611.05614The CNF Encoding Complexity of Boolean Functions
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
We study the minimum number of clauses required to encode a boolean function into a CNF formula with auxiliary variables. Our main result is that if a boolean function can be evaluated in nondeterministic time (in the RAM model) with bits of advice such that at most bits of advice are accessed for each input, then it admits a CNF encoding with clauses. This constitutes a nonuniform generalization of Robson's (TCS'91) variant of the Cook–Levin theorem, for which a naïve generalization would yield clauses; our applications leverage to obtain significantly better bounds. Since preprocessed data structures can be modeled as computation with advice, our result allows us to translate space- and time-efficient data structures to compact CNF encodings. As an application, we derandomize a data structure of Larsen and Williams (SODA'17) to show that every -CNF function on inputs can be encoded with clauses. Notably, despite encoding a -CNF function, the encoding itself necessarily contains clauses of unbounded width, since an information-theoretic argument shows that the minimum number of bounded-width clauses to encode such functions is in the worst case. In general terms, our results imply that for a wide variety of NP-complete problems, one can reduce to CNF-SAT in a way that results in asymptotically fewer clauses than previously known methods.
*andrew@krapivin.net †benjamin.przybocki@gmail.com ‡bersub@cmu.edu
1 Introduction
Given a boolean function , how compactly can we “encode” as a CNF formula (see Definition 1)? A partial answer was provided first by the Cook–Levin theorem [Coo71, Lev73], which implies that if can be computed nondeterministically in steps, then it can be encoded as a CNF instance of size . Since then, more compact encodings of size have been devised and extended to different models of computation [Sch78, PF79, Coo88, Rob91]. These optimized Cook–Levin theorems have several complexity-theoretic applications, including showing that CNF-SAT is complete for nondeterministic quasilinear time [Sch78, GS89] and proving time-space tradeoffs for CNF-SAT [For00]. The problem of compactly encoding boolean functions has also acquired tremendous practical utility with the advent of SAT solvers, where efficient encodings are often make-or-break for whether a problem can be solved in practice [SH23, KPSS25, HS24, QWSH25, HS15]; empirically, smaller encodings tend to perform better in practice [Bjö09, ANORC13].
Consequently, the SAT community has studied encodings for a variety of concrete functions, including both classical NP-complete problems (e.g., Hamiltonian cycle [Zho20, Zho24], graph coloring [FJM24], -clique [IMM17, Sub25], and many others [CD26]) as well as elementary constraints such as parity [EKMS24] or [Sin05, KSV19, KPS26], which serve as building blocks of larger encodings. However, despite the theoretical and practical importance of CNF encodings, this model of computation has yet to receive a systematic theoretical treatment that focuses on large classes of boolean functions rather than particular instances, which is in stark contrast to other models of computation like boolean circuits [Juk12]. In this paper, we prove fundamental results about the complexity of boolean functions in this model and show how this complexity metric relates to complexities in other nonuniform models. We hope to convince the reader that the theory of CNF encodings is much deeper than has previously been appreciated. In particular, we show that the optimized Cook–Levin results mentioned above are not the end of the story.
A CNF encoding of a boolean function is a CNF formula with nondeterministic variables that computes . Formally:
Definition 1 (Encoding). Given a boolean function , we say that a triple is an encoding of if: (i) is a sequence of propositional variables, and is a set of propositional variables disjoint from ; (ii) is a CNF formula over variables ; and (iii) for every assignment ,
The variables in are called input variables, and those in are called auxiliary variables.
Thus, CNF encodings constitute a nondeterministic, nonuniform model of computation. We say that the CNF encoding complexity of a boolean function , denoted , is the minimum number of clauses in a CNF encoding of . In Section 1.3, we elaborate on why we choose to focus on the clause count instead of, say, the total number of literals in a CNF encoding.
One of the few theoretical results known about encoding complexity is due to Tseitin [Tse70]: if the (nondeterministic) circuit complexity of is , then . Each of our main results implies that the converse of Tseitin’s theorem fails strongly: there are boolean functions for which
The claim here is not that formulas with fewer clauses are easier to solve—random formulas with hundreds of clauses tend to be much harder than structured formulas from industry with millions of clauses—but rather that for a fixed problem, performance tends to improve by choosing a smaller encoding [Pre21].
is much smaller than its (nondeterministic) circuit complexity. In Section 6, we characterize exactly in terms of nondeterministic conjunctive circuit complexity: whenever , it equals the minimum number of wires entering -gates in a nondeterministic De Morgan circuit computing . Thus, all of our results also have circuit complexity analogues.
Theorem 2. Let , and suppose that can be evaluated in time with bits of advice by an ANRAM machine that accesses at most bits of the advice for each input. Then, . Furthermore, such an encoding can be constructed deterministically in time polynomial in given the advice string.
We find Theorem 2 remarkable. It provides a tight bound on the number of clauses (up to polylogarithmic factors) for a wide variety of functions (technically speaking, even for a fraction of all boolean functions), and yields encodings with fewer clauses for a variety of classical NP-complete problems (we discuss some in Section 1.2). In contrast, applying Robson’s result yields quadratically worse bounds for almost all functions. Indeed, suppose one takes to be an arbitrary boolean function. Then, letting the advice string be the string of length encoding ’s truth table, we can compute by reading the input and consulting ; this way , , and , which yields . In contrast, an application of Robson’s theorem would yield the trivial bound .
In fact, a simple lower bound shows that Theorem 2 is not too far from optimal, meaning roughly that for every boolean function , there is some ANRAM machine for which applying Theorem 2 yields an encoding of size at most .
Proposition 3. Let be a boolean function with , let be an ANRAM machine that computes and minimizes over all possible (machine, advice) pairs, and let be the corresponding optimal parameters. Then,
Throughout this paper, we use to denote for any function , and meaning .
Indeed, there are boolean functions on variables, and each of them requires a different NRAM program, so the majority of them require program size .
Proof. Let be a formula that encodes with clauses, and be its set of auxiliary variables. We can further assume that ; we prove that this assumption is without loss of generality in Proposition 30. Then, consider the ANRAM machine receiving as advice, and upon receiving an input , proceed as follows. First, guess an assignment for each of the auxiliary variables in time . Next, for each clause in , nondeterministically guess which of its at most literals satisfies it; guessing this index takes time . Then, check that the polarity of that literal matches its value on the input, or on if it corresponds to an auxiliary variable, which can be done in time , and accept if and only if all such checks succeed. Thus, the total time is , the advice length is and the number of bits read is . We thus have
Since by definition, we obtain from which the result follows.
More generally, Theorem 2 has a natural interpretation in terms of data structures. Suppose we have an algorithm to compute that has access to a data structure which uses bits of memory, and upon receiving an input , nondeterministically computes in time by querying at most bits of . Then, Theorem 2 says that must have a small CNF encoding, regardless of how long it takes to build . As a more interesting application, consider the functions , each parametrized by some graph on vertices , defined by
Larsen and Williams [LW17, Thm. 3.2] showed that there is a randomized data structure using bits of space that computes this function in time . We show that this data structure can be derandomized, and therefore Theorem 2 implies that . It is not hard to see that this implies that every 2-CNF function has a CNF encoding of size . More generally, we show the following:
Theorem 4. If is a -CNF function for some , then .
The class of -CNF functions (i.e., representable by CNF formulas where each clause has width exactly ) is not only theoretically interesting [BDL23] but is also of great practical importance in SAT solving, particularly for . This is because the encodings for many NP-complete graph problems (e.g., vertex cover, -coloring, -clique, etc.) are dominated by a 2-CNF component [Sub25]. Theorem 4 implies that, for a fixed graph, all of these problems have CNF encodings with clauses. Previously, the best known bound was [Sub25, PSH26], and more generally, hypergraph decompositions give encodings for -CNF functions with clauses [CLT15, KPSS26]. Interestingly, a counting argument shows that if we restrict ourselves to encodings that are themselves -CNF (or even bounded width), then some -CNF functions require clauses. Thus, Theorem 4 rather surprisingly implies that clauses of unbounded width are helpful for encoding -CNF functions.
Larsen and Williams' data structure requires superpolynomial preprocessing time, so we do not know how to construct the encoding given by Theorem 4 in polynomial time. However, we do have a weaker bound, albeit still improving on the bound for bounded-width encodings, for which we have a polynomial-time construction:
Theorem 5. If is a -CNF function for some fixed , then one can construct in deterministic polynomial time a CNF encoding of with clauses.
The best lower bound we have for the encoding complexity of -CNF functions is clauses obtained via a counting argument (Proposition 35). Thus, there is a wide gap between our upper and lower bounds for this problem, and narrowing this gap is an interesting open problem.
En route to proving Theorem 2, we prove a result about encoding arbitrary boolean functions that are sparsely supported. We later sharpen this bound to the following, which may be of independent interest:
Theorem 6. For all , we have
As a direct corollary, we get an upper bound on arbitrary functions. Let , and consider the function defined by , for which applying Theorem 6 gives . It is then easy to see that any encoding for is also an encoding for taking as an auxiliary variable. Thus, , and this bound is optimal; this is a slight strengthening of the bound we obtained from Theorem 2 above. Similar bounds are known for depth-3 unbounded fan-in circuits from [Dan96] and nondeterministic branching programs [Nec62] (see Section 1.4). In contrast, applying the Tseitin transformation to an optimal (fan-in-2) circuit for [Lup58] only gives . In this sense, encodings, whose clauses can be arbitrarily wide, are more directly comparable to circuits with unbounded fan-in gates or nondeterministic branching programs.
1.2 Further applications of Theorem 2
To demonstrate how generally applicable Theorem 2 is, we derive a few corollaries for problems of interest to the SAT community.
Corollary 7. Let be a graph with , and let be the boolean function that receives vertices , each written in binary using input variables, and outputs 1 if and only if are distinct and for every , where . Then, .
Proof. We may assume that , as otherwise is constantly 0. Let the advice be a list of the edges of , each stored as a pair of integers written in binary, so . An ANRAM machine can check that are distinct by scanning over the vertices and maintaining an array of which have been seen so far; then, for each , it can guess an index and verify that by querying bits of advice. Hence, and , and Theorem 2 gives .
In contrast, the most compact CNF encodings from Zhou [Zho20] for Hamiltonian cycle use clauses. We note however that Zhou uses a different representation for the input variables: instead of a binary representation with variables, he uses a one-hot representation with variables. Nevertheless, our encoding provides a reduction of the Hamiltonian cycle problem to SAT with fewer clauses.
Corollary 8. Let be a graph with and let . Let be the boolean function that receives vertices in binary and outputs 1 if and only if for all . Then, .
Proof. We may assume that , as otherwise is constantly 0. With the same advice as in Corollary 7, an ANRAM machine can guess, for each pair , an index and verify that . Hence, and , and Theorem 2 gives .
For comparison, a direct encoding of -clique uses clauses, and Subercaseaux [Sub25] showed one can obtain clauses. Corollary 8 is better than these bounds whenever is much smaller than .
Our third corollary shows that randomly chosen -CNF functions have much smaller encodings than the worst-case bound of Theorem 4, leveraging the celebrated result of Balogh, Dong, Lidický, Mani, and Zhao [BDL] who showed that almost all -CNF functions are unate, i.e., antitone after negating some of the input variables.
Corollary 9. For every fixed , a uniformly random -CNF function satisfies with probability .
Proof. By [BDL, Theorem 1.1], the number of -CNF functions on variables is . Thus, it suffices to show that there are -CNF functions that satisfy the desired bound. Indeed, consider the set of functions of the form for sets , and note that . It is a standard fact that with high probability a uniformly random function from does not accept any input with more than ones. Indeed, the expected number of satisfying inputs to a uniformly random function from with Hamming weight is
Therefore, there is a subset of size for which no satisfying assignment has more than ones. Moreover, the subset of functions for which all variables appear in their corresponding formulas satisfies . Now, note that relabeling any subset of the variables of a function by their negations never changes its encoding complexity, and thus, for each function in there are distinct -CNF functions with the same encoding complexity, and these functions are all distinct. Therefore, it remains to see that for every .
We show this by Theorem 2. Let the advice be the characteristic vector of the collection over all size- subsets, so . An ANRAM machine can deterministically scan the input and reject if it contains more than ones; otherwise, it lists the at most variables set to 1 and queries one advice bit for each of the at most sets of of them, accepting if and only if none of these sets has a 1 in the advice string. Hence, and , and Theorem 2 gives .
We show in Proposition 35 that, conversely, a random -CNF function satisfies with high probability, so Corollary 9 is tight up to polylogarithmic factors. Curiously, the situation for worst-case -CNF functions is much more complicated: there, the best bounds we know are the same lower bound and the upper bound of Theorem 4. Closing this gap remains an interesting open problem, and is related to the gap between the worst-case results of Larsen and Williams [LW17] for answering independent set queries in graphs, and the average case, which is much easier.
1.3 Why study clause minimization?
The choice of CNF encoding is known to have a dramatic impact on the performance of modern SAT solvers, allowing, for instance, the solution of long-standing problems in discrete mathematics [HS24, SH23]. A major challenge, however, is to understand what properties of encodings are best correlated with empirical runtimes [Bjö09, GV21]. In 2009, Björk published interviews with several experts on practical CNF encodings, and the consensus was that clause width (which impacts the total number of literals in an encoding) was not an important factor, but the total number of clauses was more relevant.⁴ The encodings we present in this paper reduce the number of clauses by increasing the width, which can often be a favorable trade-off. We recently showed that CNF encodings for cardinality constraints (i.e., ) with fewer but wider clauses can outperform classical encodings in some settings [KPS26].
Furthermore, measuring complexity by the number of clauses has connections to other theoretically interesting models of computation. For example, we show in Section 6 that is equal to the minimum number of -wires (when ), which is within a factor of two of the minimum number of fan-in-two -gates in a nondeterministic De Morgan circuit computing . It is therefore no coincidence that our recent work on CNF encodings of cardinality constraints has yielded insights that have led to improved circuit complexity bounds [KPS26]. Similarly, encoding complexity is related to the minimum number of constraints in integer linear programs (ILPs), since each clause can be written as . Thus, our encodings directly translate to 0/1-ILP formulations with few constraints, using auxiliary variables (cf. extension complexity [Yan91, FMP⁺12]).
1.4 Related work
The key ingredients for Theorems 4 and 5 are data structures for computing independent-set queries, which is a well-studied problem in fine-grained complexity. Williams [Wil07] showed that there is a data structure for this task with deterministic polynomial preprocessing and query time on a pointer machine; Blelloch, Vassilevska, and Williams [BVW08] extended this work to support queries on sparse graphs. Bansal and Williams [BW12] gave faster batched queries using graph decompositions based on weak regularity. These query-time bounds do not directly give the same clause bounds in our setting, because the memory needed to represent lookup tables must also be encoded. As mentioned above, Theorem 4 is a consequence of derandomizing a data structure of Larsen and Williams [LW17] for computing independent set queries (see Theorem 15). Our proof of Theorem 5 can be seen as yet another data structure for independent set queries, albeit implemented directly as a CNF encoding.
⁴A plausible explanation is that SAT solvers (both DPLL- and CDCL-based [KSMS11]) spend the majority of their runtime in unit propagation [Knu22], and for a fixed number of variables, the complexity of doing unit propagation depends heavily on the number of clauses. Interestingly, the complexity of unit propagation used to depend strongly on clause width until the development of the two watched literals data structure [MMZ⁺01, Knu22], a key ingredient of modern solvers that stores only two special literals per clause, which are sufficient to perform unit propagation, and thus reduce the impact of width.
Our results are closely related to the extension complexity of polytopes that have a prescribed intersection with the boolean hypercube, as studied by Hrubeš and Talebanfard [HT23]. They obtain an extension complexity for polytopes intersecting an arbitrary , which is similar to a special case of our Theorem 6, although in their case the lower bound is not known to be tight (see below for other bounds of this order in related models). Furthermore, the edge polytope of graphs, which is tightly related to the boolean function , was studied by Fiorini, Kaibel, Pashkovich, and Theis [FKPT13] using biclique partitions, one of the components of our proof of Theorem 5. More generally, the problem of compactly encoding fits into a broader landscape of graph complexity measures [Juk13, Juk12]. Interestingly, most of these prior results also rely on biclique partitions, which by themselves cannot yield encodings of size ; more specifically related to our work, Subercaseaux [Sub25] observed that biclique partitions give , and recently a refined analysis using rectifier networks from Przybocki, Subercaseaux, and Heule [PSH26] showed , and that this cannot be improved via rectifier-network encodings.
The dense case of Theorem 6, namely that every boolean function on inputs has in the worst case, has classical circuit complexity analogues: worst-case bounds of order are well known in models of computation where gates have unbounded fan-in or some operations come for free, and in several of them the exact constant is known; see [Juk12, Sec. 1.4.4] for an overview. For instance, every boolean function on inputs can be computed by a depth-3 unbounded fan-in circuit with gates, and this is tight [Dan96, Ser19]. Nechiporuk [Nec62] proved that nondeterministic branching programs with edges suffice for all -bit functions.
Recently, Sheng and Xiao have shown a surprising role of CNF encodings in the theory of kernelization, using them as ingredients to exhibit the first polynomial-sized kernel for planar directed feedback vertex set [SX26b], as well as a near-linear element kernel for -hitting set [SX26a].
2 Technical Overview
2.1 Nondeterministic RAM with advice
In Section 3, we prove Theorem 2, which states that if can be evaluated in time with bits of advice by an ANRAM machine that accesses at most bits of the advice for each input, then . Our starting point is the case without advice proven by Robson [Rob91], which states that when . Thus, the central challenge is how to encode the advice queries using only clauses. Since the advice string can be thought of as a function , and such functions can be encoded with clauses according to Theorem 6, a naïve approach would use a total of clauses to query bits. We improve upon this in Lemma 11, which provides a “mass-production theorem” (cf. [Uli74, Kre23]) that roughly states we can encode queries to a function only paying a multiplicative factor. More precisely, for any boolean function , let be the function
A naïve translation of Dančik’s unbounded fan-in circuit would yield an encoding of size : its first layer consists of -gates of fan-in , followed by a layer of -gates and a single output -gate, and while the -gates are free by Proposition 44, every wire into the first-layer -gates costs a clause.
The latter upper bound translates directly to our setting: replacing each node of a nondeterministic branching program by an -gate and each literal-labeled edge by an -gate of fan-in 2, whose inputs are the literal and the gate of the edge’s tail, gives a nondeterministic De Morgan circuit whose -gates have total fan-in twice the size of the program, and hence every has by Proposition 44. Our Proposition 36 improves the constant to and gives a lower bound of ; determining the exact constant remains open.
defined by , where each has length . Then, our lemma says that .
We think of the truth table of as an array of size , indexed in binary by . Then, the key idea to prove Lemma 11 is that if we were promised that the inputs on which we want to query the array were such that each is in the th -sized chunk of (see Figure 1), then each could be described with only bits representing its position within the corresponding chunk, and thus the boolean function defined by whether those bits indicate a 1 in can be encoded with clauses according to Theorem 6; taking the conjunction of these encodings would give .
Naturally, we do not have this promise in general, but we can roughly simulate it by “hashing” each input into slots in such a way that the average number of possible inputs that are hashed into a slot is . This hashing takes place within the encoding itself, using an explicit expander from Teutsch [Teu14]. As opposed to the simplified promise described above, where each input’s address is indexed only by the variables associated to its chunk, the inputs that are mapped into a given slot may have addresses anywhere in . Nevertheless, we can still apply Theorem 6, because each slot’s function is sparse, accepting only addresses on average (recall that for a function with satisfying inputs, the bound of Theorem 6 scales roughly with rather than ).
We find it notable that sparsity enters the argument at all. The function we are querying is arbitrary and potentially dense, and both the naïve approach and the promise version above use only the special case for arbitrary . The hashing step is what creates sparsity: each of the queries may land anywhere in the dense table of entries, but hashing routes it to one of slots, each responsible for only an fraction of the addresses on average. The dependence of Theorem 6 on the support size, in the regime , is exactly what lets us exploit this.

Figure 1: The truth table of , partitioned into chunks of entries each.
2.2 -CNF boolean functions
We start with a reduction, presented in Section 4.2, that shows how upper bounds for encoding the independent-set function translate into upper bounds for general -CNF functions. More precisely, if every -vertex graph satisfies for some function , then any -CNF function can be encoded with clauses.
Thus, to prove Theorem 4, it suffices to prove that for all -vertex graphs . We do this by applying our Theorem 2 to a derandomized version of the algorithm of Larsen and
To keep the proof of Lemma 11 self-contained, we actually use the slightly weaker Lemma 13, which suffices here; the full proof of Theorem 6 is deferred to Section 5.1.
Williams [LW17] for answering independent set queries. In order to derandomize their algorithm, we use a derandomization for the orthogonal vectors problem due to Chan and Williams [CW20].
The proof of Theorem 5 explicitly constructs an encoding for without using Theorem 2, which makes it much more technically sophisticated. The reason for this is that we do not know how to save more than a factor within deterministic polynomial time, and since Theorem 2 loses polylogarithmic factors, its direct application could not beat the simple known upper bound. This proof, instead, is based on an efficient regularity-like graph decomposition (Lemma 27), whose building blocks can be encoded compactly: bipartite graphs without large empty squares (i.e., their bipartite complement does not have large bicliques), and a single sparse subgraph. The sparse part can be encoded directly by known results on biclique partitions, while the bipartite graphs without large empty squares are handled by a dedicated encoding which uses hashing (via explicit expanders) in a similar way to Theorem 2. Computing this decomposition in deterministic polynomial time is technically challenging, and relies on an efficient algorithm for identifying sparse squares in a graph (Lemma 25) which is based on derandomizing a random walk via explicit expanders in the same spirit as the derandomization of graph products from Alon, Feige, Wigderson, and Zuckerman [AFWZ95].
Finally, in Section 4.6, we prove our lower bounds for -CNF functions using information-theoretic arguments, which are the only technique we have for proving superlinear lower bounds on encodings. For encodings of bounded width, a direct counting argument gives the lower bound mentioned above. Without a width bound, we need to bound the number of minimal encodings with at most clauses, which in turn requires a bound on the number of auxiliary variables that can appear in such an encoding. We prove in Proposition 30 that a minimal encoding has fewer auxiliary variables than clauses. Intuitively, if we have more auxiliary variables than clauses in an encoding, then clauses become “too easy” to satisfy. To formalize this idea, we show using Hall’s marriage theorem that if there are at least as many auxiliary variables as clauses, then there is a partial assignment to the auxiliary variables that satisfies every clause containing a variable in the domain of . Such an is called an autarky [MS85], and it is a straightforward argument to show that an encoding with an autarky cannot be minimal. This yields Lemma 34, which states that at most functions on inputs have encodings with at most clauses; this lemma gives the bound of Proposition 35, as well as the lower bounds for sparsely supported functions described next.
2.3 Sparsely supported functions
In Section 5, we prove Theorem 6, which states that the worst-case encoding complexity of a function with exactly satisfying inputs is for . Our upper-bound construction translates a succinct static dictionary [BM99, Pag01, Pát08, HLY+25] directly into an encoding. This further illustrates the principle behind Theorem 2 of translating data structures into encodings; perhaps remarkably, here an asymptotically space-optimal data structure yields an asymptotically optimal encoding.
Conceptually, the dictionary reduces the sparse case to the dense case: it compresses into a table of bits, from which is evaluated with lookups and word operations. Here, each of the word operations can be encoded directly via the Tseitin transformation (without even invoking Robson's theorem [Rob91]), so the main difficulty lies in the lookups. It is tempting to handle each lookup by viewing as an arbitrary function on variables and applying a construction for arbitrary functions with clauses, such as Proposition 36 or Nechiporuk's nondeterministic branching programs [Nec62]. However, each lookup retrieves an entire word of bits, and fetching it one bit at a time costs clauses, a factor of too many.
We overcome this with Lemma 38, which may be of independent interest: an entire block of bits of a table of size can be fetched with clauses. Since even a single bit of a worst-case table requires clauses (Proposition 36), the remaining bits come essentially for free when . Checking each memory read with this lemma then gives the upper bound of Theorem 6.
In turn, we derive Lemma 38 from Lemma 13, a slightly weaker version of Theorem 6 with clauses that we prove directly in Section 3.3. Its proof arranges the satisfying inputs in an table and guesses an entry, with the column written in binary and the row chosen by one-hot variables. Rather than checking each row separately, which would cost clauses per row, for each column, each value of each input bit implies the disjunction of the rows whose entry agrees with it. Thus we pay only for the columns and coordinates, giving clauses for . Lemma 38 is then a direct application of Lemma 13 to the function that accepts an address and a word if and only if is stored at address ; this function has variables and satisfying inputs, giving clauses. In other words, the dictionary turns the sparse problem into a dense one, and Lemma 38 turns it back into a sparse one, loosely echoing how hashing creates sparsity in the proof of Lemma 11.
3 Encoding Nonuniform Computation
In this section, we prove Theorem 2:
Theorem 2. Let , and suppose that can be evaluated in time with bits of advice by an ANRAM machine that accesses at most bits of the advice for each input. Then, . Furthermore, such an encoding can be constructed deterministically in time polynomial in given the advice string.
Our proof relies on several ingredients, including a modification to Robson’s theorem [Rob91]. Robson proved that given a nondeterministic RAM machine and an input such that runs in time , one can construct in deterministic polynomial time a CNF formula of size such that if and only if accepts. However, by inspecting the proof it is easy to see that his construction is “uniform” over the inputs, meaning that a very slight modification yields a formula , with as the input variables (and with auxiliary variables), and such that accepts if and only if . Thus, we have the following:
Theorem 10 (Robson’s theorem [Rob91]). Let , and suppose that can be evaluated in time by a nondeterministic RAM machine. Then, . Furthermore, such an encoding can be constructed deterministically in time polynomial in .
3.1 Nondeterministic RAM with advice (ANRAM)
Our nondeterministic-RAM-with-advice model closely follows that of the nondeterministic RAM used by [Rob91]. In Robson’s model, a machine is specified by a sequence of instructions , which are to be executed sequentially by default, but include the possibility of jumping to other instructions, as for example , which would make the machine go back to execute . For the sake of our asymptotic results, we follow Robson in assuming that the number of instructions is upper-bounded by a fixed constant; this assumption is without loss of generality, because we can use a universal machine and encode the instructions as part of the advice. The input is given on a read-only tape, which is read sequentially (i.e., no random access). There are infinitely many registers , with representing a special accumulator register where operations take place. The machine has instructions for loading data into the accumulator, storing the contents of the accumulator, adding and subtracting to the accumulator, unconditional jumping, conditional jumping, nondeterministic jumping, and halting. As with Robson, we use the logarithmic cost criterion, where the cost of an operation is proportional to the lengths of its operands measured in bits.
The above model of computation constitutes nondeterministic RAM. For ANRAM, we allow the machine to make random-access queries to a read-only advice memory containing an advice string , which does not depend on the input. In principle, such a machine could query the advice string at any point throughout a computation. It will be convenient, however, to assume all advice queries are made at the very beginning. Thanks to nondeterminism, this assumption can be made without loss of generality, since such a machine can nondeterministically guess, at the beginning of a computation, which advice queries will be made during the remaining computation. After making these queries, the machine operates as a nondeterministic RAM machine without advice, which uses the prefetched advice queries instead of directly querying the advice memory. If the machine ever needs the th bit of advice, and it is not available in the registers corresponding to prefetched advice queries, then it simply rejects. Formally, we stipulate that an ANRAM machine operates as follows after receiving an input :
-
First, the machine nondeterministically guesses the indices of that will be queried during the computation on . The machine then fetches those bits of advice, storing the results as a list of ordered pairs .
-
Then, the machine passes together with the advice queries to a nondeterministic RAM machine without advice.
3.2 Proof of Theorem 2
To prove Theorem 2, we will use auxiliary variables that serve to nondeterministically guess the advice string, and then use Theorem 10 in a black-box fashion. The main technical difficulty, however, is that we cannot afford to guess the entire advice string, but only the bits that will be accessed during the computation, and thus we will need to encode into CNF a "check-advice" subroutine that ensures that the bits guessed, which can vary depending on the input, are compatible with the global advice string . It turns out that the subroutine we need for checking advice is a particular case of a more general problem: obtaining compact encodings for "multiple queries" to a boolean function. The following lemma, in the spirit of "mass production theorems" [Uli74, Kre23], shows that querying a boolean function times on arbitrary inputs can be encoded with substantially fewer clauses than independent encodings.
Lemma 11. Let , and let . Let be such that for every we have
Then, . Furthermore, such an encoding can be obtained deterministically in time polynomial in and .
Before proving Lemma 11, we show how it yields Theorem 2.
Proof of Theorem 2. Let be a boolean function, and suppose that is an ANRAM machine that evaluates in time with an advice string consisting of bits such that at most bits of are queried for each input. The cases or follow directly from Theorem 10, so assume . Pad to a power of two, increasing it by a factor of at most two. Also, if fewer than bits are read, it is always possible to read additional bits without changing the computation. Thus, we assume exactly bits of advice are read per input.
We construct our encoding of as follows. Introduce , where each is a sequence of auxiliary variables that represent addresses of . Furthermore, we have auxiliary variables , representing the values of the fetched bits of advice; intuitively, we want to enforce that . Let be the boolean function that takes the binary expansion of a number and a value , and returns whether . Then, by invoking Lemma 11 with , there is an encoding
with clauses such that is satisfiable for an assignment to its input variables if and only if
According to our definition of an ANRAM machine, invokes a nondeterministic RAM machine (without advice) on an input of length . Let be the boolean function computed by . By Theorem 10, there is an encoding of with the input variables and using clauses. Then, our encoding for is simply , which has clauses. The correctness follows from the correctness of its components. Indeed, if , then there is some assignment to representing the advice queries performed by and fed to , and then is satisfiable for this assignment since accepts on input . Conversely, if is a satisfying assignment to , then by Theorem 10, accepts on . By Lemma 11, , so accepts on . Therefore, accepts on and we conclude .
Finally, note that the deterministic polynomial-time construction follows directly from the deterministic polynomial-time constructions of Lemma 11 and Theorem 10. □
3.3 Encoding sparse functions
To check the advice queries, we need compact encodings of functions with few satisfying inputs. Our construction uses a compact encoding for the function AtMostOne(), which evaluates to 1 if and only if at most one of the variables is 1. The following is the best known upper bound on enc(AtMostOne()):
Proposition 12 ([KPS26]). We have .
The following lemma bounds the encoding complexity of sparsely supported functions.
Lemma 13. Let , and let . Then,
Given the list of elements of , an encoding attaining this bound can be constructed deterministically in time polynomial in nM.
Proof. Arrange the elements of in an table , where is a power of two to be specified later and . Pad the table by repeating any element of . For and , write for the entry in row and column , and for its th coordinate. Introduce a vector of auxiliary variables to select a column, and auxiliary variables to select a row. Enforce exactly one true row variable using an encoding of AtMostOne and the clause . This requires clauses by Proposition 12. We note that the encoding from Proposition 12 can be constructed in deterministic polynomial time.
For each column , let be the clause asserting that is not the binary representation of . For every and every coordinate , add the two clauses
Fix a satisfying assignment, write for its values on the input variables, let be the number represented by , and let be the unique index with . Then is false, so for every , the two clauses for and force ; that is, . Conversely, suppose . Since every element of appears in the table, we have for some and . Set to the binary representation of , set and every other row variable to 0, and extend this assignment to the auxiliary variables of the encoding of AtMostOne . If , the first clause for and contains , which is true, and the second contains , which is true since ; the case is symmetric. The clauses for every other column are satisfied by . Thus, the encoding is satisfiable when . This completes the proof that the encoding is correct.
The number of clauses is . If , choose a power of two ; if , choose . In both cases the bound is . All table entries and clauses can be written in time polynomial in .
In Theorem 6, proven in Section 5, we sharpen this result to clauses for , and prove that this is optimal in the worst case up to constant factors.
3.4 Proof of Lemma 11
For the proof of Lemma 11, we need to encode a kind of hash table, so in order to keep the encoding constructible in deterministic polynomial time, we will make use of explicit expanders. Intuitively, we represent a hash table by a bipartite incidence graph: left vertices are universe elements and right vertices are slots, and a form of Hall's condition [Hal35] satisfied by the considered expander will guarantee that any sufficiently small set of universe elements can be matched into distinct slots. Concretely, we will use the following lemma.
Lemma 14 (Teutsch’s expander lemma [Teu14, Section 4]). For every integer and finite universe L with , there is a bipartite graph with , left degree bounded by a fixed polynomial in , and for every of size at most . For each left vertex, its th neighbor can be computed deterministically in time polynomial in and , where is the maximum left degree.
Proof of Lemma 11. Let and . Apply Lemma 14 to with this , and pad the right vertex set with isolated vertices until it is . Write the resulting graph as . For , define by
Since , Lemma 13 gives a formula encoding with clauses. If , take to consist of the empty clause.
Introduce vectors of auxiliary variables each of length , and individual auxiliary variables , representing the contents of the slots and whether they are occupied or not, respectively. Let be the boolean function defined by
The fact that follows directly from Robson's result since an NRAM can evaluate in time : for each guess an index , and check that both and . Thus, by Theorem 10, has an encoding with clauses.
Our encoding of is now given by
and we assume that the sets of auxiliary variables internal to and each of the are pairwise disjoint.
To prove correctness, suppose first that an assignment satisfies for every . Then, by Hall's theorem [Hal35], the set , which has size at most , admits a matching in saturating (i.e., an injective mapping with for every ). Extend by an assignment such that if and only if is in the image of , and for every such that . Then evaluates to 1 under , and every occupied slot (i.e., ) satisfies . Thus, the auxiliary variables of and the can be chosen to satisfy . Conversely, any satisfying assignment to gives, for each , a slot with and . The clauses for force to satisfy , which in turn implies , and hence .
Let us now bound the number of clauses. First,
Then, by the Cauchy–Schwarz inequality, and letting ,
Therefore, the total number of clauses is
since , , and .
Finally, we can explicitly construct in time polynomial in by Lemma 14, and then enumerate the satisfying assignments of every within the same time bound. Thus, each can be computed in deterministic time poly by Lemma 13, and can be computed deterministically in time poly by Theorem 10. Thus, can be computed deterministically in time poly.
4 Encoding k-CNF Functions
In this section, we prove Theorems 4 and 5. Both theorems reduce to compactly encoding , where is a bipartite graph. We prove Theorem 4 by showing that there is a deterministic data structure for computing that uses bits of memory whose query time is . This is a derandomization of a data structure of Larsen and Williams [LW17], which we give in Section 4.1. Together with Theorem 2, this proves Theorem 4. For Theorem 5, we encode sparse graphs using biclique partitions in Section 4.3, and bipartite graphs with small bipartite independence number using hash tables in Section 4.4. In Section 4.5, we decompose an arbitrary bipartite graph into pieces to which one of these two encodings applies. We conclude with counting lower bounds in Section 4.6.
4.1 Derandomizing the Larsen–Williams data structure
We adapt the strategy of Larsen and Williams [LW17], replacing its randomized orthogonal-vector subroutine from Abboud, Williams, and Yu [AWY15] by the deterministic algorithm of Chan and Williams [CW20]. Following Larsen and Williams, we formulate our goal as preprocessing a boolean matrix to compute queries of the form over the boolean semiring, since this is equivalent to querying for a bipartite graph .
Theorem 15. For every boolean matrix , there is a data structure using bits of memory for which, given , one can deterministically compute over the boolean semiring in time .
For , we use notation . If and are the supports of and , then if and only if .
4.1.1 Preprocessing
Call a rectangle empty if . Given a list of rectangles, let
Lemma 16. For every , there is a list of at most empty rectangles such that every empty rectangle satisfies
Proof. Start with . While some empty rectangle has at least entries in , add it to . Each addition removes at least entries from , so there are at most additions.
Choose constants with as in Lemma 17 below, and set . Construct as above, and enumerate it as . Store as a bit matrix, and for every row and column , store vectors such that for every ,
Note that these vectors satisfy
Furthermore, the total space used is bits.
4.1.2 Answering queries
For a query , let . Since the rectangles of are empty, every 1-entry of lies in . Thus, , so our goal is to compute whether contains a 1. We proceed as follows.
-
Compute as described below. If , return 1.
-
Otherwise, determine as described below whether for some , and return the result.
If is empty, then by Lemma 16, so a return in step 1 is correct. Step 2 is correct because . Moreover, whenever step 2 is executed, we have . It remains to show that both steps of the algorithm can be computed in time .
4.1.3 Counting the uncovered entries
By (1), consists of the pairs with . Thus, both steps of the query algorithm amount to an orthogonal-vectors problem on the vectors for and for , which we solve with the deterministic algorithm of Chan and Williams [CW20]; Larsen and Williams [LW17] used essentially the same subroutine, with the randomized algorithm of Abboud, Williams, and Yu [AWY15] instead. Rather than only the total number of orthogonal pairs, we need the number of orthogonal pairs between every pair of blocks of partitions of and .
Lemma 17. There are constants with for which the following holds. Let . Let and be boolean vectors of dimension at most , and let and be subsets of , each of size at most , with . Then all counts
can be computed deterministically in time .
Proof. This is a minor modification of the algorithm of Chan and Williams [CW20, Theorem 1.3] for counting orthogonal pairs. Given vectors of dimension , where for a sufficiently small constant , they deterministically count the orthogonal pairs of distinct vectors. To do so, they partition the vectors into blocks of at most vectors each, for a sufficiently large constant , and construct a polynomial whose value on the vectors of two blocks determines the number of orthogonal pairs between them. They evaluate this polynomial on all pairs of blocks at once with a single rectangular matrix multiplication, and add up the resulting counts. We change this in two ways. First, the vectors come from two collections: one factor of the matrix multiplication is built from the blocks of the vectors , and the other from the blocks of the vectors . Second, we output the count for every pair of blocks instead of their sum. For sufficiently small and , our vectors have dimension in their range and our blocks have at most elements, so the same analysis computes all counts in time .
Lemma 18. Both steps of the query algorithm can be carried out deterministically in time .
Proof. Partition into sets and into sets , each of size at most . Apply Lemma 17 with and ; this is possible because these vectors have dimension . By (1), its count is exactly , so . This gives step 1 in time .
For step 2, check all entries of every block pair with positive count, and return 1 precisely when some entry satisfies . The block products are pairwise disjoint, so at most of them have positive count. Since step 2 is executed only if , the number of entries checked is at most
Proof of Theorem 15. The preprocessing uses bits and is deterministic. The query algorithm is correct by Section 4.1.2, and it runs in time by Lemma 18.
4.2 Encoding arbitrary k-CNF functions
We first reduce 2-CNF functions to independent-set constraints of bipartite graphs.
Lemma 19. Let be a 2-CNF formula on variables. One can construct in polynomial time a bipartite graph with vertices on each side with the following property: given an encoding of with clauses, one can construct in polynomial time an encoding of the function defined by with at most clauses.
Proof. If contains the empty clause, then it defines the constant-0 function, and the empty clause is an encoding of it; in this case, can be arbitrary. Otherwise, let be the 2-CNF formula obtained from by replacing every positive literal by , where is a fresh variable. Then, is an antitone 2-CNF formula on the variables , meaning that all of its literals are negative. Thus, each clause of is either a unit clause or a clause with . Let be the set of unit clauses of , so , and let be the graph on these variables with an edge for each clause of . Then, is equivalent to .
Since need not be bipartite, let be the bipartite graph with a left vertex and a right vertex for each vertex of , and with the edges and for each edge of . A set of vertices is independent in if and only if is independent in . Thus, given an encoding of with clauses, substituting the variable for both input variables and gives an encoding of with clauses. Finally,
with regarded as auxiliary variables, is an encoding of with at most clauses. Indeed, the last two conjunctions force for every , and under this substitution, is equivalent to . All of these steps take polynomial time.
Next, we lift encodings of -CNF functions to -CNF functions. This costs a factor of in the number of clauses, and hence preserves any improvement factor over .
Lemma 20. Let . Suppose that every -CNF function on variables has an encoding with at most clauses for some . Then, every -CNF function on variables has an encoding with at most clauses. Moreover, this lifting is constructive: if encodings of -CNF functions with at most clauses can be computed from -CNF formulas in polynomial time, then encodings of -CNF functions with at most clauses can be computed from -CNF formulas in polynomial time.
Proof. Let be a -CNF formula on the variables . If contains the empty clause, then it defines the constant-0 function, and the empty clause is an encoding of it. This encoding has at most clauses, since .
Otherwise, given a literal , let , which is a -CNF formula on . Every clause of is nonempty, so it has the form for some literal , and then . Conversely, is a clause of for every . Thus,
where denotes the CNF formula . By hypothesis, the function defined by each has an encoding with at most clauses, and we choose these encodings with pairwise disjoint auxiliary variables. Let
Then, has at most clauses. It is not hard to see that is an encoding of the function defined by . Furthermore, if the encodings can be computed in polynomial time, then so can .
We can now prove Theorem 4.
Theorem 4. If is a -CNF function for some , then .
Proof. First, let be a bipartite graph with vertices on each side, and let be its biadjacency matrix. Writing for the sets of vertices on the two sides, we have
Theorem 15 therefore evaluates from advice bits in time
At most distinct advice bits are read. Applying Theorem 2 with gives
Now let be a 2-CNF function on variables. Lemma 19 reduces to for a bipartite graph with vertices on each side, at the cost of at most additional clauses, which gives the claimed bound for . The bound for each fixed now follows from Lemma 20.
4.3 Encoding sparse graphs
We first state Feder and Motwani’s result about biclique partitions [FM95], which is essentially a restatement of a result of Nechiporuk [Nec69]. Given a graph , a biclique partition is a set , where each is a complete bipartite subgraph of , and . The weight of such a partition is . The edge density of a graph with vertices and edges is .
Lemma 21 (Feder and Motwani [FM95]). Let be a graph with vertices and edge density . Then, has a biclique partition of weight . Moreover, such a biclique partition can be constructed deterministically in time polynomial in .
Using this result, we can efficiently encode the independent set constraint for sparse graphs.
Lemma 22. Let be a graph with vertices and edge density at most , where . Then, . Moreover, such an encoding can be constructed deterministically in time polynomial in .
Proof. Let be the edge density of . If , then the empty formula is an encoding. Otherwise, by Lemma 21, has a biclique partition of weight , which can be constructed in polynomial time. Since the function is increasing on and , this weight is . We construct an encoding as follows. For each biclique , introduce an auxiliary variable . Then, for each such biclique, include the following clauses in the encoding:
The total number of clauses in the encoding is
Now, we prove that the encoding is correct. Let be an independent set. For each , set to true if and only if . Then, every clause of the form is satisfied. Also, if is true, then , since is independent and every vertex of is adjacent to every vertex of . Thus, every clause of the form is satisfied. Therefore, the encoding is satisfiable.
On the other hand, suppose that is not independent. Let be such that . Then, is covered by some biclique . Thus, our encoding either contains the pair of clauses and or the pair of clauses and . In either case, the clauses imply the falsified clause . Therefore, the encoding is unsatisfiable.
4.4 Encoding bipartite graphs with small
Given a bipartite graph , its bipartite independence number, denoted , is the largest such that has an independent set with .
4.4.1 Hash table lemma
Our encoding of the independent set constraint for graphs with small , Lemma 24, requires a hash table construction. As in Section 3, we formalize the hash table as a bipartite graph, whose left side represents the universe of elements that can be hashed and whose right side represents the slots of the table, and we use Teutsch's explicit expander (Lemma 14). For our application, we need a uniform bound on the degree of vertices on the right side. We achieve this from Lemma 14 by splitting vertices on the right side whose degree is too high.
Lemma 23. There is a function with such that the following holds. Let be a set of size , and let be an integer with . Then, there is a bipartite graph such that (i) , (ii) for every with , there is a matching that saturates , and (iii) every vertex of has degree at most , and every vertex of has degree at most . Moreover, this graph can be constructed deterministically in time polynomial in .
Proof. Let , so that . If , then we give each element of its own slot: let be a copy of and match each element to its copy. Then, , and all degrees are 1, so the lemma holds.
Otherwise, . By Lemma 14, there is a bipartite graph with such that every with satisfies , and every vertex of has degree bounded by a fixed polynomial in . Let be the maximum of 1 and this bound. By Hall's theorem [Hal35], every with has a matching that saturates . Furthermore, .
Let . We construct from by doing the following operation on each : split into vertices such that for each and the sets partition . We have
Every vertex of retains its degree, and every vertex of has degree at most by construction. Furthermore, a matching that saturates in lifts to a matching that saturates in , by replacing the right endpoint of each matching edge with the copy containing that edge; distinct right endpoints have distinct copies. Finally, by Lemma 14, all edges can be computed in time polynomial in , and the splitting takes polynomial time.
4.4.2 The small encoding
The explicit hash table of Lemma 23 has polylogarithmic left degree, so we state the encoding only in the range , which suffices for our application.
Lemma 24. Let be a bipartite graph with vertices, and let be an integer with and . Then, . Moreover, given and , such an encoding can be constructed deterministically in time polynomial in .
Proof. For smaller than a sufficiently large absolute constant, we use one clause per edge, so assume that is sufficiently large. By Lemma 23 with and , there is a bipartite graph such that (i) , (ii) for every with , there is a matching that saturates , and (iii) every has degree at most , and every has degree at most . Extend by adding a vertex 0 to (we assume that ) such that . Let , so that for every . Let . Since and is sufficiently large, we have . Partition into parts , where , each of size at most . For each , let . Given and , we write to denote the element of occupying the -component of , and we write if for every .
We introduce the following auxiliary variables: for all and , and for all and . Then, our encoding is as follows:
First, we justify the correctness of the encoding. Given an assignment to the input variables, let be the set of vertices of corresponding to true input variables, so is the set of true input variables. Suppose first that is an independent set in . We either have or , since otherwise contains an independent set with vertices on each side. If the former case holds, then set to true; otherwise, set to false. From now on, we assume that , since the other case is symmetric. There is a matching in that saturates . Given , let be the vertex paired with according to the matching. For each and , set to true if and only if and . For each , set to true if and only if there is no with . Then, for each , there is exactly one such that is true; call it . For each , let be the tuple with for each , and set to true if and only if . We claim that with this assignment to the auxiliary variables, each clause is satisfied:
• If is true and , then is true. Since we are assuming that is true, the clauses on line (1) are satisfied.
-
The clauses on line (2) are satisfied, because for each , we set to true for exactly one .
-
The clauses on line (3) are satisfied, because if is true for some , then , and is true.
- Suppose is true, and let . Then, is true, and for all . Since is an independent set and , we have . Thus, the clauses on line (4) are satisfied.
Suppose next that is not an independent set in . Then, there is some and such that . Then, by the clauses in line (1), we have true for some and . Without loss of generality, is true. Let be such that . Then, by the clauses in line (3), is true for some with . Also, by the clauses in line (4), is true for some with . Since , we have , contradicting the clauses in line (2). This completes the proof that the encoding is correct.
Now, we count the number of clauses in the encoding. Since , we have , and . Recall also that . We count the number of clauses as follows:
-
There are clauses on line (1).
-
For each , we have
so by Proposition 12, the number of clauses on line (2) is
since .
-
There is one clause on line (3) for each edge of , so there are at most clauses on line (3), since and .
-
The number of clauses on line (4) is
Thus, the total number of clauses is , as desired. Finally, can be constructed in polynomial time by Lemma 23, and since for each , all clauses can be written in polynomial time.
4.5 Encoding arbitrary bipartite graphs
At this point of the argument, we decompose an arbitrary bipartite graph into components to which Lemmas 22 and 24 apply, by recursively splitting its biadjacency matrix into squares. Given a bipartite graph , we identify each edge with and with the pair . Given and , we call a rectangle with sides and , and a square if ; we write and . The density of is
and is empty if . Thus, is the largest such that contains an empty square.
Deciding whether a bipartite graph has a large empty square is NP-complete [GJ79]. Instead, we use the following search, which finds a sparse square whenever a large empty square exists. We state it for binary matrices, which should be interpreted as biadjacency matrices, whose rows and columns are indexed by the two sides of a bipartite graph, so that a rectangle of the matrix is a rectangle , and its density is .
Lemma 25 (Deterministic sparse-square search). Given an binary matrix, rational numbers and , and an integer such that , with the property that the matrix contains an empty square with , there is a deterministic algorithm that finds a square of density at most in time
Our proof uses the following bounds of Alon, Feige, Wigderson, and Zuckerman on the probability that a random walk stays inside a set; we state the special case in which all eigenvalues are nonnegative.
Lemma 26 (Alon–Feige–Wigderson–Zuckerman [AFWZ95, Proposition 2]). Let be the transition matrix of the random walk on a regular multigraph on vertices, and suppose that is positive semidefinite and every eigenvector of orthogonal to the all-ones vector has eigenvalue at most . Let be a set of vertices, and let be a random walk with transition matrix and a uniformly random starting vertex. Then,
and if is even, then also .
Proof of Lemma 25. We prove the claim assuming is a perfect square, since otherwise the same argument can be made by padding the matrix with 1s until its dimension is the next perfect square.⁸ The proof proceeds conceptually by considering a random walk over possible squares, and showing that it succeeds in finding a sparse square, without taking too many steps, with positive probability. The deterministic algorithm is based on enumerating all short random walks of a suitable explicit expander.
We label the rows of the input matrix by , and use them as the vertex set of an 8-regular expander multigraph on vertices, constructed as per Margulis–Gabber–Galil [HLW06, Construction 8.1], meaning that each vertex has an edge to the following vertices:
where all arithmetic is modulo . Let be the adjacency matrix of this graph, and its transition matrix. By [HLW06, Theorem 8.2], the constant vector is an eigenvector of with eigenvalue 1, and every eigenvector in the set has an eigenvalue with absolute value at most .
We then consider the lazy random walk of transition matrix
With , replacing by > preserves the hypotheses and changes the running time only by constant factors.
meaning that it stays at its current row with probability 1/2 and otherwise takes a step according to . Note that is symmetric, and since each eigenvalue of corresponds to an eigenvalue of , we have that is positive semidefinite, and its eigenvalues on are at most
Note that taking a step according to can be seen as choosing uniformly from 16 possibilities (8 directions and 8 choices representing staying at the given row).
Instead of considering directly, we use a power of in order to further reduce the magnitude of the eigenvalues. Let , and . We consider , which corresponds to taking steps according to . Therefore, each step according to can be seen as choosing uniformly from possibilities. The eigenvalues of on lie in , where
Let be the length of the walks we consider. The algorithm enumerates all walks with transition matrix , over all starting rows and all step choices. The number of such walks is at most
For each walk , we attempt to get a sparse square in the original matrix as follows:
-
Let be the columns of whose entries are zero in every row visited by .
-
Let be the set of rows such that has at most ones on row in the columns .
-
If or , continue to the next walk.
-
Otherwise, choose any rows and the columns with the fewest ones in those rows, and return .
Writing for the number of ones in , the choice of gives
Thus every returned square has the required density. If no walk succeeds, the algorithm reports failure. Note immediately that each of the four steps above takes time polynomial in , and thus the final runtime is upper bounded by the number of walks times a polynomial in , satisfying the desired bound.
We now prove that some walk succeeds whenever the promised empty square exists. Put , and consider a random walk with transition matrix and a uniformly chosen starting row. Let be the event that all visited rows lie in . Since is even, Lemma 26 applied to gives
Call a column bad if it has at least ones in the rows of . For a bad column , let be the rows where its entry is zero. Then . Conditional on , the column belongs to precisely when the walk stays entirely in . By Lemma 26 applied to , we have
Dividing by the lower bound on and using , we obtain
There are at most bad columns, so, conditional on , the expected number of bad columns in is at most . Hence some walk entirely inside leaves at most that many bad columns in .
For this walk, because is empty, so . Each column that is not bad contributes fewer than ones in the rows of , and each bad column contributes at most . Therefore,
The average number of ones in over the rows of is thus at most . At least half those rows have at most ones, so . We also have , and the algorithm succeeds.
We now state the graph decomposition. It can be seen as a kind of regularity lemma [Sze78]: every square of the decomposition is pseudorandom in the sense that it contains no large empty square, and all remaining edges form a sparse graph.
Lemma 27 (Sparse-pseudorandom decomposition). Let be a bipartite graph with . Then, there is an integer such that can be partitioned into squares and a set such that:
(i) every square has side length ;
(ii) for every , we have ;
(iii) .
Moreover, q and such a partition can be computed deterministically in time polynomial in N.
Proof. If is smaller than a sufficiently large absolute constant, we take , and . Otherwise, put
so that , and assume that is large enough that , , and . We describe a recursive procedure SPLIT, which takes a square with , , and , and partitions it into squares of the form required by (i) and (ii) and cells that are added to :
(a) If , add to S. We call a small square.
(b) Otherwise, let , and write with . Since , we have . Apply Lemma 25 to the biadjacency matrix of with , , and target side length ; its hypotheses hold since , , and .
(b1) If the search reports failure, then contains no empty square of side length at least , so . Output as one of the squares .
(b2) Otherwise, the search returns and with and . Add to ; we call it a sparse square. Since , we can partition into sets of size and a set of size , and similarly partition into sets of size and a set of size . Add and to ; we call them slivers. Finally, call , and call and for every . We call the large child of this call, and the large-child branch of a call is the sequence of calls obtained by repeatedly passing to the large child.
In case (b2), the sparse square, the two slivers, and the squares of the recursive calls partition . Thus, produces a partition of into squares and a set , which consists of sparse squares, slivers, and small squares. Properties (i) and (ii) hold by construction, since squares are only output in case (b1). It remains to prove (iii) and to bound the running time.
We first bound the running time. Every recursive call is on a square of side length or , both of which are positive and smaller than , so the recursion terminates. The calls that do not recurse are on pairwise disjoint nonempty squares, so there are at most of them, and every call that recurses makes at least two recursive calls, so there are at most calls in total. In each call, and , so by Lemma 25 the search takes time
since and therefore . Thus, the decomposition can be computed in time polynomial in .
Now, we prove (iii) by bounding the number of edges in the sparse squares, slivers, and small squares:
-
Every sparse square has . Since the sparse squares are pairwise disjoint, they contain at most edges in total.
-
Consider a call in case (b2) on a square of side length . Its two slivers have cells, and its sparse square has cells. Hence, the slivers have at most
cells. Since the sparse squares are pairwise disjoint, summing over all calls in case (b2) shows that the slivers have at most cells in total, since .
- To bound the small squares, group consecutive calls along the large-child branch. A group starts with side length and follows this branch until its side length is at most or a search reports failure. Its children are the calls on squares of side length produced along the branch and the final large-child call, if one exists. Stop grouping at squares of side length below . Every original small square lies within one of these squares.
For every call in a group, its side length satisfies and , so . If the group reaches side length at most , its sparse squares satisfy
, hence . Otherwise, the search failure outputs a square of area at least . Thus, the children have total area at most , where . Every child has side length at least ; the final large child has side length at least .
Put . At depth of the grouped recursion, every square has side length at least , so no square of side length below occurs at depth at most . All small squares therefore lie within the squares at depth , whose total area is at most . Since , we have
Therefore, the small squares have at most cells in total.
Therefore, .
We can now prove our upper bound on encoding the independent set constraint for arbitrary bipartite graphs.
Lemma 28. Let be a bipartite graph with . Then, . Moreover, such an encoding can be constructed deterministically in time polynomial in .
Proof. For smaller than a sufficiently large absolute constant, we use one clause per edge, so assume that is sufficiently large.
Apply Lemma 27 to get a partition of into squares and a set S of the stated form. We decompose G into subgraphs whose edge sets partition E:
• For each , let be the subgraph consisting of the edges in the square .
- Let be the subgraph consisting of the edges in , that is, the edges in sparse squares, slivers, and small squares.
A set of vertices is independent in if and only if it is independent in and its intersection with is independent in for every . Thus, the conjunction of encodings of and , with pairwise disjoint auxiliary variables, is an encoding of . We now show that these encodings use clauses in total.
For each , the graph is bipartite with vertices, where . Let and , so by Lemma 27. We check the remaining hypotheses of Lemma 24 with and . Since is sufficiently large and , we have and . Thus, , and since , this gives . Furthermore, . Thus, by Lemma 24, can be encoded using
clauses, since and . Since the squares are pairwise disjoint, , so the total number of clauses over all is , since .
By Lemma 27, the graph has 2N vertices and at most edges for some absolute constant , so its edge density is at most
Since is sufficiently large, we may assume that . Therefore, by Lemma 22, we can encode using
clauses, again since .
Finally, the decomposition can be computed in polynomial time by Lemma 27, there are at most squares, and each encoding can be constructed in polynomial time by Lemmas 22 and 24.
Theorem 5. If is a -CNF function for some fixed , then one can construct in deterministic polynomial time a CNF encoding of with clauses.
Proof. For , apply Lemma 19 and encode by Lemma 28 with . For , applying Lemma 20 times gives clauses. Since each application is constructive, for fixed the encoding can be computed in polynomial time.
4.6 Counting lower bounds
A -CNF function has a width- encoding with clauses [CLT15, KPSS26]. The following counting argument shows that unbounded clause width is necessary to improve this bound, as in Theorems 4 and 5.
Proposition 29. For every fixed and , there are -CNF functions on inputs whose width- encodings require clauses.
Proof. For each collection , consider the antitone -CNF
On an assignment selecting exactly the elements of , this function is false exactly when . Hence, these collections give distinct functions.
Let be the minimum integer such that these functions all have width- encodings with at most clauses. Since , their original CNFs give . An encoding with at most clauses of width at most uses at most occurring auxiliary variables. The number of possible clauses over variables is , so comparing the number of functions with the number of encodings gives
Thus .
To run the same counting argument without a width bound, we need another way to bound the number of auxiliary variables. The following proposition shows that a minimal encoding has fewer auxiliary variables than clauses.
Proposition 30. Every boolean function with has an encoding such that and .
Its proof relies on a graph-theoretic fact, similar in spirit to the matching argument of Aharoni and Linial for minimal unsatisfiable formulas [AL86].
Lemma 31. Let be a bipartite graph with and such that all vertices in have degree at least 1. Then, there is a nonempty subset for which contains a perfect matching between and .
Proof. The proof is by induction on . If the only option is and for and , so the statement holds trivially. Now, for the inductive case, let us say a matching is -saturating if every vertex belongs to some edge in . Note that a -saturating matching is a perfect matching between and . Thus, if a -saturating matching exists we take and complete the proof. On the other hand, if no such -saturating matching exists, then by Hall's condition [Hal35], there exists a nonempty subset such that . We have , because otherwise , contradicting our assumption that has no isolated vertices. Let for an arbitrary . Then, is nonempty and . Therefore, the induced bipartite graph satisfies the inductive hypothesis, so there is a nonempty subset for which contains a perfect matching between and . Since , the set satisfies the conclusion of the lemma.
Now, to prove Proposition 30, we need an elementary definition and a lemma.
Definition 32 (Autarky [MS85]). Given a CNF formula over a set of variables , an autarky is a partial assignment such that for any clause containing a variable in the domain of , we have .
Lemma 33 ([MS85], cf. [KHB19, Thm. 4]). Let be a CNF formula and an autarky for . Then, .
We are now ready to prove Proposition 30.
Proof of Proposition 30. Let be an encoding for with . Let be the subset of auxiliary variables that appear in (with any polarity). Naturally, is also an encoding for . Assume, expecting a contradiction, that . Then, construct a bipartite graph where there is an edge between an auxiliary variable and a clause if and only if or . Now, observe that satisfies the conditions of Lemma 31, so there exists a nonempty set and a set such that there is a perfect matching between and . Let be the assignment defined by
For a formula and an assignment , notation denotes the formula obtained by eliminating from all clauses already satisfied by , and removing from each remaining clause the literals falsified by .
and observe that is an autarky for . Let be an arbitrary assignment to the input variables. Note that and have disjoint domains, so is still an autarky for , and by Lemma 33, we have . Since , it follows that is an encoding of , and since , we conclude that , a contradiction.
We now state the following counting lemma, which we use to prove all of our lower bounds for enc.
Lemma 34. For all integers and , at most functions satisfy .
Proof. The constant-1 function is the only with . If , then by Proposition 30, has an encoding with clauses and fewer than auxiliary variables. This encoding has no tautological clauses, since deleting one would give a smaller encoding. Rename its auxiliary variables from a fixed set of names, and pad it to exactly clauses by repeating a clause. The result is a sequence of non-tautological clauses over fixed variables, and it determines . Each such clause is determined by deciding, for each variable, whether it appears positively, appears negatively, or is absent, so there are at most of them. Hence at most functions satisfy .
Without a width bound, the counting argument, now based on Lemma 34, gives a much weaker lower bound.
Proposition 35. For every fixed , there are -CNF functions on inputs with .
Proof. For , let , where the are the functions from the proof of Proposition 29. By Lemma 34, , hence
Together with Corollary 9, Proposition 35 shows that almost all -CNF functions satisfy . Thus, any better worst-case lower bound must come from functions that are far from random. Even for independent-set constraints (), a large gap remains: Proposition 35 gives only , while the best upper bound we prove is (Theorem 4). Closing this gap is a fascinating open problem. We expect the upper bound to be closer to the truth, but we currently lack a technique for proving superlinear lower bounds for .
5 Arbitrary and Sparsely Supported Functions
In this section, we prove Theorem 6, which we restate for convenience.
Theorem 6. For all , we have
We give some extra consideration to the case of densely supported functions, establishing the following explicit constant bounds:
As usual, it is easy to see that the counting lower bounds above apply not only to some function in the class, but to a fraction of them.
Proposition 36. Let be the maximum of over all functions , and let . Then, we have .
Establishing an exact constant for the upper and lower bounds in this model remains an open question. We expect that the upper bound is tight.
Bounds of the same order, often with exact constants, are classical in related models of computation such as depth-3 circuits, circuits with free gates, and nondeterministic branching programs (see Section 1.4); in particular, Nechiporuk's construction for nondeterministic branching programs [Nec62] translates directly into an encoding with clauses, which the upper bound of Proposition 36 improves.
5.1 Upper bound for sparse functions
We now bootstrap Lemma 13 to prove the upper bound in Theorem 6. Our construction is based on a succinct static dictionary, which stores a function with using close to the information-theoretic minimum of bits and evaluates in time on a word RAM. Such dictionaries go back to Brodnik and Munro [BM99]; Pagh [Pag01] and Pătrăescu [Păt08] subsequently reduced the number of extra bits. The following is the best known such dictionary, which we restate in a slightly weakened form convenient for our purposes.
Theorem 37 (Hu, Liang, Yu, Zhang, and Zhou [HLY+25]). Let with , where . There is a string of
bits such that a word RAM with word size whose memory holds computes from in worst-case time.
Our encoding will be based on unrolling the lookup operations; since the lookup time is , the size of our encoding will be dominated by the cost of encoding the query algorithm's memory accesses (assuming is large). The key step is the following lemma, which may be of independent interest. If we identify a function with the binary string encoding its truth table, then the lemma shows that an entire contiguous block of bits can be fetched at essentially the same cost as fetching a single bit, even when the block is as long as the square root of the memory size. Here, we only need blocks consisting of a single word of the RAM, i.e., bits.
Lemma 38. Let , and let with . For , the th block of is the string , where each argument of is identified with its -bit binary representation. Define by letting if and only if is the th block of . Then,
Hu, Liang, Yu, Zhang, and Zhou [HLY+25, Theorem 1.1] state their result as a static dictionary: in the word RAM model with word size , a set of keys from a universe of size can be stored using bits, given access to a fixed lookup table and to a hash function that can be described with bits each, so that membership queries are answered in worst-case constant time. Their construction is randomized and succeeds with high probability, so in particular such a representation exists. We include the lookup table and the description of the hash function in , and apply this to the set in the universe , whose size satisfies .
Proof. First suppose that . Then has inputs. For each block index , exactly one satisfies , so . By Lemma 13,
If , let be the power of two with . Then .
We are now ready to prove the upper bound in Theorem 6.
Lemma 39. For all integers and , we have .
Proof. Let with , where . If , then , so Lemma 13 already gives clauses. Hence, we may assume . Since and , the string from Theorem 37 has bits, and note that . Let the word size be a power of two , and let be the function whose truth table is padded with zeros to a length that is at least . Then the words of memory are exactly the blocks of .
The query algorithm runs a fixed program for steps, so we can unroll it into a straight-line program with memory reads and word operations: at each step, perform every instruction of the program and keep the result of the one selected by the program counter. Truncating each read address to its low-order bits keeps every read in range without affecting the actual computation. We introduce auxiliary variables for the register contents after each step, and take the conjunction of the encodings of the individual steps:
-
each memory read is checked by the encoding of for from Lemma 38, with clauses;
-
each word operation, including multiplication and division, is computed by a circuit with gates, whose Tseitin encoding has clauses.
Finally, a unit clause requires the output to be 1. Each step's encoding admits only the correct output for given inputs, so the resulting formula encodes with
clauses. Since , we have , which asymptotically absorbs the term.
5.2 Lower bounds
We now prove the lower bounds in Theorem 6 and Proposition 36. Both are proved via an information-theoretic argument, using the counting bound of Lemma 34.
Lemma 40. For all integers and , we have
Proof. Choose a support of size containing but none of the unit vectors. This is possible because for every . Fix an accepting auxiliary assignment of any encoding at . Flipping the th input to obtain a unit vector must falsify some clause under the same auxiliary assignment. Such a clause had as its only true literal at the original full assignment. One clause cannot have this property for two distinct input bits, so at least clauses are necessary. Consequently .
Set . By Lemma 34 and ,
Here we used for positive integers . Taking logarithms gives .
Lemma 41. With , we have .
Proof. Let . Every boolean function on inputs has an encoding with at most clauses, so Lemma 34 gives . Solving for , we obtain
5.3 Upper bound for arbitrary functions
We now give a constructive upper bound on , which is relatively similar to the construction of Dančik for depth-3 circuits [Dan96].
Lemma 42. Every satisfies . In particular, .
Proof. Let be arbitrary, and let be input variables. First, introduce auxiliary variables and . Given an assignment
we can naturally define , , and to be the integers whose binary representations are given by the -, -, and -variables respectively. Let . Then, we want to encode that any satisfying assignment will satisfy
which can be done by applying the Tseitin transformation to circuits for addition and multiplication, which results in clauses.
Let . Every satisfies . Moreover, , so every element of is less than ; hence distinct elements of have distinct -bit binary representations. Next, for each , introduce an auxiliary variable . Let be the th bit of 's binary representation. Then, add the following clauses:
Intuitively, (2) states that each variable implies a disjunction of the -variables compatible with it, and then (3) enforces that only one -variable is assigned to 1.
Now, for each , let and , where by we mean the value of applied to the -bit binary representation of . Intuitively, is the set of values of that are “compatible” with . Moreover, for each , let
where is the th bit of 's binary representation. The encoding is then completed by adding clauses
First, let us analyze the number of clauses. The constraints enforcing that
for all use only clauses. Constraint (2) uses at most clauses, and by Proposition 12, the constraint in (3) can be encoded with clauses, since and give . Finally, (4) includes clauses. Thus, the total number of clauses is .
Now, to prove correctness, let be an arbitrary assignment, and let be the integer whose binary representation is given by the -variables. Let and be the unique nonnegative integers such that
First, assume that . Let , and consider the assignment defined by
Now, by correctness of the encoding for AtMostOne, the assignment can be extended into an assignment that assigns the auxiliary variables internal to (3) satisfying said constraint. Then, extend into an assignment that assigns the - and -variables so that they are the binary representations of and respectively. Note that at this point the full assignment satisfies (2) and (3). Then, for each some literal in must be false, which satisfies (4), and since , (4) is also satisfied for .
Conversely, assume , and assume for a contradiction that some assignment
of the auxiliary variables is such that satisfies all clauses. Then, the assignment to the - and -variables must be such that they are the binary representations of and respectively. Also, by correctness of the encoding of AtMostOne we have that for at most one . Then, since satisfies (2) for (any works), then by the resolution rule we have that at least one variable must be true. Thus, exactly one variable in is assigned to 1 by , and we claim that it must be . Indeed, if it were for some , and is an index such that (which exists because ), then (2) would not be satisfied for said , giving us the desired contradiction. Now, if the only true variable in is , then constraint (4) is not satisfied for , since by assumption , which yields the desired contradiction.
6 A Characterization of Encoding Complexity
A De Morgan circuit is a circuit over the basis such that is only applied to input variables. We allow constants 0 and 1, and we allow both -gates and -gates to have unbounded fan-in. In other words, a De Morgan circuit on the input variables is a monotone circuit over the basis on the input literals . If a De Morgan circuit on the input variables computes a function such that
then we say that is a nondeterministic De Morgan circuit computing . Our metric for these circuits, which we will show coincides with CNF encoding complexity, is the number of wires entering its -gates:
Definition 43. Given a boolean function , let nondet-wires be the minimum, over all nondeterministic De Morgan circuits computing , of the total fan-in of their -gates.
We prove in Proposition 44 that this measure coincides exactly with encoding complexity, except for functions with , which are computed by a single -gate and hence need no -gates.
Proposition 44. For every boolean function ,
Proof. Write . First, we show that if , and if . Take an encoding of with clauses, and regard its auxiliary variables as nondeterministic inputs. If , regard each clause as an -gate and combine them with a single -gate of fan-in . If , the single clause, regarded as an -gate, is the whole circuit. If , then is constantly 1, and the constant 1 is the whole circuit.
It remains to show that every nondeterministic De Morgan circuit computing whose -gates have total fan-in satisfies . If is constantly 1, then , so assume otherwise. Remove all gates that do not reach the output; this does not increase . Write for the output gate of . For every gate or input of , define its disjunct set as follows: if is a literal, a constant, or an -gate, then ; if is an -gate, then is the union of the disjunct sets of its inputs. Thus, every -gate computes the disjunction of its disjunct set. For a disjunct set not containing 1, let be the clause obtained from by replacing every -gate by a variable , keeping every literal, and deleting 0 if it is present. Since is not constantly 1, the disjunct set does not contain 1.
If has no -gates, then consists of literals and possibly 0, and outputs 1 exactly when is true. Hence the single clause , with the nondeterministic inputs of as auxiliary variables, is an encoding of , and .
Otherwise, fix an -gate such that every path from to passes through no other -gates. Then, , and does not lie in any disjunct set of an input of an -gate. Let , and introduce a fresh auxiliary variable for every -gate . Our encoding consists of the clauses
and its auxiliary variables are the nondeterministic inputs of and the variables for every -gate . There is at most one clause per wire entering an -gate, so the encoding has at most clauses.
Now we show that the encoding is correct. First, suppose is such that , and fix nondeterministic inputs for which outputs 1, and set each to the value of . If an -gate evaluates to 1, then so does each of its inputs , so some element of is true, and this element makes true. This satisfies the clauses of every -gate , and also the clauses of if evaluates to 1. Otherwise, since evaluates to 1, some element of is true, which makes true. Thus, every clause is satisfied.
Conversely, suppose the encoding is satisfiable for an input , and fix a satisfying assignment to the auxiliary variables. We show that C evaluates to 1 on input when the nondeterministic inputs are set according to the satisfying assignment; this implies that .
We first prove the following claim: for every -gate , if , then evaluates to 1. We proceed by induction along a topological order of . Let be an -gate with , and assume the claim for all -gates that precede . Let be an input of ; we show that evaluates to 1. If , this holds because computes the disjunction of . Otherwise, the encoding contains the clause , and since , some literal of is true. Either this literal is an element of , or it is for an -gate . In the latter case, precedes and , so evaluates to 1 by the induction hypothesis. Thus, some element of evaluates to 1, and therefore so does . Since every input of evaluates to 1, so does , which proves the claim.
Consequently, if is true, where is a set of literals, -gates other than , and possibly 0, then some element of evaluates to 1. We use this to show that evaluates to 1, distinguishing two cases. If is true, then some element of evaluates to 1, so evaluates to 1. If is false, then for every input of with , the clause forces to be true. Since , some element of evaluates to 1, and hence so does ; inputs with evaluate to 1 trivially. Thus, every input of evaluates to 1, so evaluates to 1. Since , evaluates to 1. In both cases, outputs 1. Therefore, the encoding is correct.
Acknowledgments
We thank Ryan O'Donnell for helpful conversations about the presentation of our results. Krapivin was supported in part by NSF grant 2504471, NSF CAREER award 2542165, a Jane Street Research Grant, the Jeanne B. and Richard F. Berdik ARCS Pittsburgh Endowed Scholar Award, the David and
Lucile Packard Foundation (Award #202071730), and gifts from Nikolai Mushegian and Microsoft. Przybocki and Subercaseaux were supported by the DARPA expMath program through the DARPA CMO contract number HR0011262E028 and by the National Science Foundation (NSF) under grant DMS2434625. Przybocki was additionally supported by the NSF Graduate Research Fellowship Program under Grant Nos. DGE-2140739 and DGE-2631988.
AI Methodology
We used ChatGPT 6 Astra in order to make quantitative improvements on some of our results. Concretely, we provided Astra with a human-written proof of a version of Theorem 5 that used Szemerédi's regularity lemma and yielded clauses for arbitrary -CNF. Astra provided Lemma 25 and Lemma 27 in order to yield the improved bound presented in the paper. Similarly, we presented it with a weaker version of Theorem 6, which gave an upper bound of , and Astra improved this by leveraging a succinct static dictionary. In both cases, the original writing produced by the model was poor, and some of its arguments were overcomplicated, so we simplified and rewrote each of them. We also used Claude Opus 5.5 for help with writing and reorganizing some proofs.
References
[AFWZ95] Noga Alon, Uriel Feige, Avi Wigderson, and David Zuckerman. Derandomized graph products. Comput. Complex., 5(1):60–75, 1995. doi:10.1007/BF01277956. 9, 23
[AL86] Ron Aharoni and Nathan Linial. Minimal non-two-colorable hypergraphs and minimal unsatisfiable formulas. Journal of Combinatorial Theory, Series A, 43(2):196–204, 1986. URL: https://www.sciencedirect.com/science/article/pii/0097316586900609, doi:10.1016/0097-3165(86)90060-9. 29
[ANORC13] Ignasi Abío, Robert Nieuwenhuis, Albert Oliveras, and Enric Rodríguez-Carbonell. A parametric approach for smaller and better encodings of cardinality constraints. In Christian Schulte, editor, Principles and Practice of Constraint Programming, pages 80–96. Springer, 2013. doi:10.1007/978-3-642-40627-0_9. 1
[AWY15] Amir Abboud, R. Ryan Williams, and Huacheng Yu. More applications of the polynomial method to algorithm design. In Piotr Indyk, editor, Proceedings of the Twenty-Sixth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2015, San Diego, CA, USA, January 4-6, 2015, pages 218–230. SIAM, 2015. doi:10.1137/1.9781611973730.17. 15, 16
[BDL+23] József Balogh, Dingding Dong, Bernard Lidický, Nitya Mani, and Yufei Zhao. Nearly all k-SAT functions are unate. In STOC'23—Proceedings of the 55th Annual ACM Symposium on Theory of Computing, pages 958–962. ACM, New York, 2023. doi:10.1145/3564246.3585123. 3, 5
[Bjö09] Magnus Björk. Successful SAT encoding techniques. Journal on Satisfiability, Boolean Modeling and Computation, 7(4):189–201, 2009. doi:10.3233/SAT190085. 1, 6
[BM99] Andrej Brodnik and J. Ian Munro. Membership in constant time and almost-minimum space. SIAM Journal on Computing, 28(5):1627–1640, 1999. doi:10.1137/S0097539795294165. 9, 31
[BVW08] Guy E. Blelloch, Virginia Vassilevska, and R. Ryan Williams. A new combinatorial approach for sparse graph problems. In Luca Aceto, Ivan Damgård, Leslie Ann Goldberg, Magnús M. Halldórsson, Anna Ingólfsdóttir, and Igor Walukiewicz, editors, Automata, Languages and Programming, 35th International Colloquium, ICALP 2008, Reykjavik, Iceland, July 7-11, 2008, Proceedings, Part I: Track A: Algorithms, Automata, Complexity, and Games, volume 5125 of Lecture Notes in Computer Science, pages 108–120. Springer, 2008. doi: 10.1007/978-3-540-70575-8_10. 6
[BW12] Nikhil Bansal and R. Ryan Williams. Regularity lemmas and combinatorial algorithms. Theory Comput., 8(1):69–94, 2012. URL: https://doi.org/10.4086/toc.2012.v008a004, doi:10.4086/TOC.2012.V008A004. 6
[CD26] Bruno Courcelle and Irène Durand. On using SAT solvers for graph computations. Discret. Appl. Math., 380:348–366, 2026. URL: https://doi.org/10.1016/j.dam.2025.10.017, doi:10.1016/J.DAM.2025.10.017. 1
[CLT15] László Csirmaz, Péter Ligeti, and Gábor Tardos. Erdős-Pyber theorem for hypergraphs and secret sharing. Graphs Combin., 31(5):1335–1346, 2015. doi:10.1007/s00373-014-1448-7. 3, 28
[Coo71] Stephen A. Cook. The complexity of theorem-proving procedures. In Michael A. Harrison, Ranan B. Banerji, and Jeffrey D. Ullman, editors, Proceedings of the 3rd Annual ACM Symposium on Theory of Computing, May 3-5, 1971, Shaker Heights, Ohio, USA, pages 151–158. ACM, 1971. doi:10.1145/800157.805047. 1
[Coo88] Stephen A Cook. Short propositional formulas represent nondeterministic computations. Information Processing Letters, 26(5):269–270, 1988. 1
[CW20] Timothy M. Chan and R. Ryan Williams. Deterministic APSP, orthogonal vectors, and more: Quickly derandomizing Razborov-Smolensky. ACM Trans. Algorithms, 17(1), December 2020. doi:10.1145/3402926. 9, 15, 16, 17
[Dan96] Vlado Dančík. Complexity of Boolean functions over bases with unbounded fan-in gates. Inf. Process. Lett., 57(1):31–34, January 1996. doi:10.1016/0020-0190(95)00182-4. 4, 7, 33
[EKMS24] Gregory Emdin, Alexander S. Kulikov, Ivan Mihajlin, and Nikita Slezkin. CNF encodings of symmetric functions. Theory Comput. Syst., 68(5):1291–1311, 2024. URL: https://doi.org/10.1007/s00224-024-10168-w, doi:10.1007/S00224-024-10168-w. 1
[FJM24] Daniel Faber, Adalat Jabrayilov, and Petra Mutzel. SAT encoding of partial ordering models for graph coloring problems. In Supratik Chakraborty and Jie-Hong Roland Jiang, editors, 27th International Conference on Theory and Applications of Satisfiability Testing, SAT 2024, Pune, India, August 21-24, 2024, volume 305 of LIPIcs, pages 12:1–12:20. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2024. URL: https://doi.org/10.4230/LIPIcs.SAT.2024.12, doi:10.4230/LIPICS.SAT.2024.12. 1
[FKPT13] Samuel Fiorini, Volker Kaibel, Kanstantsin Pashkovich, and Dirk Oliver Theis. Combinatorial bounds on nonnegative rank and extended formulations. Discrete Mathematics, 313(1):67–83, 2013. URL: https://www.sciencedirect.com/science/article/pii/S0012365X12004207, doi:10.1016/j.disc.2012.09.015. 7
[FM95] Tomás Feder and Rajeev Motwani. Clique partitions, graph compression and speeding-up algorithms. J. Comput. System Sci., 51(2):261–272, 1995. doi:10.1006/jcss.1995.1065. 19
[FMP 12] Samuel Fiorini, Serge Massar, Sebastian Pokutta, Hans Raj Tiwary, and Ronald de Wolf. Linear vs. semidefinite extended formulations: Exponential separation and strong lower bounds. In Proceedings of the Forty-Fourth Annual ACM Symposium on Theory of Computing, STOC '12, pages 95–106, New York, NY, USA, 2012. Association for Computing Machinery. doi:10.1145/2213977.2213988. 6
[For00] Lance Fortnow. Time-space tradeoffs for satisfiability. J. Comput. Syst. Sci., 60(2):337–353, 2000. URL: https://doi.org/10.1006/jcss.1999.1671, doi:10.1006/JCSS.1999.1671. 1
[GJ79] M. R. Garey and David S. Johnson. Computers and Intractability: A Guide to the Theory of NP-Completeness. W. H. Freeman, 1979. 23
[GS89] Yuri Gurevich and Saharon Shelah. Nearly linear time. In Albert R. Meyer and Michael A. Taitslin, editors, Logic at Botik '89, Symposium on Logical Foundations of Computer Science, Pereslav-Zalessky, USSR, July 3-8, 1989, Proceedings, Lecture Notes in Computer Science, pages 108–118. Springer, 1989. doi:10.1007/3-540-51237-3_10. 1
[GV21] Vijay Ganesh and Moshe Y. Vardi. On the unreasonable effectiveness of SAT solvers. In Tim Roughgarden, editor, Beyond the Worst-Case Analysis of Algorithms, pages 547–566. Cambridge University Press, 2021. URL: https://www.cambridge.org/core/product/58F65AA9F1D3B027CB02D05099C7929B, doi:10.1017/9781108637435.032. 6
[Hal35] Philip Hall. On representatives of subsets. J. London Math. Soc., 10(1):26–30, 1935. doi:10.1112/jlms/s1-10.37.26. 13, 14, 20, 29
[HLW06] Shlomo Hoory, Nathan Linial, and Avi Wigderson. Expander graphs and their applications. Bulletin of the American Mathematical Society, 43(4):439–561, 2006. URL: https://www.math.ias.edu/~avi/B00KS/expanderbookr1.pdf, doi:10.1090/S0273-0979-06-01126-8. 23
[HLY 25] Yang Hu, Jingxun Liang, Huacheng Yu, Junkai Zhang, and Renfei Zhou. Optimal static dictionary with worst-case constant query time. In Proceedings of the 57th Annual ACM Symposium on Theory of Computing (STOC), pages 278–289, 2025. doi:10.1145/3717823.3718278. 9, 31
[HS15] Marijn J. H. Heule and Stefan Szeider. A SAT approach to clique-width. ACM Trans. Comput. Logic, 16(3), June 2015. doi:10.1145/2736696. 1
[HS24] Marijn J. H. Heule and Manfred Scheucher. Happy ending: An empty hexagon in every set of 30 points. In Tools and Algorithms for the Construction and Analysis of Systems: 30th
International Conference, TACAS 2024, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2024, Luxembourg City, Luxembourg, April 6–11, 2024, Proceedings, Part I, Lecture Notes in Computer Science, pages 61–80, Cham, 2024. Springer Nature Switzerland. doi:10.1007/978-3-031-57246-3_5. 1, 6
[HT23] Pavel Hrubeš and Navid Talebanfard. On the extension complexity of polytopes separating subsets of the Boolean cube. Discrete Comput. Geom., 70(1):268–278, 2023. doi:10.1007/s00454-022-00419-3. 7
[IMM17] Alexey Ignatiev, António Morgado, and João Marques-Silva. Cardinality encodings for graph optimization problems. In Carles Sierra, editor, Proceedings of the Twenty-Sixth International Joint Conference on Artificial Intelligence, IJCAI 2017, Melbourne, Australia, August 19-25, 2017, pages 652–658. ijcai.org, 2017. URL: https://doi.org/10.24963/ijcai.2017/91, doi:10.24963/IJCAI.2017/91. 1
[Juk12] Stasys Jukna. Boolean Function Complexity - Advances and Frontiers, volume 27 of Algorithms and Combinatorics. Springer, 2012. doi:10.1007/978-3-642-24508-4. 1, 7
[Juk13] Stasys Jukna. Computational complexity of graphs. In Matthias Dehmer, Abbe Mow-showitz, and Frank Emmert-Streib, editors, Advances in Network Complexity, chapter 5, pages 99–153. Wiley, 2013. URL: https://onlinelibrary.wiley.com/doi/10.1002/9783527670468.ch05, doi:10.1002/9783527670468.ch05. 7
[KHB19] Benjamin Kiesel, Marijn J. H. Heule, and Armin Biere. Truth assignments as conditional autarkies. In Yu-Fang Chen, Chih-Hong Cheng, and Javier Esparza, editors, Automated Technology for Verification and Analysis, pages 48–64. Springer International Publishing, 2019. 29
[Knu22] Donald E. Knuth. The Art of Computer Programming, Volume 4B: Combinatorial Algorithms, Part 2. Addison-Wesley Professional, 2022. Section 7.2.2.2: Satisfiability. 6
[KPS26] Andrew Krapivin, Benjamin Przybocki, and Bernardo Subercaseaux. Near-optimal encodings of cardinality constraints. In Alexey Ignatiev and Stefan Szeider, editors, 29th International Conference on Theory and Applications of Satisfiability Testing, SAT 2026, Lisbon, Portugal, July 20-23, 2026, volume 377 of LIPIcs, pages 23:1–23:17. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2026. URL: https://doi.org/10.4230/LIPIcs.SAT.2026.23, doi:10.4230/LIPICS.SAT.2026.23. 1, 6, 12
[KPSS25] Markus Kirchweger, Tomáš Peitl, Bernardo Subercaseaux, and Stefan Szeider. From the finite to the infinite: Sharper asymptotic bounds on Norin’s conjecture via SAT, 2025. URL: https://arxiv.org/abs/2511.08386, arXiv:2511.08386. 1
[KPSS26] Andrew Krapivin, Benjamin Przybocki, Nicolás Sanhueza-Matamala, and Bernardo Subercaseaux. Optimal and efficient partite decompositions of hypergraphs. In Aditya Bhaskara and Artur Czumaj, editors, Proceedings of the 58th Annual ACM Symposium on Theory of Computing, STOC 2026, Salt Lake City, UT, USA, June 22-26, 2026, pages 2187–2198. ACM, 2026. doi:10.1145/3798129.3800921. 3, 28
[Kre23] William Kretschmer. Quantum mass production theorems. In Omar Fawzi and Michael Walter, editors, 18th Conference on the Theory of Quantum Computation, Communication and Cryptography, TQC 2023, Aveiro, Portugal, July 24-28, 2023, volume 266 of LIPIcs, pages 10:1-10:11. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2023. URL: https://doi.org/10.4230/LIPIcs.TQC.2023.10, doi:10.4230/LIPICS.TQC.2023.10.7, 11
[KSMS11] Hadi Katebi, Karem A. Sakallah, and João P. Marques-Silva. Empirical study of the anatomy of modern SAT solvers. In Theory and Applications of Satisfiability Testing – SAT 2011, Lecture Notes in Computer Science, pages 343–356, Berlin, Heidelberg, 2011. Springer Berlin Heidelberg. doi:10.1007/978-3-642-21581-0_27. 6
[KSV19] Petr Kučera, Petr Savický, and Vojtěch Vorel. A lower bound on CNF encodings of the at-most-one constraint. Theor. Comput. Sci., 762:51–73, 2019. doi:10.1016/J.TCS.2018.09.003.1
[Lev73] Leonid A. Levin. Universal'nye zadachi perebora. Problemy Peredachi Informatsii, 9(3):115–116, 1973. English translation: Universal sequential search problems, Problems of Information Transmission 9(3):265–266, 1973. 1
[Lup58] Oleg B. Lupanov. On a method of circuit synthesis. Izvestiya Vysshikh Uchebnykh Zavedeniy, Radiofizika, 1:120–140, 1958. (in Russian). 4
[LW17] Kasper Green Larsen and R. Ryan Williams. Faster online matrix-vector multiplication. In Philip N. Klein, editor, Proceedings of the Twenty-Eighth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2017, Barcelona, Spain, Hotel Porta Fira, January 16-19, pages 2182–2189. SIAM, 2017. doi:10.1137/1.9781611974782.142.3, 6, 9, 15, 16
[MMZ+01] M.W. Moskewicz, C.F. Madigan, Y. Zhao, L. Zhang, and S. Malik. Chaff: Engineering an efficient SAT solver. In Proceedings of the 38th Design Automation Conference (IEEE Cat. No.01CH37232), pages 530–535, 2001. doi:10.1145/378239.379017.6
[MS85] Burkhard Monien and Ewald Speckenmeyer. Solving satisfiability in less than 2" steps. Discrete Applied Mathematics, 10(3):287–295, 1985. URL: https://www.sciencedirect.com/science/article/pii/0166218X85900502, doi:10.1016/0166-218X(85)90050-2. 9, 29
[Nec62] Éduard Ivanovich Nechiporuk. On the complexity of schemes in some bases containing nontrivial elements with zero weights. Problemy Kibernetiki, 8:123–160, 1962. (in Russian). 4, 7, 9, 31
[Nec69] Éduard Ivanovich Nechiporuk. The topological principles of self-correction. Problemy Kibernet., (21):5–102, 1969. Available in Russian at https://web.vu.lt/mif/s.jukna/boolean/Russians/Nechiporuk-1969a.pdf, thanks to Stasys Jukna. 19
[Pag01] Rasmus Pagh. Low redundancy in static dictionaries with constant query time. SIAM Journal on Computing, 31(2):353–363, 2001. URL: https://www.rasmuspagh.net/papers/dict-jour.pdf, doi:10.1137/S0097539700369909. 9, 31
[Pát08] Mihai Pătrăescu. Succincter. In Proceedings of the 49th Annual IEEE Symposium on Foundations of Computer Science (FOCS), pages 305–313, 2008. 9, 31
[PF79] Nicholas Pippenger and Michael J Fischer. Relations among complexity measures. Journal of the ACM (JACM), 26(2):361–381, 1979. 1
[Pre21] Steven D. Prestwich. CNF encodings. In Armin Biere, Marijn Heule, Hans van Maaren, and Toby Walsh, editors, Handbook of Satisfiability - Second Edition, volume 336 of Frontiers in Artificial Intelligence and Applications, pages 75–100. IOS Press, 2021. doi:10.3233/FAIA200985. 1
[PSH26] Benjamin Przybocki, Bernardo Subercaseaux, and Marijn J. H. Heule. Automated reencoding meets graph theory. In Alexey Ignatiev and Stefan Szeider, editors, 29th International Conference on Theory and Applications of Satisfiability Testing, SAT 2026, Lisbon, Portugal, July 20-23, 2026, volume 377 of LIPIcs, pages 29:1–29:17. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2026. URL: https://doi.org/10.4230/LIPIcs.SAT.2026.29, doi:10.4230/LIPICS.SAT.2026.29. 3, 7
[QWSH25] Long Qian, Eric Wang, Bernardo Subercaseaux, and Marijn J. H. Heule. Unfolding boxes with local constraints. In Automated Deduction – CADE 30: 30th International Conference on Automated Deduction, Stuttgart, Germany, July 28-31, 2025, Proceedings, pages 736–754, Berlin, Heidelberg, 2025. Springer-Verlag. doi:10.1007/978-3-031-99984-0_38. 1
[Rob91] John M Robson. An O(T log T) reduction from RAM computations to satisfiability. Theoretical Computer Science, 82(1):141–149, 1991. 1, 2, 7, 9, 10
[Sch78] Claus-Peter Schnorr. Satisfiability is quasilinear complete in NQL. Journal of the ACM (JACM), 25(1):136–145, 1978. 1
[Ser19] Igor S. Sergeev. On the complexity of bounded-depth circuits and formulas over the basis of fan-in gates. Discrete Mathematics and Applications, 29(4):241–254, 2019. Russian original in Diskretnaya Matematika 30(2):120–137, 2018. doi:10.1515/dma-2019-0022.7
[SH23] Bernardo Subercaseaux and Marijn J. H. Heule. The packing chromatic number of the infinite square grid is 15. In Sriram Sankaranarayanan and Natasha Sharygina, editors, Tools and Algorithms for the Construction and Analysis of Systems, pages 389–406. Springer Nature Switzerland, 2023. 1, 6
[Sin05] Carsten Sinz. Towards an optimal CNF encoding of boolean cardinality constraints. In Peter van Beek, editor, Principles and Practice of Constraint Programming - CP, volume 3709 of Lecture Notes in Computer Science, pages 827–831. Springer, 2005. doi:10.1007/11564751_73. 1
[Sub25] Bernardo Subercaseaux. Asymptotically smaller encodings for graph problems and scheduling, 2025. (ModRef workshop). URL: https://arxiv.org/abs/2506.14042, arXiv:2506.14042. 1, 3, 5, 7
[SX26a] Zimo Sheng and Mingyu Xiao. A near-linear element kernel for d-hitting set, 2026. URL: https://arxiv.org/abs/2609.06512, arXiv:2609.06512. 7
[SX26b] Zimo Sheng and Mingyu Xiao. A polynomial kernel for planar directed feedback vertex set, 2026. URL: https://arxiv.org/abs/2609.23669, arXiv:2609.23669. 7
[Sze78] Endre Szemerédi. Regular partitions of graphs. In Problèmes combinatoires et théorie des graphes (Colloq. Internat. CNRS, Univ. Orsay, Orsay, 1976), volume 260 of Colloq. Internat. CNRS, pages 399–401. CNRS, Paris, 1978. 25
[Teu14] Jason Teutsch. Short lists for shortest descriptions in short time. Computational Complexity, 23(4):565–583, 2014. URL: https://arxiv.org/abs/1212.6104. 8, 13
[Tse70] Grigori S. Tseytin. On the complexity of derivation in propositional calculus. In A. O. Slisenko, editor, Studies in Constructive Mathematics and Mathematical Logic, Part II, pages 115–125. Consultants Bureau, 1970. Translated from Russian (1968). 1
[Uli74] Dietmar Ulig. On the synthesis of self-correcting schemes from functional elements with a small number of reliable elements. Mathematical Notes of the Academy of Sciences of the USSR, 15(6):558–562, June 1974. doi:10.1007/bf01152835. 7, 11
[Wil07] R. Ryan Williams. Matrix-vector multiplication in sub-quadratic time: (some preprocessing required). In Nikhil Bansal, Kirk Pruhs, and Clifford Stein, editors, Proceedings of the Eighteenth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2007, New Orleans, Louisiana, USA, January 7-9, 2007, pages 995–1001. SIAM, 2007. URL: http://dl.acm.org/citation.cfm?id=1283383.1283490. 6
[Yan91] Mihalis Yannakakis. Expressing combinatorial optimization problems by linear programs. Journal of Computer and System Sciences, 43(3):441–466, 1991. doi:10.1016/0022-0000(91)90024-Y. 6
[Zho20] Neng-Fa Zhou. In pursuit of an efficient SAT encoding for the Hamiltonian cycle problem. In Helmut Simonis, editor, Principles and Practice of Constraint Programming - 26th International Conference, CP 2020, Louvain-la-Neuve, Belgium, September 7-11, 2020, Proceedings, volume 12333 of Lecture Notes in Computer Science, pages 585–602. Springer, 2020. doi:10.1007/978-3-030-58475-7_34. 1, 4
[Zho24] Neng-Fa Zhou. Encoding the Hamiltonian cycle problem into SAT based on vertex elimination (short paper). In Paul Shaw, editor, 30th International Conference on Principles and Practice of Constraint Programming, CP 2024, Girona, Spain, September 2-6, 2024, volume 307 of LIPIcs, pages 40:1–40:8. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2024. doi:10.4230/LIPICS.CP.2024.40. 1