betaFeedback

WorksComputer Science

A One-Sided Sublinear-Query Tester for Bounded-Degree 2SAT

Abstract

We give a one-sided tester for satisfiability of 2CNF formulas in the bounded-degree model. For every degree bound ΔΔ, distance parameter ε>0\varepsilon>0, and ν∈(0,1/2)ν\in(0,1/2), its query complexity on nn-variable formulas is O~ε,Δ,ν(n1/2+ν)\widetilde O_{\varepsilon,Δ,ν}(n^{1/2+ν}).

Introduction

We study whether satisfiability of bounded-degree 2CNF formulas can be tested with a sublinear number of queries. This is a question in property testing, where the goal is to distinguish inputs having a property from those far from having it by inspecting only a small part of the input. For general background, we refer to the books by Goldreich [10] and Bhattacharyya and Yoshida [5].

As a basic example, in the bounded-degree model [12], Goldreich and Ron gave a one-sided tester for bipartiteness with O~(n)\widetilde{O}(\sqrt{n}) queries and proved an Ω(n)\Omega(\sqrt{n}) lower bound, where nn is the number of vertices [11, 12]. Bipartiteness is a constraint satisfaction problem (CSP): each vertex is a Boolean variable, and each edge requires its endpoints to take different values. More generally, a CSP specifies a finite domain of values and a finite collection of allowed constraint types. An instance consists of variables and constraints of these types, and asks whether an assignment satisfies all constraints. The degree of a variable is the number of constraints containing it. This setting includes 3LIN, whose constraints are linear equations modulo two on three variables. In contrast to bipartiteness, testing satisfiability of bounded-degree 3LIN requires Ω(n)\Omega(n) queries, where nn is now the number of variables [6]. The same linear lower bound holds for bounded-degree 3SAT, where clauses contain at most three literals [6].

A useful distinction between these problems comes from algorithms based on local consistency. Such algorithms maintain candidate assignments to small sets of variables. They repeatedly discard candidates that violate an input constraint or cannot be extended consistently with the candidates on another small set. A CSP has bounded width if this process decides satisfiability for all its instances while considering sets of at most a constant number of variables; the constant may depend on the allowed constraint types but not on the instance size [4]. For example, in bipartiteness, x≠yx \ne y and y≠zy \ne z imply x=zx = z. Propagating such relations between pairs detects the contradiction around any odd cycle. Thus bipartiteness has bounded width, even though the propagation may traverse the whole graph. Bounded width limits the number of variables considered together, not the amount of input read or the number of propagation steps.

At the simplest level, width 1, it suffices to propagate the allowed values of individual variables through the constraints. It is known that CSPs of width 1 admit constant-query testers [16, 14]. This propagation, however, does not suffice for bipartiteness. To see this, initialize each vertex of an odd cycle with both possible colors. Each color at either endpoint of an edge is compatible with the opposite color at the other endpoint, so this propagation removes no colors and fails to detect unsatisfiability. Bipartiteness is a special case of 2SAT, since x≠yx \ne y is equivalent to (x∨y)∧(x‾∨y‾)(x \lor y) \land(\overline{x} \lor\overline{y}). Both problems have bounded width but not width 1: it suffices to maintain candidate assignments to pairs and repeatedly check that they extend consistently to each third variable. This is called width (2,3)(2,3) [4].

In contrast, 3LIN has unbounded width. More generally, Fei proved an Ω(n)\Omega(n) query lower bound for every unbounded-width CSP and asked whether every bounded-width CSP admits a sublinear-query tester [8 Question 12]. Beyond bipartiteness, 2SAT is a basic case of this question. It is known that testing 2SAT requires Ω(n)\Omega(\sqrt{n}) queries [16], but the bipartiteness tester does not give an algorithm for general 2SAT. Fei and Rubinfeld also asked whether 2SAT admits a sublinear-query satisfiability tester [9 full version, Section 1.3].

In this paper, we answer this question affirmatively for 2SAT: For constant degree bound and distance parameter, we give a one-sided tester with O~(n1/2+ν)\widetilde{O}(n^{1/2+\nu}) queries for every constant ν∈(0,1/2)\nu\in(0,1/2).

To state our main theorem precisely, we specify the input model and distance measure. The input FF is a 2CNF formula on n≥1n \ge1 Boolean variables labeled by [n]:={1,…,n}[n] := \{1,\ldots,n\}: a conjunction of nonempty clauses, each containing at most two literals.2 We identify (a∨a)(a \lor a) with the unit clause (a)(a) and allow tautologies. We assume throughout that no clause is repeated.3 The size nn and the degree bound Δ\Delta are given to the tester. Each variable belongs to at most Δ\Delta clauses and has Δ\Delta incidence slots containing its incident clauses or null symbols. Unused slots may occur anywhere in the list. A query (x,i)(x,i), with x∈[n]x \in[n] and 1≤i≤Δ1 \le i \le\Delta, returns the clause in slot ii, including its variables and literal signs, or the null symbol if that slot is unused. Let τ(F)\tau(F) denote the minimum number of clauses that must be deleted to make FF satisfiable, equivalently the minimum number of clauses violated by an assignment. We call FF ε\varepsilon-far if τ(F)≥εΔn\tau(F) \ge\varepsilon\Delta n. A one-sided ε\varepsilon-tester accepts every satisfiable formula with probability one and rejects every ε\varepsilon-far formula with probability at least 2/32/3.

Our main result is the following.

Theorem 1.1. For every Δ≥1\Delta\ge1, ε>0\varepsilon> 0, and 0<ν<1/20 < \nu< 1/2, there is a one-sided ε\varepsilon-tester for satisfiability of nn-variable 2CNF formulas of maximum degree at most Δ\Delta in the bounded-degree model, with query complexity

O~ε,Δ,ν(n1/2+ν).\widetilde{O}_{\varepsilon,\Delta,\nu}\left(n^{1/2+\nu}\right).

The Ω(n)\Omega(\sqrt{n}) lower bound [16] shows that the dependence on nn is optimal up to an arbitrarily small polynomial factor.

The picture changes for tolerant testing of 2SAT, which also requires acceptance of formulas that are close to satisfiable. In fact, known lower bounds [15, 7] imply that, for some constants 0<ε1<ε20 < \varepsilon_1 < \varepsilon_2, Δ≥1\Delta\ge1, and c>0c > 0, distinguishing nn-variable 2CNF formulas of maximum degree at most Δ\Delta with τ(F)≤ε1Δn\tau(F) \le\varepsilon_1\Delta n from those with τ(F)≥ε2Δn\tau(F) \ge\varepsilon_2\Delta n requires Ω(n1/2+c)\Omega(n^{1/2+c}) queries. § 1.2 gives the reduction to 2SAT. Thus, the guarantee for every fixed 0<ν<1/20 < \nu< 1/2 in Theorem 1.1 depends on requiring acceptance only of satisfiable formulas.

Technical overview

We describe the tester for E2SATE2SAT, where each clause contains literals on two distinct variables. A local reduction handles general 2SAT (§ 6.4). To analyze rejection on far inputs, we assume that every assignment violates at least a constant δ>0\delta> 0 fraction of the clauses.

The implication graph of FF has a vertex for each literal and arcs aˉ→b\bar{a} \to b and bˉ→a\bar{b} \to a for each clause (a∨b)(a \lor b). Paths s⇝sˉs \leadsto\bar{s} and sˉ⇝s\bar{s} \leadsto s rule out both truth values of ss, so their clauses are unsatisfiable. Conversely, every unsatisfiable 2CNF formula contains such paths [3]. Our tester therefore searches for this certificate using only a small part of the formula.

Finding contradictions by endpoint collisions. Following [17], we search for contradictory paths by sampling forward walks. For every implication u→vu \to v, the graph also contains vˉ→uˉ\bar{v} \to\bar{u}. Thus, if two walks from ss end at complementary literals z,zˉz,\bar{z}, reversing and complementing the second path gives z⇝sˉz \leadsto\bar{s}. Joining it to the first path gives s⇝sˉs \leadsto\bar{s}.

The tester. The tester uses clause weights we∈(0,1]w_e \in(0,1], whose construction is outlined later in this overview. It repeats the following trial a prescribed number of times.

  1. Sample a seed. Choose a clause with probability proportional to its weight, choose one of its two literals uniformly, and take its complement as the seed ss.

  1. Explore from both ss and sˉ\bar{s}.* Run four independent batches of lazy forward walks, two from each starting literal, with independent geometric stopping and expected length O(log⁡n)O(\log n). For a non-lazy step from ℓ\ell, select a clause containing ℓˉ\bar{\ell} with probability proportional to its weight and follow its implication to the other literal. Retain the paths as well as their endpoints.

  1. Look for a contradiction.* In the two batches from ss, look for an endpoint in one batch whose complement occurs in the other. Perform the same check for the two batches from sˉ\bar{s}. If both checks succeed, reject and output the paths s⇝sˉ⇝ss \leadsto\bar{s} \leadsto s obtained by reversing and complementing paths as above (Figure 1). Otherwise try a new seed.

Recovering a contradiction from four forward paths

Figure 1. Recovering a contradiction from four forward paths. In the first row, two paths from ss end at complementary literals zz, zˉ\bar{z}; in the second, two paths from sˉ\bar{s} end at complementary literals uu, uˉ\bar{u}. Reversing and complementing each dashed path gives the dashed segment on the right. Every arrow between literal nodes denotes an implication path. Together, the two rows give s⇝sˉ⇝ss \leadsto\bar{s} \leadsto s, using only clauses on the sampled paths.

If all trials finish without a contradiction, accept. Every rejection produces an unsatisfiable set of input clauses, so satisfiable inputs are always accepted. The main issue is to choose locally computable weights that make these trials succeed on far inputs within the query budget.

Measuring the chance of finding a contradiction. Let L\mathcal{L} be the literal set. For each s∈Ls \in\mathcal{L}, let ps:L→[0,1]p_s : \mathcal{L} \to[0,1] be the endpoint probability mass function of a walk from ss. Define the affinity function a:L→[0,1]a : \mathcal{L} \to[0,1] by

a(s):=∑ℓ∈Lps(ℓ)ps(ℓˉ).a(s) := \sum_{\ell\in\mathcal{L}} \sqrt{p_s(\ell)p_s(\bar{\ell})}.

Thus a(s)a(s) is the Hellinger affinity between psp_s and its complemented distribution. The collision bound of Yoshida [17 Lemma 2.1] implies that constant a(s)a(s) suffices to find complementary endpoints with O(n)O(\sqrt{n}) walks; the cost for smaller a(s)a(s) grows polynomially in 1/a(s)1/a(s). For completeness, we prove this bound in Lemma 6.3. However, to apply this collision bound in both directions for the same seed, we seek lower bounds on both a(s)a(s) and a(sˉ)a(\bar{s}). We therefore define the two-way affinity B∈[0,1]B \in[0,1] by

B:=Esmin⁡{a(s),a(sˉ)},B := \mathbb{E}_s \min\{a(s),a(\bar{s})\},

where the expectation is over the seed distribution. The minimum makes each seed contribute only as much as its weaker direction allows. Our task is to choose walks and seeds so that BB is large on every far input, while keeping the sampling cost small.

Choosing weights that can be used locally. Let mm be the number of clauses. We use clause weights to define both the walks and the seed distribution. Write a clause (uˉ∨vˉ)(\bar{u} \vee\bar{v}) as a pair e={u,v}⊆Le = \{u,v\} \subseteq\mathcal{L}, with endpoints u,vu,v; it is violated exactly when both endpoints are true. For a weight vector w∈R≥0mw \in\mathbb{R}_{\ge0}^{m} with positive total weight, let π:=w/∑ewe∈[0,1]m\pi:= w/\sum_e w_e \in[0,1]^m be the corresponding clause probability distribution. Sampling a clause from π\pi and choosing one of its endpoints uniformly gives the literal distribution μπ:L→[0,1]\mu_\pi:\mathcal{L}\to[0,1] defined by

μπ(ℓ):=12∑e∋ℓπe.\mu_\pi(\ell) := \frac{1}{2}\sum_{e\ni\ell}\pi_e.

Thus the seed distribution is μπ\mu_\pi, which need not be stationary. The walk uses the same weights for its implication transitions.

The analysis of [17] uses weights for which μπ\mu_\pi is stationary and gives equal mass to complementary literals. We call the weights balanced if μπ(ℓ)=μπ(ℓˉ)\mu_\pi(\ell)=\mu_\pi(\bar{\ell}) for every literal ℓ\ell. One implication step from μπ\mu_\pi ends at ℓ\ell with probability μπ(ℓˉ)\mu_\pi(\bar{\ell}). Thus balance makes μπ\mu_\pi stationary for both the implication walk and its lazy version.

Uniform weights need not be balanced. Changing weights to improve balance, however, could make the clauses responsible for unsatisfiability carry too little weight. Moreover, computing the weights by reading the entire formula would defeat the purpose of a sublinear-query tester. We therefore seek locally computable weights with small imbalance and a positive lower bound on the fraction of total weight carried by clauses violated by any assignment.

We obtain these properties by choosing a family of clause-weight vectors w(z)∈(0,1]mw(z)\in(0,1]^m, parameterized by z∈Rnz\in\mathbb{R}^n, together with a convex objective Φ:Rn→R≥0\Phi:\mathbb{R}^n\to\mathbb{R}_{\ge0}. The coordinates zxz_x are indexed by variables, and the weights we(z)w_e(z) are indexed by clauses. To express imbalance in terms of clause weights, define the weighted degree dw:L→R≥0d_w:\mathcal{L}\to\mathbb{R}_{\ge0} by dw(ℓ):=∑e∋ℓwed_w(\ell):=\sum_{e\ni\ell}w_e. Since μπ(ℓ)=dw(ℓ)/(2∑ewe)\mu_\pi(\ell)=d_w(\ell)/(2\sum_e w_e), balance is equivalent to dw(x)=dw(xˉ)d_w(x)=d_w(\bar{x}) for every variable xx. We choose ww and Φ\Phi so that

∂Φ∂zx(z)=−(dw(z)(x)−dw(z)(xˉ)).\frac{\partial\Phi}{\partial z_x}(z)=-(d_{w(z)}(x)-d_{w(z)}(\bar{x})).

Thus small gradients mean small imbalance. Starting from z=0z=0, which gives uniform weights, gradient descent keeps Φ(z)≤Φ(0)=m\Phi(z)\le\Phi(0)=m. We design Φ\Phi and w(z)w(z) so that this inequality also prevents any assignment from violating clauses of too little weight (Lemma 3.1).

To see the idea, extend zz to literals by zxˉ:=−zxz_{\bar{x}}:=-z_x. We choose the weights so that a clause e={u,v}e=\{u,v\} has very small weight only when zu+zvz_u+z_v is large and positive. Such a clause has an endpoint ℓ\ell with large positive zℓz_\ell. Making this endpoint false satisfies the clause. Given an assignment with small weighted loss, we therefore reassign variables with large ∣zx∣\lvert z_x\rvert in this way. A random threshold determines which variables to reassign: clauses on unchanged variables have weights bounded below, while Φ(z)≤m\Phi(z)\le m controls the expected number of violations involving reassigned variables. If the original weighted loss were sufficiently small, some choice of threshold would yield an assignment violating fewer than δm\delta m clauses, contradicting the assumption on FF.

Descent controls the imbalance averaged over iterations, but selecting a good iterate by measuring its total imbalance would require global information. Instead, the tester uses the average of the clause weights we(z)w_e(z) over the iterates. For each assignment, the total weight of violated clauses is linear in the clause weights, so averaging preserves its lower bound. At the same time, averaging makes the relative imbalance,

References

  1. [1]N. Alon and A. Shapira. Testing satisfiability. Journal of Algorithms, 47(2):87–103, 2003.
  2. [2]G. Andersson and L. Engebretsen. Property testers for dense constraint satisfaction programs on finite domains. Random Structures & Algorithms, 21(1):14–32, 2002.DOI
  3. [3]B. Aspvall, M. F. Plass, and R. E. Tarjan. A linear-time algorithm for testing the truth of certain quantified Boolean formulas. Information Processing Letters, 8(3):121–123, 1979.
  4. [4]L. Barto, A. Krokhin, and R. Willard. Polymorphisms, and how to use them. In The Constraint Satisfaction Problem: Complexity and Approximability, volume 7 of Dagstuhl Follow-Ups, pages 1–44. Schloss Dagstuhl–Leibniz-Zentrum für Informatik, 2017.DOI
  5. [5]A. Bhattacharyya and Y. Yoshida. Property Testing: Problems and Techniques. Springer, 2022.
  6. [6]A. Bogdanov, K. Obata, and L. Trevisan. A lower bound for testing 3-colorability in bounded-degree graphs. In Proceedings of the 43rd Annual IEEE Symposium on Foundations of Computer Science (FOCS), pages 93–102, 2002.DOI
  7. [7]A. Chiplunkar, M. Kapralov, S. Khanna, A. Mousavifar, and Y. Peres. Testing graph clusterability: Algorithms and lower bounds. In Proceedings of the 59th Annual IEEE Symposium on Foundations of Computer Science (FOCS), pages 497–508, 2018. Full version: arXiv:1808.04807.arxiv.org/abs/1808.04807
  8. [8]Y. Fei. Unbounded-width CSPs are untestable in a sublinear number of queries. In Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques (APPROX/RANDOM 2026), volume 392 of Leibniz International Proceedings in Informatics (LIPIcs), pages 31:1–31:9, 2026.
  9. [9]Y. Fei and R. Rubinfeld. Testing bipartiteness in logarithmic rounds. In Proceedings of the 38th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), 2027. To appear. Full version: arXiv:2606.13583.arxiv.org/abs/2606.13583
  10. [10]O. Goldreich. Introduction to Property Testing. Cambridge University Press, 2017.DOI
  11. [11]O. Goldreich and D. Ron. A sublinear bipartiteness tester for bounded degree graphs. Combinatorica, 19(3):335–373, 1999.
  12. [12]O. Goldreich and D. Ron. Property testing in bounded degree graphs. Algorithmica, 32(2):302–343, 2002.
  13. [13]M. R. Krom. The decision problem for a class of first-order formulas in which all disjunctions are binary. Zeitschrift für Mathematische Logik und Grundlagen der Mathematik, 13:15–20, 1967.DOI
  14. [14]G. Kun, R. O’Donnell, S. Tamaki, Y. Yoshida, and Y. Zhou. Linear programming, width-1 CSPs, and robust satisfaction. In Proceedings of the 3rd Innovations in Theoretical Computer Science Conference (ITCS), pages 484–495, 2012.DOI
  15. [15]Y. Yoshida. Lower bounds on query complexity for testing bounded-degree CSPs. In Proceedings of the 26th Annual IEEE Conference on Computational Complexity (CCC), pages 34–44, 2011.arxiv.org/abs/1007.3292
  16. [16]Y. Yoshida. Optimal constant-time approximation algorithms and (unconditional) inapproximability results for every bounded-degree CSP. In Proceedings of the 43rd Annual ACM Symposium on Theory of Computing (STOC), pages 665–674, 2011.
  17. [17]Y. Yoshida. Sublinear-Time One-Sided Testing for Bounded-Degree Max E2SAT[1, 3/4 + ε]. Unpublished manuscript. https://researchmap.jp/yoshida/misc/55457486/attachment_file.pdf, July 13 2026.

Paper details

vlnc:W_tg543gfw
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 10

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents