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
3
votes
1 answer

Z3 : strange behavior with non linear arithmetic

I am just starting to use Z3 (v4.4.0), and I wanted to try one of the tutorial examples : (declare-const a Int) (assert (> (* a a) 3)) (check-sat) (get-model) (echo "Z3 will fail in the next example...") (declare-const b Real) (declare-const c…
Stevendeo
  • 87
  • 6
3
votes
2 answers

SAT-Solving: DPLL vs.?

right now I am writing about SAT-solving and I am stuck at a point. I am hoping that you can help me. I want to describe some methods to solve SAT-Problems. Right now I have three different ways: Bruteforce Random (naive) DPLL (with different…
noctua
  • 115
  • 10
3
votes
1 answer

Better way to express “exactly once” in CBMC

I'm trying really hard to come up with a better solution to state an “exactly once” property in CBMC (C bounded model checker). I mean exactly one element position in a row should have the value 1 (or any positive number that can be checked as the…
user2754673
  • 439
  • 3
  • 13
3
votes
1 answer

Twice-3SAT NP-complete

I wanted to solve the following problem about 3SAT . "TWICE-3SAT Input: how to show it is NP-hard and has more than one satisfiable assignments"
nahum-6
  • 33
  • 5
3
votes
1 answer

Why do already popped scopes affect the check-sat time in subsequent scopes?

General problem I've noticed several times that push-pop scopes that have already been popped appear to affect the time that a check-sat in a subsequent scope needs. That is, assume a program with multiple (potentially arbitrarily nested) push-pop…
Malte Schwerhoff
  • 12,684
  • 4
  • 41
  • 71
3
votes
3 answers

How can I express scheduling problems in minisat?

Minisat is a constraint programming/satisfaction tool, there is a version of Minisat which works here in the browser http://www.msoos.org/2013/09/minisat-in-your-browser/ How can I express a scheduling problem with Minisat? Is there a higher level…
Phil
  • 46,436
  • 33
  • 110
  • 175
2
votes
1 answer

Converting CNF format to DIMACS format

My lab partner and I are working on writing code to make our own SAT solver using Python for one of our courses. So far we have written this code to convert SoP to CNF. Now we are stuck as to how to convert the CNF to DIMACS format. We understand…
SRambo
  • 21
  • 3
2
votes
1 answer

Slow dnf to cnf in pycosat

Question in short To have a proper input for pycosat, is there a way to speed up calculation from dnf to cnf, or to circumvent it altogether? Question in detail I have been watching this video from Raymond Hettinger about modern solvers. I…
physicalattraction
  • 6,485
  • 10
  • 63
  • 122
2
votes
2 answers

How to bias Z3's (Python) SAT solving towards a criteria, such as 'preferring' to have more negated literals

In Z3 (Python) is there any way to 'bias' the SAT search towards a 'criteria'? A case example: I would like Z3 to obtain a model, but not any model: if possible, give me a model that has a great amount of negated literals. Thus, for instance, if we…
Theo Deep
  • 666
  • 4
  • 15
2
votes
1 answer

Better way of reading and parsing DIMACS for Z3

I am very new to SAT and Z3 (Have not even started with SMT yet). I have been playing around with gophersat (A nice Go implementation which works for a good set of SAT problems) and I discovered DIMACS format there. Although I agree that it is not…
SRC
  • 2,123
  • 3
  • 31
  • 44
2
votes
1 answer

How to declare forall quantifiers in SMTLIB / Z3 / CVC4?

I'm stuck on how to how to create a statement in SMTLIB2 that asserts something like forall x < 100, f(x) = 100 This property would be check a function that adds 1 to all numbers less than 100 recursively: (define-fun-rec incUntil100 ((x Int)) Int …
Alex Coleman
  • 607
  • 1
  • 4
  • 11
2
votes
0 answers

SICStus Prolog weighted_maximum/3 replacement?

SWI-Prolog CLP(B) has a weighted_maximum/2 predicate. What would be the replacement for this in SICStus Prolog CLP(B)? Here is an example what it does: ?- sat(A#B), weighted_maximum([1,2,1], [A,B,C], Maximum). A = 0, B = C, C = 1, Maximum = 3. I…
user502187
2
votes
0 answers

SICStus Prolog sat_count/2 replacement?

SWI-Prolog CLP(B) has a sat_count/2 predicate. What would be the replacement for this in SICStus Prolog CLP(B)? So far I went with: sat_count(+[1|L], N) :- aggregate_all(count, L^labeling(L), N). But the above is just using labeling brute force,…
user502187
2
votes
1 answer

ZDD with Quantification in Prolog

What would be the ZDD approach in Prolog that also provides quantifiers. Notation for existential quantifier would be as follows: X^F where X is the bound variable and F is the formula. It corresponds to the following formula: F[X/0] v…
user502187
2
votes
1 answer

Horn SAT algorithm using graphs

For some restricted classes of logical formulae, the satisfiability problem can be solved efficiently in polynomial time or even linear. One such class is that of Horn formulae, which consist only of Horn clauses with at most one positive literal.…
Meta
  • 25
  • 3
1 2
3
19 20