Min-CSPs on Complete Instances II:
Polylogarithmic Approximation for Min-NAE-3-SAT
Abstract
This paper studies complete -Constraint Satisfaction Problems (CSPs), where an -variable instance has exactly one nontrivial constraint for each subset of variables, i.e., it has constraints. A recent work started a systematic study of complete -CSPs [Anand, Lee, Sharma, SODA’25], and showed a quasi-polynomial time algorithm that decides if there is an assignment satisfying all the constraints of any complete Boolean-alphabet -CSP, algorithmically separating complete instances from dense instances.
The tractability of this decision problem is necessary for any nontrivial (multiplicative) approximation for the minimization version, whose goal is to minimize the number of violated constraints. The same paper raised the question of whether it is possible to obtain nontrivial approximation algorithms for complete Min--CSPs with .
In this work, we make progress in this direction and show a quasi-polynomial time -approximation to Min-NAE-3-SAT on complete instances, which asks to minimize the number of -clauses where all the three literals equal the same bit. To the best of our knowledge, this is the first known example of a CSP whose decision version is NP-Hard in general (and dense) instances while admitting a -approximation in complete instances. Our algorithm presents a new iterative framework for rounding a solution from the Sherali-Adams hierarchy, where each iteration interleaves the two well-known rounding tools: the conditioning procedure, in order to “almost fix” many variables, and the thresholding procedure, in order to “completely fix” them.
Finally, we improve the running time of the decision algorithms of Anand, Lee, and Sharma and show a simple algorithm that decides any complete Boolean-alphabet -CSP in polynomial time.
Keywords and phrases:
Constraint Satisfiability Problems, Approximation Algorithms, Sherali AdamsCategory:
APPROXFunding:
Euiwoong Lee: Supported in part by NSF grant CCF-2236669 and Google.Copyright and License:
2012 ACM Subject Classification:
Theory of computation Approximation algorithms analysis ; Mathematics of computing Approximation algorithms ; Theory of computation Problems, reductions and completenessEditors:
Alina Ene and Eshan ChattopadhyaySeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
Constraint Satisfaction Problems (CSPs) provide a unified framework for expressing a wide range of combinatorial problems, including SAT, Graph Coloring, and Integer Programming. A CSP consists of a set of variables that must be assigned values from a given alphabet, subject to a collection of constraints. The goal is typically to determine whether there exists an assignment that satisfies all constraints (decision CSPs) or to optimize some measure of constraint satisfaction (optimization CSPs).
A major example of optimization CSPs is Max-CSPs, where the objective is to find an assignment that maximizes the number of satisfied constraints. This class of problems has been extensively studied and it is known to admit various approximation algorithms, including the (conditionally) optimal approximability of fundamental problems such as Max--LIN, Max--SAT, Max-Cut, and Unique Games [20, 25, 26]. However, significantly less is known for their minimization counterpart, namely Min-CSPs, which aim to minimize the number of violated constraints.
In many cases, the minimization versions of CSPs are inherently harder to approximate than the maximization objective. For example, while Max--SAT admits a tight approximation algorithm modulo the Unique Games Conjecture (UGC) [28, 12, 25], the best-known approximation guarantee for Min--SAT (also known as Min--CNF-Deletion) is an -approximation [1] along with a hardness of under the UGC [25]. Another example is that of Not-All-Equal--SAT (NAE--SAT), where a clause (consisting of three literals) is satisfied if and only if not all the three literals evaluate to the same Boolean value. The maximization version, Max-NAE--SAT admits a tight approximation factor of modulo the UGC [11]. In contrast, the minimization version Min-NAE--SAT cannot even admit any finite approximation in polynomial time, simply from the NP-hardness of the decision version NAE--SAT [34].
Understanding the approximability of Min-CSPs remains a major challenge in computational complexity and approximation algorithms. On the brighter side, [24] proved that the optimal approximation ratio takes one of the values in for any Min-CSP with the Boolean alphabet (here in this paper, we will talk about CSPs on the Boolean alphabet, unless specified), based on some structural classification.
Apart from the general instances, CSPs often exhibit significantly different behavior when structural requirements are imposed on their instances. The structure of a CSP refers to assumptions on how constraints are distributed across the instance. A -CSP is defined on variables, where each constraint involves exactly variables, and the constraint structure can naturally be modeled as a -uniform hypergraph, where variables correspond to vertices and each constraint corresponds to a hyperedge. Structural assumptions on CSPs often translate into density conditions on the corresponding hypergraph. Two particularly important structured settings are (1) dense instances, where the number of constraints (i.e. hyperedges) is , and (2) complete instances, where the number of constraints is exactly .
Max-CSPs on dense instances have been extensively studied, with powerful algorithmic techniques yielding strong approximation guarantees. In fact, for every Max-CSP on dense instances, a Polynomial-Time Approximation Scheme (PTAS) is known, achievable through any of the three major algorithmic frameworks: random sampling [5, 10, 3, 15, 30, 23, 8, 35, 29, 17], convex hierarchies [16, 6, 9, 19, 36, 2, 21, 7], and regularity lemmas [18, 14, 32, 22]. However, in contrast, Min-CSPs on dense instances remain far less explored. Known results exist only for specific problems, such as -approximation algorithms for Unique Games and Min-Uncut [10, 23, 19, 31], and a PTAS for fragile Min-CSPs [23], where a CSP is fragile when changing the value of a variable always flips a clause containing it from satisfied to unsatisfied. Despite these advances, a general framework for tackling Min-CSPs in dense settings is still lacking, making it a compelling direction for further study.
Building on the study of structured CSPs, [4] introduced complete instances as an extreme case of structure, where every possible -set of variables forms a constraint. The primary motivation for the study of complete instances comes from their connections to machine learning and data science, their role in unifying algorithmic techniques for dense Max-CSPs, and the structural insights they provide into CSPs (see [4] for details). They give a constant-factor polynomial time approximation for Min--SAT on complete instances, which contrasts to the -hardness on dense instances, and quasi-polynomial (specifically, ) time algorithms for the decision versions of -SAT and -CSP for all constants . They also give a polynomial time algorithm for deciding NAE--SAT on complete instances. On the hardness side, they prove that there is no polynomial time algorithm for exact optimization (which does not distinguish the maximization and minimization versions) of NAE--SAT, -SAT, -Lin, -And, and Unique Games even on complete instances unless .
Our Contribution.
We prove two main results in our work: (1) a quasi-polynomial time approximation for Min-NAE--SAT on complete instances, and, (2) a polynomial time algorithm for the decision version of -CSP for all constants .
We first present a quasi-polynomial (i.e., ) time -approximation algorithm for Min-NAE--SAT on complete instances. To the best of our knowledge, it is the first known example of a CSP whose decision version is NP-hard in general instances (and dense instances too, see Claim 7.1) while admitting a -approximation in complete instances.
Theorem 1.1.
There is an algorithm running in time for some constant that gives an -approximation for Min-NAE--SAT on complete instances. Furthermore, the integrality gap of the degree- Sherali-Adams relaxation is at most .
Beyond addressing this specific question, our result also strengthens one of the main motivations for studying Min-CSPs on complete instances: understanding whether a combination of algorithmic techniques (random sampling, convex hierarchies, and regularity lemmas) can improve approximability results. As stated earlier, while each of these techniques independently yields PTASes for Max-CSPs on dense/complete instances, their effectiveness for Min-CSPs is much less understood. Our algorithm presents a new iterative framework for rounding a solution from the -round Sherali-Adams hierarchy, where each iteration interleaves the two well-known rounding tools: (1) the conditioning procedure, which identifies and conditions on a small set of variables in order to almost fix a constant fraction of variables and (2) the thresholding procedure, in order to completely fix them. We fix a constant fraction of variables in each iteration (for a total of iterations) while ensuring that the value of the LP remains within a factor of the optimal value by the end of all the iterations.
Secondly, we give polynomial time algorithms for the decision version of -CSPs (for every constant ), improving over the quasi-polynomial time algorithm of [4].
Theorem 1.2.
For every , there is a polynomial time algorithm that decides whether a complete instance of -CSP is satisfiable or not.
Our algorithm is remarkably simple. It relies on Lemma of [4], which shows that the number of satisfying assignments for a complete instance of a -CSP is at most , based on a VC-dimension argument. The algorithm first arbitrarily orders the variables , and then proceeds by iteratively maintaining all satisfying assignments for the partial (complete) instance induced on the first variables. Since the number of satisfying assignments for a complete instance with variables is at most , we can efficiently keep track and update these solutions in polynomial time, leading to our second main result.
Open Questions.
Our work establishes the first nontrivial approximation result for a Min-CSP, Min-NAE--SAT on complete instances, whose decision version is NP-hard on general and dense instances. NAE--SAT remains hard even when every variable appears in clauses (˜7.1). However, our techniques do not currently extend to other problems including Min--SAT and Min-NAE-4-SAT.
This raises the open question regarding both approximation algorithms and hardness results for Min--CSPs. While exact optimization is known to be hard, proving inapproximability beyond this – such as APX-hardness – remains an important direction. A natural first candidate is Min--SAT, for which the existence of efficient quasi-polynomial time approximation algorithms or even hardness results on complete instances remains unresolved.
Organization.
Section 2 provides an overview of the quasi-polynomial time approximation for Min-NAE--SAT, i.e., a proof outline for Theorem 1.1. Section 3 establishes the notations and preliminaries required throughout the paper. Section 4 shows the proof of the rounding algorithm, Algorithm 2, which proves Theorem 1.1 by rounding the solution of the Sherali-Adams LP. Section 5 presents the polynomial time algorithm for the decision -CSPs (Theorem 1.2).
2 Technical overview
Convex programming hierarchies have proven to be instrumental in the design of approximation algorithms of Max-CSPs [16, 6, 9, 19, 36, 2, 21, 7] and, limited to a few special cases, Min-CSPs [13]. Therefore, it is natural to attempt to approximate Min-NAE--SAT on complete instances using these approaches. We prove Theorem 1.1 by designing an algorithm that first runs the degree- Sherali-Adams relaxation of Min-NAE--SAT, and then rounds the fractional solution to a Boolean assignment.
Informally, a fractional solution to such a relaxation associates each set of at most variables with distributions over assignments to the variables in . The crucial property is that these distributions are locally consistent: for any two variable sets of size at most , the local distributions and agree on the probability of each assignment to . For this reason, such a solution is called a pseudodistribution.
The objective of the relaxation is to minimize the average over constraints of the probability that they are violated by an assignment sampled from their respective local distribution. In particular, the objective value of an optimal pseudodistribution is at most the fraction of violated constraints in an optimal Boolean assignment.
As solving a degree- Sherali-Adams relaxation amounts to solving a linear program with variables, we would like to keep as small as possible. In our context, we will set .
Having put this notation in place, we now give an overview of how the algorithm from Theorem 1.1 rounds these fractional solutions. Specifically, in Section 2.1 we highlight some of the structural properties that our problem instance impose on the pseudodistributions, and in Section 2.2 we discuss how to exploit these properties to design a rounding algorithm.
2.1 Pseudodistributions and complete NAE-3-SAT
When rounding pseudodistributions obtained from the Sherali-Adams or Sum-of-Squares hierarchies, conditioning is perhaps the main hammer at our disposal. This technique, introduced by [9, 19] and adopted ubiquitously to approximate optimization CSPs, is usually implemented as follows: first, we condition on a subset of variables to reduce the average correlations among the groups of variables to below ; then, we perform independent rounding. This scheme is particularly effective in the context of dense Max--CSPs, where we capitalize upon the fact that optimal assignment satisfies at least an fraction of constraints. Hence, we can afford to additively lose a total variation distance of between the pseudodistribution and independent rounding in each constraint, and still obtain a -approximation.
Obstacle: we cannot afford additive error.
In the context of Min--CSPs, the objective function is the fraction of violated constraints. Hence, for a Min--CSP instance , we define to be the minimum over all the variable assignments of the fraction of constraints in unsatisfied by . With such an objective, the trick discussed above ceases to work: a highly satisfiable instance has a very small optimal value, possibly even . Due to this eventuality, we cannot afford to additively lose an term for each constraint: it would result in an objective value of, say, unless . Unfortunately, the degree of the pseudodistribution needs to be larger than the number of variables we condition on, so setting is prohibitive.
Advantage: loss in time and approximation.
On the flip side of the above discussion, one can deduce that if we can in fact afford to lose an additive term for and still run in time. Even more so, if then we always get a -approximation, no matter what solution we output (since the value we obtain is always at most ). We can therefore restrain ourselves to consider instances with small optimal value.
Insight 1.
Without loss of generality, we can consider only instances with .
Advantage: the instance is complete.
Let be an optimal pseudodistribution for our instance , and let us denote by the fractional objective value achieved by on . Thanks to ˜1, we can assume . Recalling that we are in the realm of complete instances, a simple averaging yields the following observation.
Insight 2.
For at least of the triples , we have that the constraint is unsatisfied with probability at most over .
We remark that a version of Insight 2 remains true for dense – but not necessarily complete – instances up to an loss in the lower bound. However, being dense is not a “hereditary property”, while being complete is a “hereditary property”: any variable-induced sub-instance of a complete instance is also complete and in particular dense, while this might not be the case for dense instances. Thus, assuming that is complete allows us to benefit from Insight 2 locally to any variable-induced sub-instance. As we will see, this is instrumental to our algorithm.
Advantage: the structure of NAE--SAT constraints.
Consider any constraint that is unsatisfied with probability at most over , for some . By Insight 2, we can assume that . Then one can see that, among the six satisfying assignments of , there is one that retains probability mass at least in . Call this satisfying assignment . Assuming for simplicity that the literals of are all positive, we conclude that exactly two of must be equal. By symmetry, we can assume that and . We now consider the pseudodistribution obtained by conditioning on the variables taking the random value . We can observe that with probability at least . Therefore, if such an event occurs, we have , as one can deduce from Table 1. In this case, we say that becomes -fixed in .
We now continue to look at a fixed constraint as above, and consider the following random experiment: draw a random pair of variables together with a random assignment sampled from their local distribution, and let be the pseudodistribution obtained by conditioning on the pair taking value . With probability we hit the pair , i.e., , and with probability we have . This means that the variable becomes -fixed in with probability at least . By Insight 2, we know that for many (i.e., ) choices for , there are many (i.e., ) triples that can -fix , as the one considered in the discussion above. Using the linearity of expectation and Markov’s inequality, we can then conclude the following.
Insight 3.
For a random pair of variables and a random assignment , with probability there are at least variables that become -fixed in .
A formal version of this fact is stated in Lemma 4.1.
Advantage: “completely” fixing -fixed variables incurs little cost.
We recall that conditioning on a random assignment preserves the objective value in expectation, i.e., . Hence, Insight 3 seems to suggest that conditioning on just two variables allows making nontrivial progress towards the goal of rounding the pseudodistribution: the entropy of variables should drastically decrease while preserving the expected objective value. However, the conditioning alone is not enough, as its effect decreases when the entropy becomes already small but still nontrivial (e.g., if all but variables are -fixed, the above argument cannot guarantee any more progress). While independent rounding suffices for Max-CSPs in this case, its additive loss can still be prohibitive for the minimization objective.
In order to bypass this barrier, we additionally use thresholding to round many -fixed variables to exactly or . Formally, is a new pseudodistribution where for each variable that is -fixed in , fix to the bit retaining of the probability mass of .
We now zoom in on a constraint with only positive literals where, say, has been fixed to in . Call the probability that is unsatisfied by an assignment sampled from for convenience. One can observe that the probability of being violated by an assignment sampled from equals . This is because the assignment has probability mass in , since we fixed to . Then, with the help of Table 2, we can convince ourselves that the probability of being unsatisfied by an assignment sampled from is no larger than up to an additive error.
From the above discussion, we conclude that the fractional objective value of is at most . Recalling that , Insight 3 can then be refined as follows.
Insight 4.
By sampling a random pair of variables, conditioning on a random assignment to them, and performing the thresholding, we can construct a new pseudodistribution such that and with probability there are at least integral variables in .
2.2 Towards an algorithm
It would be tempting to employ Insight 4 to get a rounding scheme as the one outlined in Algorithm 1: sample a pair of variables and a random assignment, construct as above, and recurse on the sub-instance induced by the variables that are still not integral (or halt if there is no such variable). The intuition behind this Algorithm 1 is backed up by a trifecta.
- 1.
-
2.
Second, we expect that levels of recursion will make every variable integral, by Insight 4.
-
3.
Third, the expected value of the (integral) pseudodistribution obtained at the end is roughly , also by Insight 4.
However, more work is needed, since Insight 4 only bounds the cost in expectation at each individual recursion level.
Obstacle: the need for a high probability guarantee.
In order to materialize the strategy of Algorithm 1, we need to control the deviations of from at every level of the recursion. More precisely, let be the pseudodistribution at the beginning of the -th recursion level, and let the fractional objective value of the pseudodistribution .
For the sake of exposition, here let us ignore the hidden constant in and assume (the ignored error comes from the clauses at least one of whose variables is completely fixed by the threshold step, so it can be controlled via the concept of the aggregate value defined in equation (1) of Section 4). With this assumption, at every level of the recursion we have
Applying this identity at every level, we get
where the last inequality follows assuming that the pseudodistribution on which we first call the algorithm is optimal. Now, one can intuitively see that the deviation of the last pseudodistribution from its expected objective value translates to the approximation ratio achieved by the algorithm. Therefore, we are interested in bounding such deviation. To do so, we have to peel off one expectation operator at a time in the above equation by means of Markov’s inequality. At every level , the guarantee would then be with probability . Since this gives
we need a such that . Recalling that , we must hence require . Unfortunately, Markov’s inequality ensures multiplicative increase with only success probability. If we call the probability that fixes variables, we realize that
We are therefore unable to conclude that there exists a choice of for which we both have that fixes variables and . For the left-hand side above to be less than one, we need .
Advantage: polylog()-degree pseudodistributions.
Recalling that we allow our algorithm to run in time, we can assume to have a -degree pseudodistribution at our disposal. Supported by this, the natural thing to do is modifying each level of the recursion as follows: condition on random pairs - as opposed to one - and their respective assignments. While this should boost , we now have more conditioning steps that could deviate from the expectation. However, suppose we could condition on a random set of pairs of variables whose joint local distribution is close (in total variation distance) to the product of their marginal distributions: then, we would both obtain the high probability guarantee and simultaneously have only one deviation from the objective value to control. A standard way to ensure that the joint distribution of (pairs of) variables is -close to independent is by additionally conditioning on variables [33, 36]. Since we want and , we can afford to do so with our -degree pseudodistribution.
A formal version of this algorithm is presented and analyzed in Section 4.
3 Notation
CSPs.
Let be an integer and let be a set of variables. A -CSP is a pair where is a set of variables over the Boolean alphabet , and represents the constraints. Each constraint is defined by a -subset of variables and a predicate , where means that the constraint is satisfied and otherwise. We will consider complete -CSPs, so that there is a predicate for every . Furthermore, each constraint is unsatisfied for at least one assignment to the variables . Then, for a global assignment to the variables, we let
where indicates that is sampled uniformly from the elements of , and represents the restriction of to entries in .
In the decision version of a -CSP instance , the goal is to decide if there is an assignment such that . In the minimization version, which we denote by Min--CSP, the goal is to find an assignment which minimizes , so we define
Sometimes we will write as a shorthand for when is clear from the context. For a subset of variables , we denote by the sub-instance of induced by the variables .
NAE--SAT.
A complete NAE--SAT instance is a complete -CSP where each constraint (also called a clause) is a “not all equal” predicate on three literals, where each literal is either a variable or its negation. For our convenience, we define this formally as follows: for each and each , we have a polarity bijection determining the literal pattern for the variable in , and the constraint is defined as
for every .
Sherali-Adams notation.
For , we consider the degree- Sherali-Adams relaxation of , which can be written as
where is the set of pseudodistributions of degree over the Boolean variables , i.e. every element of is indexed by subsets with where each is a distribution over assignments to the variables in , with the property that
Moreover, for any , we let denote that probability of sampling from . We also let for convenience
be the fractional objective value of a pseudodistribution . Additionally, for , we denote by the restriction of to variables in . Again, we will use the shorthand when is clear from the context.
Conditioning and fixing notation.
For , with and , we denote by the pseudodistribution obtained from by conditioning on the event that the variables in are assigned . Formally, is the pseudodistribution defined for each with and as
where is the vector assigning to and to . Furthermore, we denote by the pseudodistribution obtained by fixing the variables in to take the assignment , which results from moving all the probability mass of to for each and the corresponding . Formally, is the pseudodistribution defined for each with and each as
Variable vectors and variable sets.
We will use the convention that for a vector written in boldface, the regular capital letter will be the set formed by the union of the value taken by its coordinates.
4 Polylogarithmic approximation for complete Min-NAE-3-SAT
In this section, we present and analyze the rounding scheme that we apply to the Sherali-Adams solution. Hereafter, we fix an instance of NAE--SAT with variable set , where . In order to describe the rounding algorithm, we should first introduce the necessary notions.
Fixed variables, ruling value, ruling assignment.
Given a subset , a pseudodistribution , and a threshold , a variable is called -fixed if for some bit one has that the probability is at most . Moreover, the corresponding bit having probability at least is called the ruling value of . Also, we define to be the the set of all the -fixed variables in . Moreover, we define to be the corresponding ruling assignment, where the entry for equals the ruling value of in .
LP value of constraint classes.
Given a set of variables (which can be thought of as the set of unfixed variables), we classify the constraints of into four groups: for , we let be the sub-instance with constraints , i.e. can be thought of as the sub-instance consisting of constraints with exactly unfixed variables. Then, given a pseudodistribution , we define for each the LP value of the constraints in as
so can be thought of as the contribution of the constraints with exactly unfixed variables to the Sherali-Adams objective.
Aggregate LP value.
For analyzing our algorithm, we treat the quantities , , and separately. However, for the sake of certain probability bounds, it turns out to be useful to combine these into a single weighted sum: given a real parameter , a set , and a pseudodistribution , we define the aggregate value of as the weighted sum
| (1) |
We might drop the subscript when it is clear from context (and this should not create any confusion as we will use one fixed value of for the whole algorithm and analysis).
Thresholds with bounded increase.
As per the definition above, the notion of fixed variables depends on a threshold . In our algorithm and analysis, we will want to use a threshold that ensures a certain bound on the additive increase on the aggregate value. More precisely, given , , , and a parameter , we define the set of thresholds with bounded increase to be the set of all such that
and we denote this set as . As for , we drop the subscript when it is clear from context.
-SAT instances.
Given and a partial assignment such that for all , the Min--SAT instance induced by and is denoted as and is defined as follows: we let , where is a multiset of -SAT constraints that associates to each exactly one constraint defined as for all , where is the vector assigning to and to . We remark that since all are NAE--SAT, every is a -SAT or -SAT clause.
4.1 Algorithm outline
Algorithm 2 gives our rounding scheme. Throughout its execution, the input instance remains unchanged, as do the parameters , which only depend on and on the fixed universal constant .
The algorithm maintains a Sherali-Adams solution and a partial assignment . At any intermediate point, there are some variables which are completely fixed: these are variables for which has already been determined, and . The remaining variables are the unfixed variables: these are the variables for which , i.e. their assignment is not yet decided. The algorithm is called as where the Sherali-Adams solution is obtained by solving a -degree Sherali-Adams LP for Min-NAE--SAT where will be determined in the analysis below.
On a high level, our algorithm proceeds in stages. At each stage, if the number of unfixed variables is small (specifically ), we simply solve the instance by brute force (line 3). Otherwise, if the value of the instance induced on is small, , we show that the instance is essentially equivalent to -SAT, and solve it using a standard LP-rounding for -SAT (line 9, see Lemma 4.5). The interesting case is when neither of these two cases happens: we proceed via a conditioning step and a thresholding step, followed by a recursive call. In the conditioning step (lines 12-18), the algorithm identifies a small set of variables and an assignment to these variables , and conditions on the event that gets assigned , to obtain a new pseudodistribution . Ideally, this pseudodistribution is such that many of the variables in are -fixed. The thresholding step (lines 19-22) then rounds these variables to their ruling assignment, resulting in a new pseudodistribution . After updating for each newly rounded variable to its already integral value in , the algorithm continues by making a recursive call.
4.2 Analysis
In each stage, after the thresholding step is completed, we will show that the number of unfixed variables (the variables with ) decreases by a constant factor. Hence the number of stages is at most . Thus if we can show that the conditioning and thresholding steps do not increase the value of the Sherali-Adams solution by more than a factor, we would obtain an integral assignment to the variables with a constant-approximation ratio at the end of stages. While it is unclear if such a scheme is possible, we track the growth of the aggregate value , and show that does not increase by more than a factor after each stage. Hence, always remains a constant approximation to ), where is the initial Sherali-Adams solution. By the definition of the aggregate value, a constant-approximation to must imply a -approximation, giving us the desired result. The rest of this section is devoted to formalizing and proving the above statements.
We begin by analyzing the conditioning step. Informally, we show that if we condition on a small random set of variables and a suitable assignment sampled from their local distribution, then many variables will be fixed with good probability in the obtained conditional pseudodistribution. More precisely, we have the following lemma (see full version for proof):
Lemma 4.1 (Conditioning-to-Fixing).
Let be positive integers, let , let , and let . If , , , , , then there exists such that
Next, we analyze the change in the aggregate value from the thresholding step. Informally, we bound the additive increase of the aggregate value after line 22 compared to the aggregate value before line 19. More precisely, we have the following lemma (see full version for proof):
Lemma 4.2 (Thresholding).
Let be a positive integer, let , let such that for all there is satisfying , and let and . Then, there exists such that . Moreover, such a value can be found in time .
The idea is to combine the two lemmas above to ensure that when we reach the base of the recursion we have a pseudodistribution whose aggregate value is within a constant factor of the original one.
Lemma 4.3.
Let , let , let with for all . Then, running Algorithm 2 as must reach line 3 or 9 with integers , a pseudodistribution , and a set such that
Proof.
Notice that before we reach lines 3 or 9, every recursive call to Algorithm 2 involves one conditioning step and one thresholding step. Let us consider in particular a call of Algorithm 2 that starts from a pseudodistribution , and a set of unfixed variables such that neither line 3 nor 9 is reached. Then, the conditioning step produces a pseudodistribution . This step does not change the assignment , or the set of unfixed variables . Next, the thresholding step rounds some variables in and produces a pseudodistribution , and updates the assignment . Let us call this updated assignment and let be the set of unfixed variables with respect to . For the sake of convenience, let us set define , , and . In words, and are defined with respect to the set , whereas is defined with respect to the set obtained after thresholding. We will show two things: first, we argue that , and second we argue that the increase in the aggregate value is at most .
Recall our setting of parameters: , , , , , . Since lines 3 and 9 are not reached, we can assume that and that . By the guarantee of Lemma 4.1 with and , there exists such that
We also observe that for all we have
which follows from the property of conditional expectation111Note that while the conditioning “fixes” the variables we condition on, we still do not add these variables to - this happens only after the thresholding step. Hence, the sets and remain unchanged, and therefore a constraint which contributes to continues to contribute to for all .. This in turn means that
By Markov’s inequality, it follows that
It follows that there exists a choice of and such that we simultaneously have
In particular, we must have
Next, we analyze the rounding step. Note that the pseudo-distribution is obtained by rounding . By using Lemma 4.2 with , it follows that
Note that , since . This gives
Using the fact that , it follows that
Finally, combining the conditioning and rounding steps, we obtain
where the last inequality follows since .
Note that after each step of conditioning and rounding described above, we fix a fraction of the unfixed variables . It follows that after at most such stages of conditioning and thresholding, the distribution and the set of unfixed variables satisfy .
The following two lemmas, whose proofs are deferred to Sections 6.1 and 6.2 respectively, prove the guarantees for the two base cases in Algorithm 2. When the number of unfixed variables becomes sufficiently small (line 3) we can compute the optimal solution using brute force (Lemma 4.4). When is large (line 9), we can simply ignore clauses whose all three variables are unfixed, which reduces the problem to Min-2-SAT (Lemma 4.5) that has a well-known -approximation.
Lemma 4.4 (Brute force base case).
Let , let , let with for all . Also let , and be the degree, the pseudodistribution, the partial assignment and the corresponding set of unfixed variables when Algorithm 2, run as , reaches line 3. Then, the output of line (3) satisfies .
Lemma 4.5 (Min--SAT base case).
Let , let , let with for all . Also let , and be the degree, the pseudodistribution, the partial assignment and the corresponding set of unfixed variables when Algorithm 2, run as , reaches line 9. Then, the output of line (9) satisfies .
We finish the proof of our main result.
Proof of Theorem 1.1.
Let be obtained by solving a Sherali-Adams relaxation. Run Algorithm 2 with as round-pd, where with for all . Lemma 4.3 guarantees that one of lines (3) or (9) is reached with a pseudodistribution and a set of unfixed variables such that . Now there are two cases depending on which line is reached when the algorithm terminates.
For the running time, note that in a given stage of the algorithm involving one conditioning and one thresholding step, the bottleneck is guessing the set of variables and their assignments to condition on. Since , this step takes quasi-polynomial time. There are at most stages by Lemma 4.3, thus the total time remains quasi-polynomial. Finally, we can obtain a degree- Sherali-Adams solution in time. Recall that we solve a -round Sherali-Adams solution to obtain , where . Thus, the running time for this step is quasi-polynomial as well. It follows that the overall running time is quasi-polynomial.
5 Polynomial time algorithm for complete -CSPs
In this section, we show a simple algorithm that, given any complete -variable -CSP instance on the boolean alphabet , and decides if there is a satisfying assignment to in time. This improves the algorithm of [4], which showed a quasi-polynomial time algorithm for any fixed .
The quasi-polynomial time of [4] uses a bound on the number of satisfying assignments of any boolean CSP, proved by the same authors. We use the same tool, which can be stated as follows.
Lemma 5.1 (Lemma 3.1 of [4]).
Let be a complete -CSP. Then, the number of satisfying assignments to is at most .
Our algorithm is very simple. It chooses an ordering of , and it keeps track of all satisfying assignments for the sub-instance induced on the first variables for . Note that the instance induced on the first variables is a complete CSP with variables, hence for any the number of such assignments is at most by Lemma 5.1. At the -th step, we simply try to extend each satisfying assignment by trying and . At the end, it suffices to test if there is a satisfying assignment left. See Algorithm 3 for the pseudocode.
The correctness of the algorithm is immediate. At every stage, the number of satisfying assignments, and hence the size of , is at most . Hence, the algorithm runs in time.
6 Deferred proofs from Section 4
6.1 Proof of Lemma 4.4
In this section we prove the correctness of the base case of the recursion we the execution of Algorithm 2 reaches line 3. The claim is restated below for convenience of the reader.
Lemma 4.4 (Brute force base case). [Restated, see original statement.]
Let , let , let with for all . Also let , and be the degree, the pseudodistribution, the partial assignment and the corresponding set of unfixed variables when Algorithm 2, run as , reaches line 3. Then, the output of line (3) satisfies .
Proof.
Notice that line 3 is reached after at most stages of conditioning and thresholding, by Lemma 4.3. For each conditioning step we lose at most degrees from the Sherali-Adams relaxation. Hence, at this point we have a pseudodistribution where .
This in turn means that the Sherali-Adams solution is a distribution over integral solutions to the unfixed variables . Hence in particular, it follows that there exists an integral assignment to the variables in such that the combined assignment , which assigns to variables of , and the already fixed assignment to the variables , satisfies , and such an assignment would be found by brute force.
6.2 Proof of Lemma 4.5
In this section we show that when the sub-instance induced by the unfixed variables has large objective value, it means that these constraints are not important and we can then focus on solving the Min--SAT instance given by the constraints with one or two fixed variables. The claim is restated below for convenience of the reader.
Lemma 4.5 (Min--SAT base case). [Restated, see original statement.]
Let , let , let with for all . Also let , and be the degree, the pseudodistribution, the partial assignment and the corresponding set of unfixed variables when Algorithm 2, run as , reaches line 9. Then, the output of line (9) satisfies .
Proof.
Notice that line 9 is reached after at most stages of conditioning and thresholding, by Lemma 4.3. For each conditioning step we lose at most degrees from the Sherali-Adams relaxation. Hence, at this point we have a pseudodistribution where .
We now observe that for all , since , the average value of unsatisfied constraints can be bounded as
Now, Algorithm 2 constructs a Min--SAT instance by ignoring constraints which have all their variables from and those constraints which have all their variables from . Hence, every constraint in involves or variables from . We recall that since all are NAE--SAT, every is a -SAT or -SAT clause.
Let be the set of negative literals. For convenience, we will represent this instance as where the set is the multiset of clauses in the instance, corresponding to the constraints . Each -SAT clause in is the disjunction of two literals with . We also allow ourselves to alternatively write -SAT clauses as follows: given where corresponding to variables respectively, we identify with a tuple where are bijections describing the literal pattern of and respectively. More precisely, each of and is identical to one of the mappings or . For example, if we have a clause we might also write it as . Note that this handles -SAT clauses too, since is allowed to equal . Let us further define
to be the average probability with which a clause is unsatisfied. We note that
since each clause has either or variables from , and the remaining variables from (recall that is the sum of the values of the clauses with exactly variables from ).
Our goal will be to show that the Sherali-Adams solution at this point gives a feasible solution for a standard LP relaxation for the Min--SAT instance. If we show this, then by standard results in the literature, we know that the gap for this standard LP relaxation is at most . In turn, this must imply that running the rounding algorithm certifying this gap would give an assignment that violates at most clauses in . Putting it together with by including the constraints with all three variables from , and the constraints with all three variables from , we get an assignment such that the total number of constraints it violates must be at most
which will finish the proof.
We now restrict our attention to showing that the Sherali-Adams solution is feasible for the standard LP relaxation for our Min--SAT instance (see for example [27]), stated below for convenience. This relaxation solves for a metric over the set of literals .
| minimize | |||
| subject to | |||
Notice that this is indeed a relaxation: given any assignment, for each violated clause we set , for every satisfied clause we set , and for every other we obtain by metric completion. Formally, will be the shortest length among all choices of literals such that . In other words, we turn each clause into two implications , and assign the lengths to be if and only if the corresponding implications are unsatisfied, and assign the other distances as the shortest path distance in the graph whose edges are formed by these implications. We have the following standard result from classical approximation algorithms literature.
Theorem 6.1 ([27]).
There is a rounding algorithm that, given any feasible solution to (LP-2-SAT) of objective value , outputs in polynomial time an assignment for which there are at most unsatisfied clauses.
Now we show that given a degree- Sherali-Adams solution with , we can obtain a feasible solution to (LP-2-SAT) whose value is the same as the value of the Sherali-Adams relaxation. We remark that this is a standard fact, but we prove it here for completeness.
Claim 6.2.
Let be an integer and let . Then, one can construct a feasible solution to (LP-2-SAT) with objective value at most .222We note that is a scaling constant since is defined as an average, whereas the objective of (LP-2-SAT) is defined as a sum.
Proof.
The construction is very straightforward. Then, for each , letting be the tuple representation of , we set . In words, the length of the edge is the probability that the implication is falsified in the pseudodistribution . It remains to verify that this solution is feasible. Clearly all the are non-negative, and note that for each we have
and , which means . Next, we check the feasibility of the triangle inequality. Let , and let , , be the tuple representation of , , , respectively. Then
as desired. The LP value of this solution is upper-bounded as
where the last inequality follows from the definition of .
7 Hardness of Min-NAE--SAT on dense instances
We show that solving Min-NAE--SAT exactly on dense instances is almost as hard as on general instances (which is known to be NP-hard [34]).
Claim 7.1.
For any small enough constant , there is an approximation-preserving polynomial time reduction from a general instance of Min-NAE--SAT to a dense instance of Min-NAE--SAT whose constraint hypergraph has at least constraints and every variable appears in at least constraints.
Proof.
Given a general instance of Min-NAE--SAT with variable set with and constraints , add dummy variables. The total number of variables becomes . First, we add constraints on , to make sure that the all-true assignment satisfies them. To ensure this, for every three variables , we add a NAE--SAT clause . Now, we add the constraints between the dummy variables and . For all pairs of variables and variables , add a NAE--SAT constraint . Output the original instance combined with the dummy variables and constraints. The number of constraints is at least , which is at least for a small enough . Moreover, the number of clauses each variable appears in, is at least for a small enough .
For any assignment of the original variables, one can easily satisfy all the dummy constraints by setting all the dummy variables to true. In the other direction, for any assignment of the new instance, changing all dummy variables to true will only satisfy more constraints, so it will possibly violate only the original constraints.
Therefore, the optimal values of the two instances are the same.
References
- [1] Amit Agarwal, Moses Charikar, Konstantin Makarychev, and Yury Makarychev. approximation algorithms for min uncut, min 2cnf deletion, and directed cut problems. In Proceedings of the thirty-seventh annual ACM symposium on Theory of computing, pages 573–581, 2005. doi:10.1145/1060590.1060675.
- [2] Vedat Levi Alev, Fernando Granha Jeronimo, and Madhur Tulsiani. Approximating constraint satisfaction problems on high-dimensional expanders. In 2019 IEEE 60th Annual Symposium on Foundations of Computer Science (FOCS), pages 180–201. IEEE, 2019. doi:10.1109/FOCS.2019.00021.
- [3] Noga Alon, W Fernandez De La Vega, Ravi Kannan, and Marek Karpinski. Random sampling and approximation of MAX-CSPs. Journal of computer and system sciences, 67(2):212–243, 2003. doi:10.1016/S0022-0000(03)00008-4.
- [4] Aditya Anand, Euiwoong Lee, and Amatya Sharma. Min-csps on complete instances. In Proceedings of the 2025 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1178–1201. SIAM, 2025. doi:10.1137/1.9781611978322.35.
- [5] Sanjeev Arora, David Karger, and Marek Karpinski. Polynomial time approximation schemes for dense instances of NP-hard problems. In Proceedings of the twenty-seventh annual ACM symposium on Theory of computing, pages 284–293, 1995. doi:10.1145/225058.225140.
- [6] Sanjeev Arora, Subhash A Khot, Alexandra Kolla, David Steurer, Madhur Tulsiani, and Nisheeth K Vishnoi. Unique games on expanding constraint graphs are easy. In Proceedings of the fortieth annual ACM symposium on Theory of computing, pages 21–28, 2008.
- [7] Mitali Bafna, Boaz Barak, Pravesh K Kothari, Tselil Schramm, and David Steurer. Playing unique games on certified small-set expanders. In Proceedings of the 53rd Annual ACM SIGACT Symposium on Theory of Computing, pages 1629–1642, 2021. doi:10.1145/3406325.3451099.
- [8] Boaz Barak, Moritz Hardt, Thomas Holenstein, and David Steurer. Subsampling mathematical relaxations and average-case complexity. In Proceedings of the twenty-second annual ACM-SIAM symposium on Discrete Algorithms, pages 512–531. SIAM, 2011. doi:10.1137/1.9781611973082.41.
- [9] Boaz Barak, Prasad Raghavendra, and David Steurer. Rounding semidefinite programming hierarchies via global correlation. In 2011 ieee 52nd annual symposium on foundations of computer science, pages 472–481. IEEE, 2011. doi:10.1109/FOCS.2011.95.
- [10] Cristina Bazgan, W Fernandez de La Vega, and Marek Karpinski. Polynomial time approximation schemes for dense instances of minimum constraint satisfaction. Random Structures & Algorithms, 23(1):73–91, 2003. doi:10.1002/rsa.10072.
- [11] Joshua Brakensiek, Neng Huang, Aaron Potechin, and Uri Zwick. On the mysteries of max nae-sat. In Proceedings of the 2021 ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 484–503. SIAM, 2021. doi:10.1137/1.9781611976465.30.
- [12] Joshua Brakensiek, Neng Huang, and Uri Zwick. Tight approximability of max 2-sat and relatives, under ugc. In Proceedings of the 2024 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1328–1344. SIAM, 2024. doi:10.1137/1.9781611977912.53.
- [13] Nairen Cao, Vincent Cohen-Addad, Euiwoong Lee, Shi Li, Alantha Newman, and Lukas Vogl. Understanding the cluster LP for correlation clustering. In Proceedings of the 56th Annual ACM SIGACT Symposium on Theory of Computing, 2024.
- [14] Amin Coja-Oghlan, Colin Cooper, and Alan Frieze. An efficient sparse regularity concept. SIAM Journal on Discrete Mathematics, 23(4):2000–2034, 2010. doi:10.1137/080730160.
- [15] W Fernandez de la Vega, Marek Karpinski, Ravi Kannan, and Santosh Vempala. Tensor decomposition and approximation schemes for constraint satisfaction problems. In Proceedings of the thirty-seventh annual ACM symposium on Theory of computing, pages 747–754, 2005.
- [16] Wenceslas Fernandez de la Vega and Claire Kenyon-Mathieu. Linear programming relaxations of maxcut. In Proceedings of the eighteenth annual ACM-SIAM symposium on Discrete algorithms, pages 53–61. Citeseer, 2007. URL: http://dl.acm.org/citation.cfm?id=1283383.1283390.
- [17] Dimitris Fotakis, Michail Lampis, and Vangelis Paschos. Sub-exponential approximation schemes for CSPs: From dense to almost sparse. In 33rd Symposium on Theoretical Aspects of Computer Science (STACS 2016), pages 37–1, 2016.
- [18] Alan Frieze and Ravi Kannan. The regularity lemma and approximation schemes for dense problems. In Proceedings of 37th conference on foundations of computer science, pages 12–20. IEEE, 1996. doi:10.1109/SFCS.1996.548459.
- [19] Venkatesan Guruswami and Ali Kemal Sinop. Lasserre hierarchy, higher eigenvalues, and approximation schemes for graph partitioning and quadratic integer programming with psd objectives. In 2011 IEEE 52nd Annual Symposium on Foundations of Computer Science, pages 482–491. IEEE, 2011. doi:10.1109/FOCS.2011.36.
- [20] Johan Håstad. Some optimal inapproximability results. Journal of the ACM (JACM), 48(4):798–859, 2001. doi:10.1145/502090.502098.
- [21] Fernando Granha Jeronimo, Dylan Quintana, Shashank Srivastava, and Madhur Tulsiani. Unique decoding of explicit -balanced codes near the gilbert-varshamov bound. In Sandy Irani, editor, 61st IEEE Annual Symposium on Foundations of Computer Science, FOCS 2020, Durham, NC, USA, November 16-19, 2020, pages 434–445. IEEE, IEEE, 2020. doi:10.1109/FOCS46700.2020.00048.
- [22] Fernando Granha Jeronimo, Shashank Srivastava, and Madhur Tulsiani. Near-linear time decoding of ta-shma’s codes via splittable regularity. In Proceedings of the 53rd Annual ACM SIGACT Symposium on Theory of Computing, pages 1527–1536, 2021. doi:10.1145/3406325.3451126.
- [23] Marek Karpinski and Warren Schudy. Linear time approximation schemes for the Gale-Berlekamp game and related minimization problems. In Proceedings of the forty-first annual ACM symposium on Theory of computing, pages 313–322, 2009. doi:10.1145/1536414.1536458.
- [24] Sanjeev Khanna, Madhu Sudan, Luca Trevisan, and David P Williamson. The approximability of constraint satisfaction problems. SIAM Journal on Computing, 30(6):1863–1920, 2001. doi:10.1137/S0097539799349948.
- [25] Subhash Khot. On the power of unique 2-prover 1-round games. In Proceedings of the thiry-fourth annual ACM symposium on Theory of computing, pages 767–775, 2002. doi:10.1145/509907.510017.
- [26] Subhash Khot, Guy Kindler, Elchanan Mossel, and Ryan O’Donnell. Optimal inapproximability results for MAX-CUT and other 2-variable CSPs? SIAM Journal on Computing, 37(1):319–357, 2007. doi:10.1137/S0097539705447372.
- [27] Philip N Klein, Serge A Plotkin, Satish Rao, and Eva Tardos. Approximation algorithms for Steiner and directed multicuts. Journal of Algorithms, 22(2):241–269, 1997. doi:10.1006/jagm.1996.0833.
- [28] Michael Lewin, Dror Livnat, and Uri Zwick. Improved rounding techniques for the max 2-sat and max di-cut problems. In International Conference on Integer Programming and Combinatorial Optimization, pages 67–82. Springer, 2002. doi:10.1007/3-540-47867-1_6.
- [29] Pasin Manurangsi and Dana Moshkovitz. Approximating dense max 2-CSPs. Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques, page 396, 2015.
- [30] Claire Mathieu and Warren Schudy. Yet another algorithm for dense max cut: go greedy. In Proceedings of the nineteenth annual ACM-SIAM symposium on Discrete algorithms, pages 176–182, 2008. URL: http://dl.acm.org/citation.cfm?id=1347082.1347102.
- [31] Antoine Méot, Arnaud de Mesmay, Moritz Mühlenthaler, and Alantha Newman. Voting algorithms for unique games on complete graphs. In Symposium on Simplicity in Algorithms (SOSA), pages 124–136. SIAM, 2023. doi:10.1137/1.9781611977585.ch12.
- [32] Shayan Oveis Gharan and Luca Trevisan. A new regularity lemma and faster approximation algorithms for low threshold rank graphs. In International Workshop on Approximation Algorithms for Combinatorial Optimization, pages 303–316. Springer, 2013. doi:10.1007/978-3-642-40328-6_22.
- [33] Prasad Raghavendra and Ning Tan. Approximating csps with global cardinality constraints using SDP hierarchies. In Yuval Rabani, editor, Proceedings of the Twenty-Third Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2012, Kyoto, Japan, January 17-19, 2012, pages 373–387. SIAM, 2012. doi:10.1137/1.9781611973099.33.
- [34] Thomas J. Schaefer. The complexity of satisfiability problems. In Proceedings of the Tenth Annual ACM Symposium on Theory of Computing, STOC ’78, pages 216–226, New York, NY, USA, 1978. Association for Computing Machinery. doi:10.1145/800133.804350.
- [35] Grigory Yaroslavtsev. Going for speed: Sublinear algorithms for dense -CSPs. arXiv preprint arXiv:1407.7887, 2014. arXiv:1407.7887.
- [36] Yuichi Yoshida and Yuan Zhou. Approximation schemes via sherali-adams hierarchy for dense constraint satisfaction problems and assignment problems. In Moni Naor, editor, Innovations in Theoretical Computer Science, ITCS’14, Princeton, NJ, USA, January 12-14, 2014, pages 423–438. ACM, 2014. doi:10.1145/2554797.2554836.
