CNF Translations
As mentioned earlier, each formula can be translated into a logically equivalent formula in the conjunctive normal form. We next show three methods to do this. The first two only use the variables occurring in the original formula and are, in the worst case, of exponential size in the size of the original formula. The third method introduces auxiliary variables and is of linear size.
Method 1: Applying local rewriting rules
One can transform an arbitrary formula into an equivalent CNF formula by applying a sequence of local transformations:
Eliminate other binary connectives but conjunction and disjunction by applying the following rules:
Move negations next to variables
Move conjunctions outside of disjunctions:
Note that simplification could, and should, be performed whenever possible by applying, for instance, the following rules:
Example
Translating the formula
first
,then
, andand finally
,
, and
In the worst case, the above translation results in exponentially larger CNF formulas. For instance, for the formula
the equivalent CNF formula
has
Method 2: Deriving CNF from truth tables
For small formulas, CNF can be directly read from the truth table for the formula. This is based on the observation that
a clause
is equivalent to and thus, in CNF, “excludes” the rows in the truth table in which
are all false.
Example
The truth table for the formula
Now the clause
This is equivalent to the formula
Method 3: The Tseitin-translation
This methods uses auxiliary, “fresh” variables that do not occur in the original formula to encode the semantics of the sub-formulas. The resulting CNF formula is of linear size in the size of the original formula.
Take a formula
For intuition, consider the case
or, equivalently,
From these it is easier to see that the clauses do encode the semantics of the sub-formulas correctly.
Finally, to force that the whole formula
Example
Consider again the formula
For notational convenience, let
The satisfying truth assignments of
Example
Again, consider the formula
The assignment
satisfies .Its extension
satisfies .The assignment
does not satisfy .There is no extension of
that satisfies .