Skip to content

A small program for investigating the phase shift in k-SAT problems.

Notifications You must be signed in to change notification settings

hydrastro/satps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SAT DPLL Solver

A small program for investigating the phase shift in k-SAT problems.

Features

  • k-SAT instances generator
  • DPLL solver for k-SAT instances
  • OpenGL plotting of the phase shift

Phase Transitions in k-SAT

The k-SAT problem is known to exhibit a phase transition based on the ratio of clauses to variables. At a critical threshold, the probability of satisfiability shifts dramatically. This project explores this phenomenon by generating random instances and analyzing the results. Example Phase Transition Thresholds:

k Critical Ratio (Clauses/Variables)
3 ~4.26
4 ~9.93
5 ~21.12

Installation

Dependencies

  • OpenGL
  • GLUT

With Nix

nix build

With Make

make

Usage

./satps

Visualization of the resulting plot

Note: the parameters of the program are hardcoded

#define VARIABLES_COUNT 50
#define SAT_K 3
#define MAX_CLAUSES 500
#define ALPHA_STEPS 100
#define NUM_INSTANCES 100

Contributing

Contributions are welcome! Before submitting a pull request, please:

  • Format your code with clang-format
  • Test your code for memory leaks and undefined behavior with valgrind

About

A small program for investigating the phase shift in k-SAT problems.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published