Mathematical logic is the study of how we reason, which is pivotal in every field of life. Satisfiability is one of the most important elementary concepts in mathematical logic. Before discussing the concept of satisfiability, let’s briefly overview propositional logic.
Propositional logic deals with propositions and the logical relationships between them. A proposition is a declarative statement that can either be true or false, but not both. Multiple propositions can be combined using logical operations to make a compound proposition.
A compound proposition is satisfiable if it is true for some assignment of truth values to its variables. It is trivial to note that a tautology is always satisfiable.
Note: A proposition that is always true is a tautology. Contradiction is a proposition that is always false. A proposition that is neither a tautology nor a contradiction is called a contingency.
A compound proposition is unsatisfiable when there is no assignment of truth values for which it is true.
Note: A compound proposition is unsatisfiable if and only if its negation is a tautology.
When we find a specific assignment of truth values that makes the compound proposition true, that is proof of its satisfiability. Such an assignment is called a solution or satisfying assignment.
On the other hand, we need to demonstrate that no satisfying assignment exists to establish a compound proposition to be unsatisfiable.
We can use clever arguments to show that a compound proposition is satisfiable, or we can check all the possible assignments using a truth table.
Let’s find out whether the following compound proposition is satisfiable or not:
First, we determine the satisfiability by reasoning about the truth values instead of using a truth table. We see that the above proposition is true when , , and have the same truth value. Hence, it is satisfiable, as we have found at least one satisfying assignment.
The truth table for the example above is as follows, which verifies the argument already presented:
T | T | T | T | T | T | T |
T | T | F | T | T | F | F |
T | F | T | T | F | T | F |
T | F | F | T | T | F | F |
F | T | T | F | T | T | F |
F | T | F | F | T | T | F |
F | F | T | T | F | T | F |
F | F | F | T | T | T | T |
It is important to note that when the number of variables grows, the number of rows in a truth table grows exponentially.
Note: Since each variable has only two possible values, that is, true or false, a truth table will have rows, where is the number of variables.
In the example above, we have variables, so we have rows. Similarly, if we have variables, the number of rows of the truth table will mount to . It doesn’t practically seem possible to generate such large truth tables to prove the satisfiability of a given compound proposition. Hence, truth tables are often not considered an efficient option.
In general, finding the satisfying assignment for some arbitrary compound proposition is NP-complete. Steven Cook proved it in 1971.
Note: A problem is called a member of class NP if its solution can be verified in polynomial time. Problem is called polynomial time reducible to problem if we can convert any instance of problem to an instance of problem in polynomial time.
A problem is called NP-complete if it is a member of class NP and all the members of class NP are polynomial time reducible to that problem.
We can use the satisfiability problem, also known as SAT, to prove that some problem is a member of class NP and SAT is polynomial time reducible to . In the theory of computers, SAT is of central importance. There are many problems that are NP-complete. The travelling salesman problem, subsets sum problem, Hamiltonian cycle problem, and vertex-cover problem are a few examples from a long list of known NP-complete problems.