Skip to content

The CNF Encoding Complexity of Boolean Functions

Andrew Krapivin, Benjamin Przybocki, Bernardo Subercaseaux

cs.CCarXiv:2611.05614

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 t (in the RAM model) with m bits of advice such that at most b bits of advice are accessed for each input, then it admits a CNF encoding with O(t + mb) 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 O(t+m) clauses; our applications leverage b = o(m) 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 k-CNF function on n inputs can be encoded with nk/2Ωk( n) clauses. Notably, despite encoding a k-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 Ωk(nk/ n) 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.

Create a lesson