Abstract
Generating uniform samples and counting satisfying assignments for $k$-SAT formulas are fundamental problems in theoretical computer science. While the Lovász Local Lemma (LLL) provides conditions under which solutions are guaranteed to exist, traditional Markov Chain Monte Carlo (MCMC) methods often fail due to the "connectivity barrier," where the solution space shatters into disjoint components. This paper presents a novel MCMC approach that operates on the marginal distribution of a subset of variables. By leveraging a variable marking strategy and a new path-coupling analysis based on induced paths, the authors achieve near-linear time for sampling and near-quadratic time for counting, significantly improving upon previous state-of-the-art results.
Introduction
The $k$-SAT problem—determining the satisfiability of a Boolean formula in conjunctive normal form—is a central challenge in computational complexity. In the regime governed by the Lovász Local Lemma (LLL), where clause overlaps are bounded, solutions are guaranteed to exist. However, the tasks of sampling (generating a satisfying assignment uniformly at random) and counting (estimating the total number of satisfying assignments, or #SAT) remain computationally intensive.
Historically, these tasks have been approached using Glauber dynamics, a Markov chain that transitions between solutions by flipping individual variables. However, in many $k$-SAT instances, the space of satisfying assignments is "shattered" into many disconnected components. This lack of connectivity prevents standard Markov chains from converging to the correct distribution, creating a significant barrier to efficient sampling.
Methodology: Marginal Glauber Dynamics
The authors introduce a technique to sidestep the connectivity issue by shifting the focus from the full assignment space to a projected marginal distribution.
Variable Marking and Projection
Using the Moser-Tardos algorithm as a foundation, the authors partition the formula's variables into two sets: "marked" and "unmarked." The marking is designed such that every clause contains a sufficient number of both types. The core insight is that while the full solution space may be disconnected, its projection onto the marked variables remains connected (ergodic). The unmarked variables effectively act as a "buffer," absorbing constraints and allowing the Markov chain to move freely between states that would otherwise be isolated.
Efficient Approximation
Running a Markov chain on marginals requires calculating transition probabilities, which is generally #P-hard. To overcome this, the authors implement a Sample subroutine. When the marked variables are fixed, the remaining sub-formula on unmarked variables decomposes into small, independent components. The algorithm uses simple rejection sampling on these components to estimate the marginal probabilities efficiently.
Counting via Simulated Annealing
For the counting problem, the sampling algorithm is integrated into a non-adaptive simulated annealing framework. By gradually introducing constraints and estimating the ratio of satisfying assignments at each step, the authors can approximate the total partition function (the number of solutions) with high precision.
Theoretical Contributions
A key technical contribution of this work is the proof of rapid mixing. To show that the Markov chain converges in $O(n \log n)$ time, the authors developed a new analytical technique using path coupling with induced paths. This method analyzes dependencies in a graph of clauses and provides a more robust bound than the tree-based analyses used in earlier literature.
Results and Comparison
The proposed algorithms offer a significant performance leap over previous methods, such as the landmark work by Moitra (2019).
- Complexity: While previous state-of-the-art methods had running times where the exponent grew with the variable degree $d$ and clause size $k$ (e.g., $n^{O(d^2 k^2)}$), this algorithm is fixed-parameter tractable. The exponent remains constant regardless of $d$ and $k$.
- Sampling Speed: For formulas satisfying $k \ge 20 \log k + 20 \log d + 60$, the sampling algorithm achieves near-linear time ($n^{1+\zeta}$).
- Counting Speed: The counting algorithm achieves near-quadratic time ($n^{2+\zeta}$).
Conclusion and Future Work
This research demonstrates that the connectivity barrier in $k$-SAT is not an insurmountable obstacle for MCMC methods, provided the chain is constructed on the correct projection of the state space. While a gap remains between the conditions required for this algorithm ($k \approx 20 \log d$) and the theoretical LLL limit ($2^k > ed$), this work provides the fastest known randomized algorithms for sampling and counting in this regime. Future research may explore "dynamic marking"—where the set of marked variables evolves during the sampling process—to further close the gap toward the LLL threshold.
Summary updated