Abstract
Generating good benchmarks is important for the evaluation and improvement of any algorithm for NP-hard problems such as the Boolean satisfiability (SAT) problem. Carefully designed benchmarks are also helpful in the study of the nature of NP-completeness. In this paper, we consider how to create 3-SAT formulas that look like random but with specific solution structures. In particular, we show that random 3-SAT formulas do not have their solutions distributed randomly in the solution space and we further develop generators to build random 3-SAT formulas with randomly distributed solutions or a fixed number of solutions.
Introduction
In the field of computational complexity, the Boolean satisfiability (SAT) problem serves as a primary benchmark for evaluating algorithmic performance. Researchers frequently rely on "random k-SAT" models to test solvers. However, these standard random formulas often harbor hidden structural properties—such as "backbones" (variables that must maintain the same value in every valid solution)—that do not accurately reflect truly random solution distributions. This paper addresses the paradox of creating "random" SAT problems that are engineered to possess specific internal structures while remaining indistinguishable from standard benchmarks.
The Challenge of Controlled Randomness
Existing benchmark generators suffer from two primary limitations:
- Lack of Control: Standard generators do not allow researchers to specify the exact number of solutions or their spatial distribution within the solution space.
- Detection: Manually "hard-coding" a specific solution structure often results in formulas that appear non-random under statistical analysis, making them poor proxies for general-purpose problem instances.
The goal is to create a generator that produces formulas that are statistically "stealthy" but structurally bespoke, effectively passing a "Turing test" for SAT instance randomness.
Methodology: A Two-Phase Approach
The authors propose a two-phase generation process to create a 3-SAT formula with $n$ variables, $m$ clauses, and $S$ solutions.
Phase I: Generating a Random Core
Instead of generating the full problem at once, the process begins with a "random core." The generator creates a uniform random 3-SAT formula with a small number of variables ($k \approx 10$). Due to the low variable count, exhaustive search can be used to identify every possible solution to this core.
Phase II: Sculpting the Solution Space
The remaining $n - k$ variables are added incrementally. For each new variable, the generator tracks the growth of the solution database. To maintain the target number of solutions $S$, the generator injects 2-literal and 1-literal clauses to prune the solution space.
To ensure the final product mimics a standard 3-SAT instance, these 1- and 2-literal clauses are eventually transformed into 3-literal clauses. This "statistical camouflage" involves carefully selecting literals to match the frequency and negation ratios of truly random formulas.
Evaluating Solution Distribution
To measure how "randomly" solutions are distributed, the authors utilize the Hamming distance—the number of positions at which the bits of two solutions differ. A key finding of the research is that standard uniform random 3-SAT formulas (Suite I) actually have solutions that are less randomly distributed than a purely random selection of points in the solution space.
By contrast, the authors' method allows for the creation of instances where the solutions are distributed according to a near-perfect Gaussian "bell curve," which is more representative of a truly random distribution of points.
Key Results
The paper evaluates several "Suites" of benchmarks, all standardized to 50 variables and 218 clauses. Suite I contains standard random instances, while Suites II and III contain bespoke instances generated with the new method.
As shown in the results, the generated instances (Suites II and III) passed all standard randomness tests, proving that specific solution structures can be embedded without leaving a statistical "fingerprint." Ironically, the formulas generated to have specific structures (Figure 4) showed a solution distribution that more closely matched a perfect Gaussian curve than the standard uniform random models, which often exhibit clusters of solutions at low Hamming distances.
Conclusion
This research demonstrates that it is possible to generate SAT instances with high structural control while maintaining the appearance of statistical randomness. By "hiding" specific solution space structures inside formulas that pass standard tests, researchers can create more nuanced and challenging benchmarks for the next generation of SAT solvers. Future work may involve scaling the "core" search or embedding even more complex structures, such as solution clusters or islands.
Summary updated