Conjunctive Normal Form

Context: FIT1058_MOC, FIT2014_MOC · an AND-of-ORs standard form · the natural form for encoding rules · dual to Disjunctive Normal Form via De Morgan Applied in FIT2014: Encoding Problems in Propositional Logic (problem → formula) · CNF Encoding Patterns (At Least, At Most, Exactly) (counting → clauses)

Quick Revision

  • 🎯 Objective: a conjunction (AND) of clauses, each a disjunction (OR) of literals ➔ the natural target when encoding rules.
  • 📦 Core Components: clause = “satisfy at least one literal” ➔ whole CNF = “satisfy every clause”.
  • ⚡ Key Constraint: De Morgan dual of Disjunctive Normal Form; the standard SAT-solver input. In FIT2014 CNF matters far more than DNF — it is the uniform encoding used in complexity theory.

🎓 FIT2014 emphasis

  • CNF ≫ DNF in this unit ➔ real specifications are conditions that must all hold, so CNF is written directly from the stated conditions — faster and less error-prone than the truth-table route.
  • A lone clause is already CNF ➔ e.g. needs no conversion.
  • Dramatic size gap ➔ for “at least one of ”: DNF needs 7 terms, CNF needs 1 clause — see Disjunctive Normal Form.
  • Standard conversion ➔ any becomes the clause by De Morgan; rewrite as and as .

📝 Core

1. The Form (AND-of-ORs)

  • Definition ➔ conjunction of clauses, each clause a disjunction of literals ➔ e.g. .
  • Clause = constraint ➔ “satisfy at least one of these literals”.
  • Whole CNF ➔ demands every clause be satisfied.

2. Why CNF Matters

  • Rule shape ➔ real rule sets are conditions that must all hold (top-level conjunction), each often “at least one option” (disjunction).
  • That shape is CNF ➔ natural for encoding rules; the standard SAT input.

3. Duality with DNF

  • De Morgan duals ➔ negating an AND-of-ORs and pushing inward gives an OR-of-ANDs.
  • Every expression has a CNF ➔ via negate → DNF of → negate → De Morgan (impractical but exists).

Key identities:

⚖️ Core Decision Matrix

CNFDNF
shapeAND-of-ORsOR-of-ANDs
built fromFalse rowsTrue rows
natural forrule/constraint modelling, SATlisting satisfying assignments
conversionDe Morgan dual of the otherDe Morgan dual

When It Flips: because rule sets decompose as "this that …", CNF is usually written directly from the problem, not via the truth-table route; each clause encodes one constraint.

📊 Exam Execution Trace

Manual Execution Trace

with output T,T,F,T (rows FF,FT,TF,TT):

Step / StateOutputClause (False row)
0 (Init)
1FFT
2FTT
3TFF
4TTT

⚠️ Common Mistakes

  • 💡 Clause literals are flipped vs DNF ➔ CNF negates the row-true literals (False rows); DNF keeps them (True rows). Both can blow up to rows.

🧠 Active Recall