Questions tagged [satisfiability]

Satisfiability (often written in all capitals or abbreviated SAT) is the problem of determining if the variables of a given Boolean formula can be assigned in such a way as to make the formula evaluate to TRUE.

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/.

119 questions
1
vote
1 answer

How does skolemisation of lone EXISTS clauses work?

If I have a formula like: FAx FAy (Ez(!A(x,z) v !A(y,z)) v B(x,y)) (FA = For All / E = Exists) The rules of skolemisation say that: if E is outside FA replace with a constant or if E is inside FA replace by a new function contain all the vars…
Adam Taylor
  • 7,534
  • 8
  • 44
  • 54
1
vote
1 answer

A hash function for SAT preprocessing

During preprocessing of a SAT instance consisting of a clause database, every variable needs to be assigned a word. A hash function returns for each variable a 32-bit word only consisting of 0’s except for one bit among the 16 most significant bits…
1
vote
1 answer

Some questions about dReal: delta-satisfiability, parameter with 0.0, doing the same in Z3 and obtaining sat/unsat result

I am starting with dReal and I have a set of questions about it. These questions are based on the tutorial we can find in https://github.com/dreal/dreal4, section "Python bindings", with the following code: from dreal import * x = Variable("x") y =…
Theo Deep
  • 666
  • 4
  • 15
1
vote
1 answer

How is pywraplp SAT different from CP-SAT?

In ortools if you have only 0-1 variables you can either use CP-SAT from from ortools.sat.python import cp_model or you can use from ortools.linear_solver import pywraplp solver = pywraplp.Solver.CreateSolver('SAT') Are these solvers the same and…
byteful
  • 309
  • 1
  • 8
1
vote
1 answer

Generating DIMACS CNF file using bc2cnf is missing AND

I tried using the bc2cnf tool to generate the DIMACS CNF file of a boolean equation. The input file contains the equation of an AND gate as shown below : BC1.1 f := A & B; ASSIGN f; Command used: ./bc2cnf -v inp.txt opt.txt Content in the output…
1
vote
1 answer

How to use soft constraints in Z3-Python to express 'abstract' biases in SAT search: such as 'I prefer half of the literals to be true and half false'

I previously asked in How to bias Z3's (Python) SAT solving towards a criteria, such as 'preferring' to have more negated literals, whether there was a way in Z3 (Python) to 'bias' the SAT search towards a 'criteria'? In that post, we learnt 'simple…
Theo Deep
  • 666
  • 4
  • 15
1
vote
1 answer

Z3-Python as SAT solver does not give right results

I am trying to use Z3 (in Python) as a SAT solver, but the results are unexpected. First, imagine I want to get a model for the following formula: from z3 import * c_0 = Bool('c_0') c_1 = Bool('c_1') c_2 = Bool('c_2') c_3 = Bool('c_3') sss =…
Theo Deep
  • 666
  • 4
  • 15
1
vote
1 answer

Bounding number of allowable True/False in Z3

Suppose I have a collection of logical assertions in Z3 and I want to check the satisfiability. Is there a way to bound the total number of Trues/Falses in the satisfying model(s)? For example, I might have a collection of assertions involving 100…
Rocket Man
  • 113
  • 3
1
vote
1 answer

How to reduce k-independent set problem to 3-SAT

So I got this homework question and we are asked to reduce a k-independent set satisfiability problem to a 3-SAT set of clauses under the conjunctive normal form. So for G(V, E) we have verticies set V = {x1, x2, x3, x4, x5, x6} and edges set E = {…
1
vote
1 answer

Linear Sat Unsat vs Linear Unsat Sat

I know both the above algorithm come under iterative solutions to find an optimum for MAXSAT problems but I was wondering why is it that starting from the Satisfiable side while finding a solution for MAXSAT better than searching for it from the…
1
vote
1 answer

Why is MAX-SAT a generalisation of the SAT problem?

According to Wikipedia, the maximum satisfiability problem (MAX-SAT) is the problem of determining the maximum number of clauses, of a given Boolean formula in conjunctive normal form, that can be made true by an assignment of truth values to the…
1
vote
1 answer

Tool/Language to check Satisfiability of First order logic?

In general, First Order logic is Undecidable. However, Some fragments of first-order logic as Monadic logics, BSR Fragments, Separated Fragments are decidable. There exist tools to solve SAT/SMT Solvers as Z3. Is there any tool/Language which…
Rituraj Singh
  • 579
  • 1
  • 5
  • 16
1
vote
1 answer

How does constant inputs affect SAT formulation of a problem?

Lets say I have a black box circuit with N inputs and 1 output. I want to fix the value of M inputs and find the value of rest of the inputs (N-M) for which the circuit is satisfiable. If I manually fix the M inputs in the verilog RTL, and convert…
1
vote
0 answers

Native XOR-Support: xor-DPLL(to_examine)

Does anyone here understand the code and is able to answer a few of my question towards it? For info: to_examine is a queue and saves variables which are recently assigned. var is obviously a variable, it's going to be examined whether it causes a…
1
vote
1 answer

How can I find a combination of items that satisfies a requirement?

I'm fairly new at programming, so I'm hoping someone will be able to point me in the right direction on this. I have a list of ~2400 people and each person has at least one of 23 conditions (the condition for each person is either 1 if they have the…