If you do not allow the addition of new variables, a simple conversion is not possible. Although it is still possible to convert any formula to CNF (using the “truth tables” approach), not all formulas are converted to 3CNF without adding new variables. An example is parity for $4$ variables. In addition, converting any formula to CNF can lead to an exponential explosion, for example, for parity on the variables $n$, we go from $Theta(n^2)$ to $Theta(n2^n)$. Each formula can be written equivalently as a formula in conjunctive normal form. The three non-examples in CNF are: An important set of problems in computational complexity is to find mappings to variables of a Boolean formula expressed in conjunctive normal form so that the formula is true. The k-SAT problem is the problem of finding a satisfactory mapping to a Boolean formula expressed in CNF, where each disjunction contains at most k variables. 3-SAT is NP-complete (like any other k-SAT problem with k>2), while 2-SAT is known to have polynomial-time solutions. Therefore, the task[5] of converting a formula to DNF and maintaining satisfactoryness is heavy in NP; double, conversion to CNF, maintenance of validity, is also NP-difficult; therefore, the equivalence-preserving conversion to DNF or CNF is again np-cumbersome. In automated proof of theorems, the term “clausreal normal form” is often used in a narrower sense, meaning a particular representation of a CNF formula as a set of literals.

An interpretation satisfies this formula only if at least one of the new variables is true. If this variable is Z i {displaystyle Z_{i}}, then X i {displaystyle X_{i}} and Y i {displaystyle Y_{i}} are also true. This means that any model that meets this formula will also respond to the original. On the other hand, only some of the models in the original formula meet these criteria: since the Z i {displaystyle Z_{i}} are not mentioned in the original formula, their values are not relevant to the satisfaction of the formula, which is not the case in the last formula. This means that the original formula and the result of the translation are equivalent, but not equivalent. The transition from CNF to 3CNF is best explained by an example. We convert each clause separately. The clause $A lor B lor C lor D lor E$ corresponds to the 3CNF $$(A lor B lor x_1) land (lnot x_1 lor C lor x_2) land (lnot x_2 lor D lor E), $$ in the sense that the original formula (in this case a single clause) can be fulfilled if the converted formula is. They convert each of the clauses and take their conjunction. Designate $varphi$ to the function we are constructing that takes a formula like the one above (with $land,lor$ and possibly canceled variables) and returns a CNF.

For the base scenario, we have $varphi(x) = x$ and $varphi(lnot x) = lnot x$. For a formula of the form $A land B$, we don`t have to work hard: we define $varphi(A land B) = varphi(A) land varphi(B)$. The most difficult case is that of formulas of the form $A lor B$: A reasonably economical choice is $$varphi(A lor B) = (y lor varphi(A)) land ((lnot y) lor varphi(B)), $$, where $y$ is a new variable, and $y lor varphi(A)$ means to add $$y to all clauses. Another translation, the Tseitin transformation, also contains clauses Z i ∨ ¬ X i ∨ ¬ Y i {displaystyle Z_{i}vee neg X_{i}vee neg Y_{i}}. For these clauses, the formula Z i ≡ X i implies ∧ Y i {displaystyle Z_{i}equiv X_{i}wedge Y_{i}}; This formula is often referred to as “defining” Z i {displaystyle Z_{i}} as the name of X i ∧ Y i {displaystyle X_{i}wedge Y_{i}}. Suppose you have a formula with the connections $lnot,lor,land$. Think of it as a tree, where the internal nodes are marked with $lnot,lor,land$ and each node has one ($lnot$) or two ($lor,land$) child elements. I`m sorry I can`t provide an image. The first step is to “push the negations towards the leaves” using Morgan`s rules (see also).

This frees us from all nodes $lnot$, but now the sheets can be literal (variables or variable negations). Now let`s convert the formula recursively to CNF. Any Boolean formula can be expressed in an equivalent formula 3CNF. The problem is that the size explosion is not always polynomial compared to the size of the original formula. For example, take any DNF formula (which is a disjunction of clauses, where each clause is a conjunction of literals) and form a CNF or 3CNF equivalent. This will explode the size exponentially! This goes hand in hand with the fact that DNF-SAT is in P, while CNF-SAT is Np-complete! If you were to get an equivalent formula of 3CNF with a square or linear explosion, you would essentially prove P=NP and get a million dollar prize from the Clay Mathematics Institute!! This formula contains 2 n clauses {displaystyle 2^{n}}; Each clause contains X i {displaystyle X_{i}} or Y i {displaystyle Y_{i}} for each i {displaystyle i}. There are transformations in the CNF that avoid the exponential increase in size by maintaining fangability rather than equivalence. [3] [4] These transformations are guaranteed to increase the size of the formula only linearly, but introduce new variables. For example, the above formula can be converted to CNF as follows using the variables Z 1, . , Z n {displaystyle Z_{1},ldots ,Z_{n}}: As an example, the formula “Everyone who loves all animals is loved by someone again” is converted to CNF (then as a clause in the last line) as follows (highlighting the Redexes replacement rule in red {displaystyle {color {red}{text{red}}}}}}): General formulas with any link can be processed, expressing connectors with $lor,land,lnot$, for example by writing a truth table; However, it can be quite wasteful.

The point of 3CNF is that it is a “normal form” for formulas: as you mention, each formula is equivalent, up to a square (linear?) Blowup to a 3CNF formula. 3CNF formulas are “simple” and therefore easier to handle. In particular, if you ever read about NP comprehensiveness, you will find that we want to summarize our “difficult problems” in as simple a form as possible. This makes it easier to design and analyze algorithms that solve these problems and prove that other problems are also difficult by reducing 3CNF to them (which shows how to solve 3CNF with an algorithm for them). In first-order logic, the conjunctive normal form can be pushed further to obtain the clausreal normal form of a logical formula, which can then be used to perform first-order resolution. In the automated proof of theorems based on resolution, a CNF formula We specifically care about 3CNF for historical reasons, it was the first (or one of the first) NP-complete problems (see Cook`s article or Karps` article on their respective pages). In addition, 2CNF is not “complete” (arbitrary formulas cannot be equivalent to a 2CNF), and it is easy to determine whether they are fillable or not (google if interested). Here you need to be careful.

Not all formulas are equivalent to a 3CNF formula. A simple example of this would be $pvee qvee rvee s$, where $p,q,r,s$ are variables. Now let`s answer the questions: The typical problems in this case concern formulas in “3CNF”: conjunctive normal form with no more than three variables per conjunction. Examples of such formulas that can be found in practice can be very large, for example with 100,000 variables and 1,000,000 conjunctions. All of the following formulas in variables A, B, C, D, E {displaystyle A,B,C,D,E} and F {displaystyle F} are in conjunctive normal form: The entire construct causes a square inflation of the size of the formula (your “variable instance”; there are many other ways to set the size of the formula). However, the result you cite is only a linear explosion (in fact, by a factor of $24). It is quite possible that such a construction exists, but I am not aware of it; it may be one of the readers. The SAT-to-3SAT part has a linear explosion with a factor of $3$. A formula in CNF can be converted into an equiasatisable formula in “kCNF” (for k≥3) by having each conjunction of more than k variable x 1 ∨ ⋯ ∨ X k ∨ ⋯ ∨ X n {displaystyle X_{1}vee cdots vee X_{k}vee cdots vee X_{n}} by two conjunctions X 1 ∨ ⋯ ∨ X k − 1 ∨ Z {displaystyle X_{1}vee cdots vee X_{k-1}vee Z} and ¬ Z Z ∨ X k ⋯ ∨ X n {displaystyle neg Zvee X_{k}cdots vee X_{n}} with Z of a new variable and repeat as many times as necessary. Informally, the skolem function g ( x ) {displaystyle g(x)} can be thought of as giving to the person who likes x {displaystyle x}, while f ( x ) {displaystyle f(x)} gives the animal (if any) that does not like x {displaystyle x}. The last 3rd line from the bottom is then like “x {displaystyle x} does not like the animal f ( x ) {displaystyle f(x)}, otherwise x {displaystyle x} is liked by g ( x ) {displaystyle g(x)}”. Thank you in advance and sorry for all the grammatical mistakes I made.

I tried to google but only found a few articles that deal with 3CNF related to the SAT solution. The origin of the conference is www.coursera.org and does not really answer your other questions. 41 Minutes Ullman Reading – Conversion of CNF to 3CNF (with proof): www.youtube.com/watch?v=s9P33IgjwUA The last 2nd line from above, ( A n i m a l ( f ( x ) ) ∨ L o v e s ( g ( x ) , x ) ) ∧ ( ¬ L o v e s ( x , f ( x ) ) ) ∨ L o v e s ( g ( x ) , x ) { displaystyle (mathrm {Animal} (f(x))lor mathrm {Loves} (g(x), x))land (lnot mathrm {Loves} (x,f(x))lor mathrm {Loves} (g(x),x))} , is the CNF. . . .

Categories: