Summary
The lesson on normal forms proved that every formula is equivalent to a disjunctive normal form and to a conjunctive one; this one teaches how to compute them without the table and how to make use of them. The computation is a rewriting algorithm in three phases: the biconditional, exclusive disjunction, joint denial and implication are eliminated; the negations are driven down to the variables with De Morgan's laws and double negation; and one distributes, conjunction over disjunction for the disjunctive form and disjunction over conjunction for the conjunctive one. Its correctness, which is a consequence of semantic replacement, and its termination, with a numerical measure that decreases at each step of each phase, are proved; and its limit is proved as well: the conjunctive form of a disjunction of conjunctions of two variables necessarily has clauses. Then the normal forms are obtained from the truth table of a device whose interior cannot be seen, they are simplified by merging adjacent rows, and they are turned into circuits of switches in series and in parallel. The problem of a device with four switches is solved completely, with its table, its two forms and its circuits; the one with five is left as a challenge.
Learning objectives
- Apply the rewriting algorithm to obtain a disjunctive normal form and a conjunctive normal form of a formula, choosing the elimination of the biconditional that suits the place where it occurs.
- Prove that the algorithm is correct, by semantic replacement, and that it terminates, with measures that decrease at each step; and explain why the conjunctive form can be exponentially longer than the starting formula.
- Construct the normal forms of a black box from its truth table and simplify them by merging adjacent rows.
- Represent circuits of switches in series and in parallel by formulas, and design and simplify circuits that meet a specification given in natural language.
The lesson on normal forms gave two proofs of their existence. The first goes through the truth table, which has rows for variables; the second runs through the formula from the variables, following its single formation rule. Neither of them says how to proceed with a formula written with implications, biconditionals and nested negations, which is how formulas usually present themselves. If this is so, what is missing is a procedure that works on the written form itself, that can be carried out without thinking, that is known to terminate and that yields an equivalent formula. That is an algorithm, and its study is the first object of this lesson; the second is what is done with it: describing with formulas the behavior of a device and building a circuit that reproduces it.
Written forms and replacement
Recall that the formulas of the course are strings of circles and disks, and that , , , , and are abbreviations defined from joint denial (lesson on the language of propositional logic). When we write we do not write the string, but a written form of it: a tree whose leaves are variables and whose nodes are the connectives , , , , , and , each with its components. Every written form designates a single formula, the one that results from unfolding its abbreviations; and one and the same formula can have several written forms: the lesson on normal forms observed that and are the same string. The algorithm reads the written form, not the string; that is why it pays to distinguish them. Since the distinction matters only for knowing where each step acts, we shall use the letters , , for written forms and for the formulas they designate, and we shall write when the designated formulas are semantically equivalent. A written subform of a written form is the subtree hanging from one of its nodes.
A step of the algorithm replaces one written subform by another. The instrument that guarantees that this change does not alter the meaning is the semantic replacement theorem of the lesson on semantic consequence and equivalence; but that theorem replaces one occurrence in the string, and a written subform may correspond to several occurrences in the string, because each abbreviation copies its components: in , the component appears twice. The following lemma adapts replacement to written forms.
Let be a written form, one of its written subforms and a written form with . If results from replacing, in , that written subform by , then .
Proof
By induction on the depth of the node from which hangs, that is, the number of connectives of that lie above it. If the depth is , the written subform is the whole written form.
If it is greater than , the root of is a connective with components (and , if is binary), and hangs from one of them, say , at a smaller depth. By the induction hypothesis, the change inside yields an equivalent written form.
By the theorem on the values of the defined connectives (lesson on the semantics of propositional logic) and by the clause for joint denial, the value of in a valuation is a function of the values of and , and these do not change. Hence and have the same value in every valuation.
Here is the truth function of the connective: , , and so on for the others. The same result is obtained from the semantic replacement theorem by applying it once for each copy of in the string and chaining the equivalences by transitivity; the proof through the written form is shorter because it counts the written connectives and not the copies.
Loading the content…
Completed
Sign in to save your progress