Loading lessons...
Normal Forms: DNF, CNF, PDNF & PCNF
Normal Forms: DNF, CNF, PDNF & PCNF
Two formulas can look completely different and still be equivalent. A normal form is a standard shape into which every formula can be rewritten.
Normal forms let us test for tautology or contradiction by inspection, compare formulas by comparing their normal forms, and design logic circuits directly from truth tables. "Obtain the PDNF and PCNF" is one of the most frequently asked 10-mark questions in Unit I.
1. Building Blocks
| Term | Meaning | Example |
|---|---|---|
| Literal | A variable or its negation | p, ¬q |
| Elementary product (fundamental conjunction) | A conjunction of literals | p ∧ ¬q ∧ r |
| Elementary sum (fundamental disjunction) | A disjunction of literals | p ∨ ¬q ∨ r |
| Minterm | Elementary product containing every variable exactly once | p ∧ ¬q ∧ r (in p, q, r) |
| Maxterm | Elementary sum containing every variable exactly once | ¬p ∨ q ∨ r |
With n variables there are 2ⁿ minterms and 2ⁿ maxterms - one of each for every row of the truth table. A minterm is T in exactly one row; a maxterm is F in exactly one row.
2. The Four Normal Forms
| Form | Shape | Called |
|---|---|---|
| DNF | Disjunction (∨) of elementary products | Disjunctive Normal Form (sum of products) |
| CNF | Conjunction (∧) of elementary sums | Conjunctive Normal Form (product of sums) |
| PDNF | Disjunction of minterms | Principal (canonical) DNF |
| PCNF | Conjunction of maxterms | Principal (canonical) CNF |
DNF and CNF are not unique; PDNF and PCNF are unique (up to the order of terms). So two formulas are equivalent iff they have the same PDNF (or the same PCNF).
3. Obtaining DNF and CNF
Algorithm NORMAL_FORM(F)
1. Remove ↔ : p ↔ q ≡ (p → q) ∧ (q → p)
2. Remove → : p → q ≡ ¬p ∨ q
3. Push ¬ inwards with De Morgan's laws
and remove double negations ¬¬p ≡ p
4. For DNF: distribute ∧ over ∨
For CNF: distribute ∨ over ∧
5. Simplify: drop terms with p ∧ ¬p (DNF)
or p ∨ ¬p (CNF), remove repeatsDNF example. ¬(p → (q ∧ r)) ≡ ¬(¬p ∨ (q ∧ r)) ≡ p ∧ ¬(q ∧ r) ≡ p ∧ (¬q ∨ ¬r) ≡ (p ∧ ¬q) ∨ (p ∧ ¬r).
CNF example. A → (B ∧ C) ≡ ¬A ∨ (B ∧ C) ≡ (¬A ∨ B) ∧ (¬A ∨ C).
CNF example 2. (p ∧ q) ∨ (¬p ∧ r): distribute ∨ over ∧: (p ∨ ¬p) ∧ (p ∨ r) ∧ (q ∨ ¬p) ∧ (q ∨ r) ≡ (p ∨ r) ∧ (¬p ∨ q) ∧ (q ∨ r) (the first factor is T).
Testing by inspection
- A CNF is a tautology iff every elementary sum contains some p together with ¬p.
- A DNF is a contradiction iff every elementary product contains some p together with ¬p.
Solved. Is (p ∨ ¬p ∨ q) ∧ (q ∨ ¬q ∨ r) a tautology? Each sum contains a complementary pair → yes.
4. PDNF and PCNF from the Truth Table (Method 1)
Reading PDNF from the T rows and PCNF from the F rows of a truth table
- PDNF: for every row where the formula is T, write the minterm (p if p = T, ¬p if p = F) and join them with ∨.
- PCNF: for every row where the formula is F, write the maxterm with the literals reversed (¬p if p = T, p if p = F) and join them with ∧.
Why reversed? The maxterm for a row must be F exactly in that row; ¬p ∨ q ∨ r is F only when p = T, q = F, r = F.
Shorthand: Σm and ΠM
Number the rows by reading T = 1, F = 0 as a binary number (p is the most significant bit). Minterm mᵢ and maxterm Mᵢ belong to row i.
- PDNF = Σm(rows where T); PCNF = ΠM(rows where F).
- The two index lists are complements of each other - so once you have one form, the other follows immediately.
Solved Example 1 (asked repeatedly)
Find the PDNF and PCNF of f = (¬p → r) ∧ (q ↔ p).
| Row | p | q | r | ¬p → r | q ↔ p | f |
|---|---|---|---|---|---|---|
| 7 | T | T | T | T | T | T |
| 6 | T | T | F | T | T | T |
| 5 | T | F | T | T | F | F |
| 4 | T | F | F | T | F | F |
| 3 | F | T | T | T | F | F |
| 2 | F | T | F | F | F | F |
| 1 | F | F | T | T | T | T |
| 0 | F | F | F | F | T | F |
- PDNF = (p ∧ q ∧ r) ∨ (p ∧ q ∧ ¬r) ∨ (¬p ∧ ¬q ∧ r) = Σm(1, 6, 7)
- PCNF = (¬p ∨ q ∨ ¬r) ∧ (¬p ∨ q ∨ r) ∧ (p ∨ ¬q ∨ ¬r) ∧ (p ∨ ¬q ∨ r) ∧ (p ∨ q ∨ r) = ΠM(0, 2, 3, 4, 5)
Check: 3 minterms + 5 maxterms = 2³ = 8. ✅
Solved Example 2
f = (p ∧ q) ∨ (¬p ∧ r) ∨ (q ∧ r). It is T in rows 7 (TTT), 6 (TTF), 3 (FTT), 1 (FFT).
- PDNF = (p ∧ q ∧ r) ∨ (p ∧ q ∧ ¬r) ∨ (¬p ∧ q ∧ r) ∨ (¬p ∧ ¬q ∧ r) = Σm(1, 3, 6, 7)
- PCNF = ΠM(0, 2, 4, 5) = (p ∨ q ∨ r) ∧ (p ∨ ¬q ∨ r) ∧ (¬p ∨ q ∨ r) ∧ (¬p ∨ q ∨ ¬r)
- PDNF and PCNF by Algebra (Method 2 - Missing Factor)
- Get any DNF (or CNF) as in Section 3.
- For a term missing variable x, use x ∨ ¬x ≡ T (for DNF: term ∧ (x ∨ ¬x)) or x ∧ ¬x ≡ F (for CNF: term ∨ (x ∧ ¬x)) and distribute.
- Remove repeated minterms (maxterms).
Example (PDNF of p → q): p → q ≡ ¬p ∨ q ≡ (¬p ∧ (q ∨ ¬q)) ∨ (q ∧ (p ∨ ¬p)) ≡ (¬p ∧ q) ∨ (¬p ∧ ¬q) ∨ (p ∧ q) ∨ (¬p ∧ q) ≡ (p ∧ q) ∨ (¬p ∧ q) ∨ (¬p ∧ ¬q) - duplicate removed.
Example (PCNF of p ∧ q): p ≡ p ∨ (q ∧ ¬q) ≡ (p ∨ q) ∧ (p ∨ ¬q); q ≡ (p ∨ q) ∧ (¬p ∨ q). So p ∧ q ≡ (p ∨ q) ∧ (p ∨ ¬q) ∧ (¬p ∨ q).
Example (Solved Example 2 by algebra): p ∧ q → (p ∧ q ∧ r) ∨ (p ∧ q ∧ ¬r) ¬p ∧ r → (¬p ∧ q ∧ r) ∨ (¬p ∧ ¬q ∧ r) q ∧ r → (p ∧ q ∧ r) ∨ (¬p ∧ q ∧ r) Removing repeats leaves the same four minterms Σm(1, 3, 6, 7). ✅
Example (PCNF of (¬p → r) ∧ (q ↔ p) by algebra): ¬p → r ≡ p ∨ r ≡ (p ∨ q ∨ r) ∧ (p ∨ ¬q ∨ r). q ↔ p ≡ (¬q ∨ p) ∧ (¬p ∨ q) ≡ (p ∨ ¬q ∨ r) ∧ (p ∨ ¬q ∨ ¬r) ∧ (¬p ∨ q ∨ r) ∧ (¬p ∨ q ∨ ¬r). Together (one repeat removed): the five maxterms found in Example 1. ✅
6. Uses of PDNF and PCNF
| Question | How to answer with normal forms |
|---|---|
| Is f a tautology? | Its PDNF contains all 2ⁿ minterms (its PCNF is empty) |
| Is f a contradiction? | Its PCNF contains all 2ⁿ maxterms (its PDNF is empty) |
| Is f ≡ g? | Same PDNF (same Σm list) |
| Design a circuit for f | PDNF = sum of products = AND gates feeding an OR gate |
Solved. Show p → (q → r) ≡ (p ∧ q) → r using PDNFs. Both reduce to ¬p ∨ ¬q ∨ r, which is F only in row 6 (p = T, q = T, r = F). So both have PDNF Σm(0, 1, 2, 3, 4, 5, 7). Same PDNF → equivalent. ∎
Solved. The PDNF of the tautology q ∨ (p ∨ ¬q) contains all four minterms: (p ∧ q) ∨ (p ∧ ¬q) ∨ (¬p ∧ q) ∨ (¬p ∧ ¬q).
Key points to remember - PDNF: minterms from the T rows, literal as it is. PCNF: maxterms from the F rows, literals reversed. - Σm and ΠM index lists are complements; together they cover all 2ⁿ rows. - PDNF/PCNF are unique, so they decide equivalence. - Algebraic method: get a DNF/CNF, then insert missing variables with (x ∨ ¬x) or (x ∧ ¬x).
📝 IPU End-Term Exam Corner (5-10 Marks)
- Q1. Obtain the PDNF and PCNF of (¬p → r) ∧ (p ↔ q). (10 Marks)
- Write: full 8-row truth table, minterms from T rows, maxterms from F rows, and the count check 3 + 5 = 8.
- Q2. Obtain the PDNF of p → q and the PCNF of p ∧ q without a truth table. (5 Marks)
- Write: the missing-factor method shown above.
- Q3. Define minterm and maxterm. How can PDNF be used to test whether a formula is a tautology? (5 Marks)
- Q4. Find the CNF and DNF of ¬(p ∨ q) ↔ (p ∧ q). (5 Marks)
- Write: the formula is T only when exactly one of p, q is T (check the 4 rows), so DNF = (p ∧ ¬q) ∨ (¬p ∧ q) and CNF = (p ∨ q) ∧ (¬p ∨ ¬q) - it is equivalent to p ⊕ q.