Mathwords logoMathwords

Disjunctive Normal Form — Definition, Formula & Examples

Disjunctive Normal Form (DNF) is a way of writing a logical formula as a disjunction (OR) of one or more conjunctions (ANDs), where each conjunction contains only variables or their negations.

A propositional formula is in disjunctive normal form if it is expressed as C1C2CnC_1 \lor C_2 \lor \cdots \lor C_n, where each clause CiC_i is a conjunction of literals, and a literal is either a propositional variable pp or its negation ¬p\lnot p.

Key Formula

i=1n(j=1mlij)\bigvee_{i=1}^{n}\left(\bigwedge_{j=1}^{m} l_{ij}\right)
Where:
  • nn = Number of disjunctive clauses
  • mm = Number of literals in each clause (may vary by clause)
  • lijl_{ij} = A literal — either a variable or its negation

How It Works

To convert any propositional formula into DNF, first build its truth table and identify every row where the formula evaluates to true. For each such row, form a conjunction of all variables: use the variable itself if its value is true in that row, or its negation if false. Finally, take the disjunction (OR) of all these conjunctions. The result is logically equivalent to the original formula and is guaranteed to be in DNF.

Worked Example

Problem: Convert the formula (pq)(p \to q) into disjunctive normal form.
Step 1: Rewrite the conditional using its logical equivalence.
pq¬pqp \to q \equiv \lnot p \lor q
Step 2: Check whether the result is already in DNF. Each disjunct must be a conjunction of literals. Here ¬p\lnot p is a single literal (a trivial conjunction), and qq is also a single literal.
¬pq\lnot p \lor q
Step 3: Verify via truth table: the formula is true when pp is false (regardless of qq) or when qq is true. The rows (F,F)(F,F), (F,T)(F,T), and (T,T)(T,T) all give true, matching ¬pq\lnot p \lor q.
Answer: The DNF of (pq)(p \to q) is ¬pq\lnot p \lor q.

Why It Matters

DNF is a canonical form used in digital circuit design, where each AND clause maps to a logic gate feeding into a single OR gate. It also appears in database query optimization and automated theorem proving, making it a practical tool well beyond the classroom.

Common Mistakes

Mistake: Confusing DNF with CNF (Conjunctive Normal Form). Students sometimes write an AND of ORs and call it DNF.
Correction: DNF is an OR of ANDs. CNF is the dual: an AND of ORs. Remember "Disjunctive" means the top-level connective is disjunction (OR).