← 🧠 Propositional & First-Order Logic
Subtopic 3 of 6

1.3Normal forms, tautology and satisfiability

The idea

A formula is a tautology if true in every row, a contradiction if true in none, and satisfiable if true in at least one. Normal forms write it as an OR of ANDs (DNF) or an AND of ORs (CNF) straight from the truth table.

Think of it like this: A bouncer's list: DNF lists every allowed guest (each true row), CNF lists every excluded type (each false row).

Why it exists

Satisfiability is the first NP-complete problem, and counting Boolean functions or minterms comes up as a direct numeric question.

How it works

  1. Read off the true rows: each gives a minterm; OR them for the DNF.
  2. Read off the false rows: each gives a maxterm (flip every literal); AND them for the CNF.
  3. Number of Boolean functions of n variables: 2^(2ⁿ) (each of the 2ⁿ rows can be 0 or 1).
  4. Functionally complete sets: {¬,∧}, {¬,∨}, {→,¬}, NAND, NOR. {∧,∨} alone is not.

Worked example: How many Boolean functions of 3 variables?

There are 2³ = 8 rows and each can be 0 or 1, so 2⁸ = 256 functions.

Now play with it

  • →Load "majority(p, q, r)" and read its minterms.
  • →Switch to p ⊕ q and compare its DNF with its CNF.
contingency4 of 8 rows truesatisfiable: yesvalid: no
pqrvalue
FFFF
FFTF
FTFF
FTTT
TFFF
TFTT
TTFT
TTTT
Minterms (rows that are true): Σm(3, 5, 6, 7)
Maxterms (rows that are false): ΠM(0, 1, 2, 4)
Disjunctive normal form (an OR of full ANDs, one per true row)
(¬p∧q∧r) ∨ (p∧¬q∧r) ∨ (p∧q∧¬r) ∨ (p∧q∧r)
Conjunctive normal form (an AND of full ORs, one per false row)
(p∨q∨r) ∧ (p∨q∨¬r) ∧ (p∨¬q∨r) ∧ (¬p∨q∨r)
Set of connectivesFunctionally complete?Why
{¬, ∧}✓p ∨ q ≡ ¬(¬p ∧ ¬q)
{¬, ∨}✓p ∧ q ≡ ¬(¬p ∨ ¬q)
{¬, →}✓p ∨ q ≡ ¬p → q
{NAND} alone✓¬p ≡ p NAND p; then build ∧
{NOR} alone✓dual of NAND
{∧, ∨}✗every formula stays true when all inputs are true: ¬ is impossible
{→}✗cannot express ¬
{↔, ⊕}✗every formula keeps the parity of its inputs

Boolean functions of n variables: 2^(2ⁿ). Two variables: 16. Three variables: 256.

Check yourself

How many different Boolean functions exist for 2 variables?

Remember: n variables: 2ⁿ rows, 2^(2ⁿ) functions. DNF from true rows, CNF from false rows.
Exam notes (the dense version)

A formula is a tautology (valid) if true in every row, a contradiction if true in none, satisfiable if true in at least one. DNF = OR of ANDs (one minterm per true row); CNF = AND of ORs (one maxterm per false row). SAT is NP-complete, but 2-SAT is in P. There are 2^(2ⁿ) Boolean functions of n variables. {∧,¬}, {∨,¬}, {→,¬}, {NAND} and {NOR} are functionally complete; {∧,∨} is not.

Previous year questions: Propositional & First-Order Logic (25)

PYQs are grouped by topic, so this is the full set for Propositional & First-Order Logic; try the ones that match this subtopic. Open all 25 on the topic page.