Questions tagged [sat]

In computer science, the Boolean Satisfiability Problem (or SAT) is the problem of determining if there exists an interpretation that satisfies a given boolean formula.

Mainly from Wikipedia:

In computer science, the Boolean Satisfiability Problem (sometimes called Propositional Satisfiability Problem and abbreviated as satisfiability or SAT) is the problem of determining if there exists an interpretation that satisfies a given Boolean formula.

In other words, it asks whether the variables of a given Boolean formula can be consistently replaced by the values true or false in such a way that the formula evaluates to true.

If this is the case, the formula is called satisfiable. On the other hand, if no such assignment exists, the function expressed by the formula is identically false for all possible variable assignments and the formula is unsatisfiable.

  • For example, the formula "a AND NOT b" is satisfiable because one can find the values a = TRUE and b = FALSE, which make "a AND NOT b" TRUE.

  • In contrast, "a AND NOT a" is unsatisfiable.

SAT is one of the first problems that was proven to be NP-complete. This means that all problems in the complexity class NP, which includes a wide range of natural decision and optimization problems, are in a technical sense equally difficult to solve as SAT.

There is no known algorithm that efficiently solves SAT, and it is generally believed that no such algorithm exists; yet this belief has not been proven mathematically, and resolving the question whether SAT has an efficient algorithm is equivalent to the P versus NP problem, which is the most famous open problem in the theory of computing.

Despite the fact that no algorithms are known that solve SAT efficiently, correctly, and for all possible input instances, many instances of SAT that occur in practice (such as in artificial intelligence, circuit design and automatic theorem proving) can actually be solved rather efficiently using heuristical SAT-solvers.

Such algorithms are not believed to be efficient on all SAT instances, but experimentally these algorithms tend to work well for many practical applications.

Nowadays, the research on the SAT theory continues, if you want to keep up to date with this research, feel free to visit: http://www.satlive.org/.

289 questions
46
votes
1 answer

Class Scheduling to Boolean satisfiability [Polynomial-time reduction]

I have some theoretical/practical problem and I don't have clue for now on how to manage, Here it is: I create a SAT solver able to find a model when one is existing and to prove the contradiction when it's not the case on CNF problems in C using…
Valentin Montmirail
  • 2,594
  • 1
  • 25
  • 53
20
votes
1 answer

K-out-of-N constraint in Z3Py

I am using the Python bindings for the Z3 theorem prover (Z3Py). I have N boolean variables, x1,..,xN. I want to express the constraint that exactly K out of N of them should be true. How can I do that, in Z3Py? Is there any built-in support for…
D.W.
  • 3,382
  • 7
  • 44
  • 110
11
votes
1 answer

SAT solving with more than 2^32 clauses

I'm trying to solve a big CNF formula using a SAT solver. The formula (in DIMACS format) has 4,697,898,048 = 2^32 + 402,930,752 clauses, and all SAT solvers I could find are having trouble with it: (P)lingeling reports that there are "too many…
Dominik Peters
  • 230
  • 1
  • 8
10
votes
1 answer

Complex Boolean expression optimization, normal forms?

I'm working on a streaming rules engine, and some of my customers have a few hundred rules they'd like to evaluate on every event that arrives at the system. The rules are pure (i.e. non-side-effecting) Boolean expressions, and they can be nested…
Alex Cruise
  • 7,939
  • 1
  • 27
  • 40
7
votes
1 answer

Employees shift problem - link missions together

I have a list of Employee and a list of Mission. Each mission have a start time and a duration. In the cp model (Google CpSat, from or-tools package), I defined shifts = Dictionary<(int,int),IntVar>, where shifts[(missionId, employeeId)] == 1 if and…
Antoine C.
  • 3,730
  • 5
  • 32
  • 56
5
votes
1 answer

Finding the first UIP in an inference graph

In SAT solving by conflict-driven clause learning, each time a solver detects that a candidate set of variable assignments leads to a conflict, it must look at the causes of the conflict, derive a clause from this (i.e. a lemma in terms of the…
rwallace
  • 31,405
  • 40
  • 123
  • 242
5
votes
5 answers

What is the most elegant way to find 16-bit numbers which satisfy some conditions?

I need to find all triples of 16-bit numbers (x, y, z) (well, actually only bits which perfectly match up in different triples with bits on same positions), such that y | x = 0x49ab (y >> 2) ^ x = 0x530b (z >> 1) & y = 0x0883 (x << 2) | z =…
5
votes
1 answer

How to use Picat to create CNF files from Minizinc files?

I'm interested in counting the number of solutions a problem have (not enumerating the solutions). For that, I have tools that uses CNF files. I want to convert Minizinc files (mzn or Flatzinc fzn format) and convert it to CNF. I learned Picat has…
Exeloz
  • 89
  • 6
5
votes
2 answers

SMT solver with custom theories?

I'm looking at doing some verification work where I've got regular tree grammars as an underlying theory. Z3 lets you define your own stuff with uninterpreted functions, but that doesn't tend to work well any time your decision procedures are…
jmite
  • 8,171
  • 6
  • 40
  • 81
5
votes
2 answers

SMT/SAT Solver vs Model Checker

Recently, I started to study formal verification techniques. In literature, model checker and solver are used somehow interchangeably. But, how model checker and solver are connected with each other? p.s. I would appreciate if some papers or links…
shahb0z
  • 63
  • 1
  • 7
5
votes
1 answer

Suggestion of an efficient SAT solver with good C++ interface (or: is Z3 good for me)?

For a project I'm starting I will need to use a SAT solver. I've used some of them before but mainly for experimenting, while here the main constraint for the project is good performance. I'm trying to look for alternatives, and trying to understand…
gigabytes
  • 3,104
  • 19
  • 35
5
votes
3 answers

Brute-force Prolog SAT solver for boolean formulas

I'm trying to write an algorithm that naively looks for models of a boolean formula (NNF, but not CNF). The code I have can check an existing model, but it'll fail (or not finish) when asked to find models, seemingly because it generates infinitely…
Christoph Burschka
  • 4,467
  • 3
  • 16
  • 31
5
votes
3 answers

Flow Shop to Boolean satisfiability [Polynomial-time reduction]

I contact you in order to get an idea on "how to transform a flow shop scheduling problem" into a boolean satisfiability. I already done such reduction for a N*N Sudoku, a N-queens and a Class scheduling problem, but I have some issue on how to…
Valentin Montmirail
  • 2,594
  • 1
  • 25
  • 53
4
votes
1 answer

How does the minizinc pentominoes regular constraint example work?

The minizinc benchmarks repository contains several pentomino examples. Here is the data for the first example: width = 5; height = 4; filled = 1; ntiles = 5; size = 864; tiles = [|63,6,1,2,0, |9,6,1,2,378, |54,6,1,2,432, |4,6,1,2,756, …
makeyourownmaker
  • 1,558
  • 2
  • 13
  • 33
4
votes
1 answer

Why all NP-complete problems can be reducible to 3-SAT?

When I tried to figure out why halting-problem is NP-hard, I found this. However, there is a statement confuse me We begin by noting that all NP-complete problems are reducible to 3SAT. Why all NP-Complete problems can be reducible to 3-SAT? Hope…
Zheyuuu
  • 151
  • 1
  • 12
1
2 3
19 20