ArticleslgStudy

science

Conjunctive normal form

Conjunctive normal form is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Conjunctive normal form rather than just read about it. In short: In Boolean algebra, a formula is in conjunctive normal form (CNF) or clausal normal form if it is a conjunction of one or more clauses, where a clause is a disjunction of literals; otherwise put, it is a product of sums or an AND of ORs. In automated theorem proving, the notion "clausal normal form" is often used in a narrower sense, meaning a particular representation of a CNF formula as a set of sets of literals (…

Key takeaways

  • Conjunctive normal form belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Conjunctive normal form to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Conjunctive normal form from memory before moving on to harder problems.

Reference excerpt

In Boolean algebra, a formula is in conjunctive normal form (CNF) or clausal normal form if it is a conjunction of one or more clauses, where a clause is a disjunction of literals; otherwise put, it is a product of sums or an AND of ORs. In automated theorem proving, the notion "clausal normal form" is often used in a narrower sense, meaning a particular representation of a CNF formula as a set of sets of literals (i.e., the product and sum operations are left implicit).

Definition A logical formula is considered to be in CNF if it is a conjunction of one or more disjunctions of one or more literals. As in disjunctive normal form (DNF), the only propositional operators in CNF are or (∨), and (∧), and not (¬). The not operator can only be used as part of a literal, which means that it can only precede a propositional variable. The following is a context-free grammar for CNF:

CNF → Disjunct ∣ Disjunct ∧ CNF Disjunct → Literal ∣ Literal ∨ Disjunct Literal → Variable ∣ ¬ Variable Where Variable is any variable. All of the following formulas in the variables A,B,C,D,E, and F are in conjunctive normal form:

(A∨¬B∨¬C)∧(¬D∨E∨F) (A∨B)∧(C) (A∨B) (A) The following formulas are not in conjunctive normal form:

¬(A∧B), since an AND is nested within a NOT ¬(A∨B)∧C, since an OR is nested within a NOT A∧(B∨(D∧E)), since an AND is nested within an OR A∧(B∨(C∨D)), since a nested OR should be written without parenthesis

Conversion to CNF In classical logic each propositional formula can be converted to an equivalent formula that is in CNF. This transformation is based on rules about logical equivalences: double negation elimination, De Morgan's laws, and the distributive law.

Basic algorithm The algorithm to compute a CNF-equivalent of a given propositional formula ϕ builds upon ¬ϕ in disjunctive normal form (DNF): step 1. Then ¬ϕDNF is converted to ϕCNF by swapping ANDs with ORs and vice versa while negating all the literals. Remove all ¬¬.

Conversion by syntactic means Convert to CNF the propositional formula ϕ. Step 1: Convert its negation to disjunctive normal form. ¬ϕDNF=(C1∨C2∨…∨Ci∨…∨Cm), where each Ci is a conjunction of literals li1∧li2∧…∧lini. Step 2: Negate ¬ϕDNF. Then shift ¬ inwards by applying the (generalized) De Morgan's equivalences until no longer possible. ϕ↔¬¬ϕDNF=¬(C1∨C2∨…∨Ci∨…∨Cm)↔¬C1∧¬C2∧…∧¬Ci∧…∧¬Cm// (generalized) D.M. where¬Ci=¬(li1∧li2∧…∧lini)↔(¬li1∨¬li2∨…∨¬lini)// (generalized) D.M. Step 3: Remove all double negations. Example Convert to CNF the propositional formula ϕ=((¬(p∧q))↔(¬r↑(p⊕q))). The (full) DNF equivalent of its negation is ¬ϕDNF=(p∧q∧r)∨(p∧q∧¬r)∨(p∧¬q∧¬r)∨(¬p∧q∧¬r) ϕ↔¬¬ϕDNF=¬{(p∧q∧r)∨(p∧q∧¬r)∨(p∧¬q∧¬r)∨(¬p∧q∧¬r)}↔¬(p∧q∧r)_∧¬(p∧q∧¬r)_∧¬(p∧¬q∧¬r)_∧¬(¬p∧q∧¬r)_// generalized D.M. ↔(¬p∨¬q∨¬r)∧(¬p∨¬q∨¬¬r)∧(¬p∨¬¬q∨¬¬r)∧(¬¬p∨¬q∨¬¬r)// generalized D.M. (4×)↔(¬p∨¬q∨¬r)∧(¬p∨¬q∨r)∧(¬p∨q∨r)∧(p∨¬q∨r)// remove all ¬¬=ϕCNF

Conversion by semantic means A CNF equivalent of a formula can be derived from its truth table. Again, consider the formula ϕ=((¬(p∧q))↔(¬r↑(p⊕q))). The corresponding truth table is

A CNF equivalent of ϕ is (¬p∨¬q∨¬r)∧(¬p∨¬q∨r)∧(¬p∨q∨r)∧(p∨¬q∨r) Each disjunction reflects an assignment of variables for which ϕ evaluates to F(alse). If in such an assignment a variable V

is T(rue), then the literal is set to ¬V in the disjunction, is F(alse), then the literal is set to V in the disjunction.

Other approaches Since all propositional formulas 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 non-CNF formula (X1∧Y1)∨(X2∧Y2)∨…∨(Xn∧Yn) into CNF produces a formula with 2n clauses: (X1∨X2∨…∨Xn)∧(Y1∨X2∨…∨Xn)∧(X1∨Y2∨…∨Xn)∧(Y1∨Y2∨…∨Xn)∧…∧(Y1∨Y2∨…∨Yn). Each clause contains either Xi or Yi for each i. There exist transformations into CNF that avoid an exponential increase in size by preserving satisfiability rather than equivalence. 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 Z1,…,Zn as follows: (Z1∨…∨Zn)∧(¬Z1∨X1)∧(¬Z1∨Y1)∧…∧(¬Zn∨Xn)∧(¬Zn∨Yn). An interpretation satisfies this formula only if at least one of the new variables is true. If this variable is Zi, then both Xi and Yi 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 Zi 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, the Tseitin transformation, also includes the clauses Zi∨¬Xi∨¬Yi. With these clauses, the formula implies Zi≡Xi∧Yi; this formula is often regarded to "define" Zi to be a name for Xi∧Yi.

Maximum number of disjunctions

Consider a propositional formula with n variables, n≥1. There are 2n possible literals: L={p1,¬p1,p2,¬p2,…,pn,¬pn}. L has (22n−1) non-empty subsets. This is the maximum number of disjunctions a CNF can have. All truth-functional combinations can be expressed with 2n disjunctions, one for each row of the truth table.In the example below they are underlined. Example Consider a formula with two variables p and q. The longest possible CNF has 2(2×2)−1=15 disjunctions: (¬p)∧(p)∧(¬q)∧(q)∧(¬p∨p)∧(¬p∨¬q)_∧(¬p∨q)_∧(p∨¬q)_∧(p∨q)_∧(¬q∨q)∧(¬p∨p∨¬q)∧(¬p∨p∨q)∧(¬p∨¬q∨q)∧(p∨¬q∨q)∧(¬p∨p∨¬q∨q) This formula is a contradiction. It can be simplified to (¬p∧p) or to (¬q∧q), which are also contradictions, as well as valid CNFs.

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Conjunctive normal form

Start with the simplest possible case. Write down what Conjunctive normal form claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Conjunctive normal form before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Conjunctive normal form ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Conjunctive normal form

In research
Conjunctive normal form appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Conjunctive normal form in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Conjunctive normal form is common in secondary-school and first-year university syllabi. It links to neighbouring topics Knowledge compilation, Normal forms (logic), so understanding it makes those chapters shorter.
In everyday life
Look for Conjunctive normal form outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Conjunctive normal form” →

How to study Conjunctive normal form in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Conjunctive normal form means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Conjunctive normal form out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Conjunctive normal form in simple terms?

In Boolean algebra, a formula is in conjunctive normal form (CNF) or clausal normal form if it is a conjunction of one or more clauses, where a clause is a disjunction of literals; otherwise put, it is a product of sums or an AND of ORs. In automated theorem proving, the notion "clausal normal form…

Why does Conjunctive normal form matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Conjunctive normal form?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Conjunctive normal form.

Tags

  • Knowledge compilation
  • Normal forms (logic)

Keep exploring