In Boolean logic, a formula is in conjunctive normal form (CNF) if it is a conjunction of clauses, where a clause is a disjunction of literals. As a normal form, it is useful in automated theorem proving. It is similar to the product of sums form used in circuit theory.

All conjunctions of literals and all disjunctions of literals are in CNF, as they can be seen as conjunctions of one-literal clauses and conjunctions of a single clause, respectively. As in the disjunctive normal form (DNF), the only propositional connectives a formula in CNF can contain are and, or, and not. The not operator can only be used as part of a literal, which means that it can only precede a propositional variable.

Contents

Examples and counterexamples [link]

All of the following formulas are in CNF:

Failed to parse (Missing texvc executable; please see math/README to configure.): \neg A \wedge (B \vee C)
Failed to parse (Missing texvc executable; please see math/README to configure.): (A \vee B) \wedge (\neg B \vee C \vee \neg D) \wedge (D \vee \neg E)
Failed to parse (Missing texvc executable; please see math/README to configure.): A \or B
Failed to parse (Missing texvc executable; please see math/README to configure.): A \wedge B.


The last formula is in CNF because it can be seen as the conjunction of the two single-literal clauses Failed to parse (Missing texvc executable; please see math/README to configure.): A

and Failed to parse (Missing texvc executable; please see math/README to configure.): B

. Incidentally, this formula is also in disjunctive normal form. The following formulae are not in CNF:

Failed to parse (Missing texvc executable; please see math/README to configure.): \neg (B \vee C)
Failed to parse (Missing texvc executable; please see math/README to configure.): (A \wedge B) \vee C
Failed to parse (Missing texvc executable; please see math/README to configure.): A \wedge (B \vee (D \wedge E)).


The above three formulae are respectively equivalent to the following three formulas that are in CNF:

Failed to parse (Missing texvc executable; please see math/README to configure.): \neg B \wedge \neg C
Failed to parse (Missing texvc executable; please see math/README to configure.): (A \vee C) \wedge (B \vee C)
Failed to parse (Missing texvc executable; please see math/README to configure.): A \wedge (B \vee D) \wedge (B \vee E).


Conversion into CNF [link]

Every propositional formula can be converted into an equivalent formula that is in CNF. This transformation is based on rules about logical equivalences: the double negative law, De Morgan's laws, and the distributive law.

Since all logical formulae can be converted into an equivalent formula in conjunctive normal form, proofs are often based on the assumption that all formulae are CNF. However, in some cases this conversion to CNF can lead to an exponential explosion of the formula. For example, translating the following non-CNF formula into CNF produces a formula with Failed to parse (Missing texvc executable; please see math/README to configure.): 2^n

clauses:
Failed to parse (Missing texvc executable; please see math/README to configure.): (X_1 \wedge Y_1) \vee (X_2 \wedge Y_2) \vee \dots \vee (X_n \wedge Y_n).


In particular, the generated formula is:

Failed to parse (Missing texvc executable; please see math/README to configure.): (X_1 \vee \cdots \vee X_{n-1} \vee X_n) \wedge (X_1 \vee \cdots \vee X_{n-1} \vee Y_n) \wedge \cdots \wedge (Y_1 \vee \cdots \vee Y_{n-1} \vee Y_n).


This formula contains Failed to parse (Missing texvc executable; please see math/README to configure.): 2^n

clauses; each clause contains either Failed to parse (Missing texvc executable; please see math/README to configure.): X_i
or Failed to parse (Missing texvc executable; please see math/README to configure.): Y_i
for each Failed to parse (Missing texvc executable; please see math/README to configure.): i

.

There exist transformations into CNF that avoid an exponential increase in size by preserving satisfiability rather than equivalence.[1][2] These transformations are guaranteed to only linearly increase the size of the formula, but introduce new variables. For example, the above formula can be transformed into CNF by adding variables Failed to parse (Missing texvc executable; please see math/README to configure.): Z_1,\ldots,Z_n

as follows:
Failed to parse (Missing texvc executable; please see math/README to configure.): (Z_1 \vee \cdots \vee Z_n) \wedge (\neg Z_1 \vee X_1) \wedge (\neg Z_1 \vee Y_1) \wedge \cdots \wedge (\neg Z_n \vee X_n) \wedge (\neg Z_n \vee Y_n).


An interpretation satisfies this formula only if at least one of the new variables is true. If this variable is Failed to parse (Missing texvc executable; please see math/README to configure.): Z_i , then both Failed to parse (Missing texvc executable; please see math/README to configure.): X_i

and Failed to parse (Missing texvc executable; please see math/README to configure.): Y_i
are true as well. This means that every model that satisfies this formula also satisfies the original one. On the other hand, only some of the models of the original formula satisfy this one: since the Failed to parse (Missing texvc executable; please see math/README to configure.): Z_i
are not mentioned in the original formula, their values are irrelevant to satisfaction of it, which is not the case in the last formula. This means that the original formula and the result of the translation are equisatisfiable but not equivalent.

An alternative translation includes also the clauses Failed to parse (Missing texvc executable; please see math/README to configure.): Z_i \vee \neg X_i \vee \neg Y_i . With these clauses, the formula implies Failed to parse (Missing texvc executable; please see math/README to configure.): Z_i \equiv X_i \wedge Y_i

this formula is often regarded to "define" Failed to parse (Missing texvc executable; please see math/README to configure.): Z_i
to be a name for Failed to parse (Missing texvc executable; please see math/README to configure.): X_i \wedge Y_i

.

First-order logic [link]

In first order logic, conjunctive normal form can be taken further to yield the clausal normal form of a logical formula, which can be then used to perform first-order resolution.

Computational complexity [link]

An important set of problems in computational complexity involves finding assignments to the variables of a boolean formula expressed in Conjunctive Normal Form, such that the formula is true. The k-SAT problem is the problem of finding a satisfying assignment to a boolean formula expressed in CNF such that 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 solutions in polynomial time.

Typical problems in this case involve formulas in "3CNF" form: conjunctive normal form with no more than three variables per conjunct. Examples of such formulas encountered in practice can be very large, for example with 100,000 variables and 1,000,000 conjuncts.

Converting from first-order logic [link]

To convert first-order logic to CNF:[3]

  1. Convert to negation normal form.
    1. Eliminate implications: convert Failed to parse (Missing texvc executable; please see math/README to configure.): x \rightarrow y
to Failed to parse (Missing texvc executable; please see math/README to configure.): \neg x \vee y
    1. Move NOTs inwards by repeatedly applying DeMorgan's Law. Specifically, replace Failed to parse (Missing texvc executable; please see math/README to configure.): \neg (x \vee y)
with Failed to parse (Missing texvc executable; please see math/README to configure.): (\neg x) \wedge (\neg y)
replace Failed to parse (Missing texvc executable; please see math/README to configure.): \neg (x \wedge y)
with Failed to parse (Missing texvc executable; please see math/README to configure.): (\neg x) \vee (\neg y)
and replace Failed to parse (Missing texvc executable; please see math/README to configure.): \neg\neg x
with Failed to parse (Missing texvc executable; please see math/README to configure.): x

.

  1. Standardize variables
    1. For sentences like (∀x P(x)) ∨ (∃x Q(x)) which use the same variable name twice, change the name of one of the variables. This avoids confusion later when we drop the quantifiers.
    2. From ∀x [∃y Animal(y) ∧ ¬Loves(x, y)] ∨ [∃y Loves(y, x)]. we obtain: ∀x [∃y Animal(y) ∧ ¬Loves(x, y)] ∨ [∃z Loves(z,x)].
  2. Skolemize the statement
    1. ∃x P(x) into P(A), where A is a new constant (consult linked article for more details)
  3. Drop universal quantifiers
  4. Distribute ORs over ANDs.

Notes [link]

  1. ^ Tseitin (1968)
  2. ^ Jackson and Sheridan (2004)
  3. ^ Artificial Intelligence: A modern Approach [1995...] Russel and Norvig

See also [link]

References [link]

  • Paul Jackson, Daniel Sheridan: Clause Form Conversions for Boolean Circuits. In: Holger H. Hoos, David G. Mitchell (Eds.): Theory and Applications of Satisfiability Testing, 7th International Conference, SAT 2004, Vancouver, BC, Canada, May 10–13, 2004, Revised Selected Papers. Lecture Notes in Computer Science 3542, Springer 2005, pp. 183–198
  • G.S. Tseitin: On the complexity of derivation in propositional calculus. In: Slisenko, A.O. (ed.) Structures in Constructive Mathematics and Mathematical Logic, Part II, Seminars in Mathematics (translated from Russian), pp. 115–125. Steklov Mathematical Institute (1968)

External links [link]


https://wn.com/Conjunctive_normal_form

Canonical normal form

In Boolean algebra, any Boolean function can be put into the canonical disjunctive normal form (CDNF) or minterm canonical form and its dual canonical conjunctive normal form (CCNF) or maxterm canonical form. Other canonical forms include the complete sum of prime implicants or Blake canonical form (and its dual), and the algebraic normal form (also called Zhegalkin or Reed–Muller).

Minterms are called products because they are the logical AND of a set of variables, and maxterms are called sums because they are the logical OR of a set of variables. These concepts are dual because of their complementary-symmetry relationship as expressed by De Morgan's laws.

Two dual canonical forms of any Boolean function are a "sum of minterms" and a "product of maxterms." The term "Sum of Products" or "SoP" is widely used for the canonical form that is a disjunction (OR) of minterms. Its De Morgan dual is a "Product of Sums" or "PoS" for the canonical form that is a conjunction (AND) of maxterms. These forms can be useful for the simplification of these functions, which is of great importance in the optimization of Boolean formulas in general and digital circuits in particular.

Canonical form

In mathematics and computer science, a canonical, normal, or standard form of a mathematical object is a standard way of presenting that object as a mathematical expression. The distinction between "canonical" and "normal" forms varies by subfield. In most fields, a canonical form specifies a unique representation for every object, while a normal form simply specifies its form, without the requirement of uniqueness.

The canonical form of a positive integer in decimal representation is a finite sequence of digits that does not begin with zero.

More generally, for a class of objects on which an equivalence relation is defined, a canonical form consists in the choice of a specific object in each class. For example, Jordan normal form is a canonical form for matrix similarity, and the row echelon form is a canonical form, when one consider as equivalent a matrix and its left product by an invertible matrix.

In computer science, and more specifically in computer algebra, when representing mathematical objects in a computer, there are usually many different ways to represent the same object. In this context, a canonical form is a representation such that every object has a unique representation. Thus, the equality of two objects can easily be tested by testing the equality of their canonical forms. However canonical forms frequently depend on arbitrary choices (like ordering the variables), and this introduces difficulties for testing the equality of two objects resulting on independent computations. Therefore, in computer algebra, normal form is a weaker notion: A normal form is a representation such that zero is uniquely represented. This allows testing for equality by putting the difference of two objects in normal form.

Podcasts:

PLAYLIST TIME:
×