https://github.com/tchaumeny/satisfaction
Investigate phase transitions in k-SAT problems
https://github.com/tchaumeny/satisfaction
2-sat 3-sat computer-science phase-transitions sat-solver satisfiability
Last synced: about 2 months ago
JSON representation
Investigate phase transitions in k-SAT problems
- Host: GitHub
- URL: https://github.com/tchaumeny/satisfaction
- Owner: tchaumeny
- Created: 2025-01-05T19:27:17.000Z (4 months ago)
- Default Branch: master
- Last Pushed: 2025-01-05T19:54:31.000Z (4 months ago)
- Last Synced: 2025-01-18T21:36:22.076Z (4 months ago)
- Topics: 2-sat, 3-sat, computer-science, phase-transitions, sat-solver, satisfiability
- Language: Rust
- Homepage:
- Size: 87.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-rust-formalized-reasoning - Satisfaction - investigate phase transitions in k-SAT problems. (Unclassified / Libraries)
README
# Satisfaction
#### A Rust tool to investigate [phase transitions](https://en.wikipedia.org/wiki/Phase_transition) in [satisfiability problems](https://en.wikipedia.org/wiki/Boolean_satisfiability_problem).**Satisfaction** combines a random generator of formulas in conjunctive normal form (*CNF*) with a custom *SAT solver* to generate plots of the share of satisfiable formulas for different values of $\alpha$ (the ratio of *clauses* to *variables*).
> I can't get no satisfaction
> 'Cause I try and I try and I try and I try
> — The Rolling Stones### Examples
```console
satisfaction -k 3 -n 50 -s 1000
```
Here we see the transition, at $\alpha_C \approx 4.3$, for 3-SAT problems with $n = 50$ variables.
```console
satisfaction -k 2 -n 1000 -s 1000 --alpha-start 0 --alpha-end 3 --alpha-steps 30
```
In the case of 2-SAT, the solver algorithm is efficient and we can investigate sharper transitions like this one with $n = 1000$ variables.
### Help
```console
$ satisfaction --helpInvestigate phase transition in k-SAT problems
Usage: satisfaction [OPTIONS]
Options:
-k, --k The number k of literals per clause (e.g. 3 for 3-SAT) [default: 3]
-n, --n The number n of available variables [default: 25]
-s, --samples The number of generated samples per point (s.p.p.) [default: 100]
--alpha-start Lower bound for values of alpha [default: 0]
--alpha-end Upper bound for values of alpha [default: 10]
--alpha-steps Number of values for alpha [default: 100]
--verbose Verbosity (when turned on, the computed values are displayed)
-h, --help Print help
-V, --version Print version
```### Resources
* *Computing Science: Can't Get No Satisfaction*,
* *Phase transitions and complexity in computer science: an overview of the statistical physics approach to the random satisfiability problem*,