The Samson-Mills-Quine theorem

Similar documents
The Samson-Mills-Quine theorem

ECE473 Lecture 15: Propositional Logic

Propositional Logic Basics Propositional Equivalences Normal forms Boolean functions and digital circuits. Propositional Logic.

Equivalences. Proposition 2.8: The following equivalences are valid for all formulas φ, ψ, χ: (φ φ) φ. Idempotency Idempotency Commutativity

Unary negation: T F F T

Lecture 9: The Splitting Method for SAT

Critical Reading of Optimization Methods for Logical Inference [1]

Comp487/587 - Boolean Formulas

1 Propositional Logic

CS 486: Lecture 2, Thursday, Jan 22, 2009

Topic 1: Propositional logic

Section 1.2 Propositional Equivalences. A tautology is a proposition which is always true. A contradiction is a proposition which is always false.

CSE20: Discrete Mathematics for Computer Science. Lecture Unit 2: Boolan Functions, Logic Circuits, and Implication

2.5.2 Basic CNF/DNF Transformation

Automated Program Verification and Testing 15414/15614 Fall 2016 Lecture 2: Propositional Logic

Part 1: Propositional Logic

Truth-Functional Logic

Description Logics. Foundations of Propositional Logic. franconi. Enrico Franconi

Substitution Theorem. Equivalences. Proposition 2.8 The following equivalences are valid for all formulas φ, ψ, χ: (φ φ) φ Idempotency

Logic: Propositional Logic (Part I)

CS 512, Spring 2017, Handout 10 Propositional Logic: Conjunctive Normal Forms, Disjunctive Normal Forms, Horn Formulas, and other special forms

Conjunctive Normal Form and SAT

Lecture 2. Logic Compound Statements Conditional Statements Valid & Invalid Arguments Digital Logic Circuits. Reading (Epp s textbook)

Philosophy 220. Truth-Functional Equivalence and Consistency

3 The Semantics of the Propositional Calculus

Logic and Inferences

Introduction to Metalogic

Propositional and Predicate Logic - II

1.1 Statements and Compound Statements

Conjunctive Normal Form and SAT

Part 1: Propositional Logic

CHAPTER 12 Boolean Algebra

Formal Verification Methods 1: Propositional Logic

Conjunctive Normal Form and SAT

CHAPTER 2 INTRODUCTION TO CLASSICAL PROPOSITIONAL LOGIC


Boolean Algebra CHAPTER 15

cse541 LOGIC FOR COMPUTER SCIENCE

Propositional Logic. Testing, Quality Assurance, and Maintenance Winter Prof. Arie Gurfinkel

C241 Homework Assignment 4

Boolean Algebra. Philipp Koehn. 9 September 2016

Logical Design of Digital Systems

Tecniche di Verifica. Introduction to Propositional Logic

Digital Logic Design ENEE x. Lecture 12

CSC Discrete Math I, Spring Propositional Logic

Propositional and Predicate Logic - V

Chapter 2. Reductions and NP. 2.1 Reductions Continued The Satisfiability Problem (SAT) SAT 3SAT. CS 573: Algorithms, Fall 2013 August 29, 2013

A Little Deductive Logic

Logic Design I (17.341) Fall Lecture Outline

Tautologies, Contradictions, and Contingencies

Induction on Failing Derivations

COMP9414: Artificial Intelligence Propositional Logic: Automated Reasoning

CHAPTER 6 - THINKING ABOUT AND PRACTICING PROPOSITIONAL LOGIC

Decision Procedures for Satisfiability and Validity in Propositional Logic

Sec$on Summary. Tautologies, Contradictions, and Contingencies. Logical Equivalence. Normal Forms (optional, covered in exercises in text)

A Little Deductive Logic

Exercises 1 - Solutions

Natural Deduction for Propositional Logic

Propositional Logic: Models and Proofs

2.2: Logical Equivalence: The Laws of Logic

Logical Agent & Propositional Logic

Agenda. Artificial Intelligence. Reasoning in the Wumpus World. The Wumpus World

Lecture 2: Proof of Switching Lemma

More Propositional Logic Algebra: Expressive Completeness and Completeness of Equivalences. Computability and Logic

Propositional logic. Programming and Modal Logic

Warm-Up Problem. Is the following true or false? 1/35

DeMorgan s Laws and the Biconditional. Philosophy and Logic Sections 2.3, 2.4 ( Some difficult combinations )

6. Logical Inference

Normal Forms of Propositional Logic

7. Propositional Logic. Wolfram Burgard and Bernhard Nebel

Chapter 2: Introduction to Propositional Logic

Mathematics 114L Spring 2018 D.A. Martin. Mathematical Logic

On the Structure and the Number of Prime Implicants of 2-CNFs

Foundations of Artificial Intelligence

CHAPTER 4 CLASSICAL PROPOSITIONAL SEMANTICS

Foundations of Artificial Intelligence

Solvers for the Problem of Boolean Satisfiability (SAT) Will Klieber Aug 31, 2011

CSE 555 HW 5 SAMPLE SOLUTION. Question 1.

A non-classical refinement of the interpolation property for classical propositional logic

Title: Logical Agents AIMA: Chapter 7 (Sections 7.4 and 7.5)

Propositional Logic and Semantics

Computer Organization: Boolean Logic

Propositional Calculus: Formula Simplification, Essential Laws, Normal Forms

Tautological equivalence. entence equivalence. Tautological vs logical equivalence

Resolution for Predicate Logic

Computational Logic. Davide Martinenghi. Spring Free University of Bozen-Bolzano. Computational Logic Davide Martinenghi (1/30)

The statement calculus and logic

Logic: First Order Logic

Unit 8A Computer Organization. Boolean Logic and Gates

Propositional Equivalence

A Lower Bound of 2 n Conditional Jumps for Boolean Satisfiability on A Random Access Machine

Propositions. c D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 5.1, Page 1

Propositional and First Order Reasoning

CSE 20 DISCRETE MATH WINTER

Syntax of propositional logic. Syntax tree of a formula. Semantics of propositional logic (I) Subformulas

Symbolic Logic 3. For an inference to be deductively valid it is impossible for the conclusion to be false if the premises are true.

1 Boolean Algebra Simplification

Propositional Logic: Evaluating the Formulas

CMSC 858F: Algorithmic Lower Bounds Fall SAT and NP-Hardness

Deductive Systems. Lecture - 3

Transcription:

The Samson-Mills-Quine theorem Intermediate Logic The dnf simplification procedure can greatly simplify the complexity of truth-functional formulas, but it does not always turn up a simplest possible Boolean equivalent of a formula. The formula, (p q) ( p q) (q r) ( q r) is an illustrative example. It cannot be further simplified by applying any of the four transformations of the dnf simplification procedure, yet the dnf formula (p q) (q r) ( p r) is truth-functionally equivalent to it and simpler. This note describes a method for finding, for any truth functional formula, a simplest Boolean equivalent. The method is a modification, due to the American logician W. V. O. Quine, of a procedure for electrical circuit minimization discovered by E. W. Samson and B. E. Mills. The proof that the method works is essentially Quine s. It is evident from the above example why the dnf simplification procedure fails to generate the a simplest possible equivalent. That procedure allows one only ever to erase literals or clauses of a pre-recorded formula, while the second formula above contains a clause (the third) that is not a sub-formula of any of the first formula s clauses. One might reasonably wonder where that clause came from, and how one might discover it. To address that wonder, it is helpful to reflect a bit on some basic properties of dnf formulas. Every disjunct of a disjunction implies the whole disjunction. This fact is evident from the definition of disjunction. In particular, then, every clause of a dnf formula implies the whole formula. Inspired by this observation, let us define successively 1

1. a conjunction block to be a formula that is a conjunction of literals, in which no literal occurs twice 2. an implicant of a formula to be a conjunction block that implies that formula 3. two conjunction blocks are opposed in a sentence letter if that sentence letter appears as a conjunct of one and its negation appears as a conjunct of the other 4. one conjunction block subsumes another if they are opposed in no sentence letter, and every conjunct of the second is also a conjunct of the first 5. a prime implicant of a formula φ to be an implicant of φ that subsumes no other implicant of φ. It is immediately clear that any simplest dnf equivalent of a formula φ will be a disjunction of prime implicants of φ, for if one disjunct of a dnf formula failed to be prime, then the fourth transformation of the dnf simplification procedure would be applicable, in effect replacing that disjunct with one that it subsumes (i.e., a shorter one). Thus, the dnf simplification procedure can be seen as a way of reducing any dnf formula to an equivalent dnf formula that is a disjunction of some of its prime implicants. It fails to reliably generate a simplest possible dnf equivalent because there may be other prime implicants which, if appended to the formula as additional disjuncts, would allow a greater number of clauses to be erased. The above example illustrates this general phenomenon. Since (p q) ( p q) (q r) ( q r) cannot be further simplified by the dnf simplification procedure, all of its clauses must be prime implicants. But one can verify that the formulas p r and p r are also prime implicants, so that the formula (p q) ( p q) (q r) ( q r) (p r) ( p r) is equivalent to the original formula. Clearly, the fifth and sixth clauses of this new formula could now be erased by successive applications of rule three (each implies the original four clause formula, and thus the fifth implies 2

the result of deleting itself from the new six clause formula, and the sixth similarly implies the result of deleting itself from the resulting five clause formula.) But applying rule three differently allows one instead to preserve the sixth clause and erase the second, fourth and fifth, resulting in (p q) (q r) ( p r). Problem 5: The last formula is indeed a simplest possible equivalent of the original one. There is another equally simple equivalent. Find it by choosing a different sequence of applications of rule three. Now, a satisfiable formula φ is equivalent to the disjunction of all its prime implicants (an unsatisfiable formula has no prime implicants, and gets obliterated by the dnf simplification procedure anyway.) For φ is implied by each of its prime implicants, so it is implied by their disjunction. And conversely, every interpretation that satisfies φ satisfies some conjunction block that implies φ and thus also some prime implicant of φ. Therefore every interpretation that satisfies φ satisfies also the disjunction of its prime implicants. Thus, to find a simplest dnf equivalent of a formula, is suffices to find all of its prime implicants. Is this a coherent task? One might wonder whether every truth functional formula has prime implicants and whether, assuming that a formula φ does have prime implicants, whether it might have infinitely many such. But these wonders subside when we observe, first, that the truth table of a satisfiable formula indicates some of its implicants (in each row of the table where φ is true, the list of T s and F s in the reference columns describe how to build an implicant of φ: conjoin all the sentence letters interpreted as T with the negation of all sentence letters interpreted as F if these implicants aren t prime, then some sub-formulas of them are), and second, that prime implicants can contain neither two occurrences of the same sentence letter nor any sentence letter that doesn t appear in φ (if a conjunction block contains both p and p, then it is unsatisfiable and therefore does not qualify as an implicant any dnf formula with such a block as one of its clauses is equivalent to the formula that results when that clause is erased). The method of Samson and Mills is an algorithm for finding all of the prime implicants of a dnf formula. To describe it, we need one more definition: 3

6 If two conjunction blocks φ and ψ are opposed in exactly one sentence letter, then their consensus is the result of deleting the two opposed literals and all repeated literals from φ ψ Notice that the consensus of two conjunction blocks is another conjunction block. Our algorithm has only two transformation rules: i Erase any clause of φ that subsumes another. ii Adjoin to φ as an additional clause the consensus of any two clauses whose consensus doesn t subsume a clause that s already present. Observe that these two transformations, applied to a dnf formula φ, preserve the property of being in dnf and also preserve equivalence. The Samson-Mills-Quine theorem says that successive applications of these two rules will inevitably result in a formula that is the disjunction of all the prime implicants of φ. Proof: The theorem is a consequence of three lemmas. Lemma 1: A dnf formula φ remains susceptible to transformation (ii) so long as some prime implicant of it is not among its clauses. Lemma 2: A dnf formula φ remains susceptible either to transformation (i) or to transformation (ii) or to both so long as some clause of it is not one of its prime implicants. Lemma 3: It is not possible to apply transformations (i) and (ii) indefinitely. Thus, no matter how one applies the transformations (i) and (ii) to a formula φ, eventually one will reach a point where it is not possible to do anything more, and at that point, all and only prime implicants of φ will appear as clauses of the dnf equivalent of φ that one has produced. To prove the first lemma, let χ be a prime implicant of φ not appearing as a clause of φ. (Notice that, for there to be such, φ cannot be valid.) Since χ is prime, it subsumes no clause of φ. Therefore there is at least one conjunction block with these three properties: 4

a it subsumes χ b it subsumes no clause of φ c it contains no letter not in φ (After all, χ itself is such a formula.) Let ψ be a longest such conjunction block. (Should one think that, for any conjunction block with these three properties, there is another that is larger still, observe that there are only finitely many sentence letters in φ, and that no implicant of φ can contain a sentence letter other than one of these and still be prime.) As an exercise, explain why there must appear at least one sentence letter in φ that does not appear in ψ. Let p be a sentence letter contained by φ but not by ψ. Since ψ was a longest formula with properties (a), (b), and (c), the formulas p ψ and p ψ cannot satisfy all three properties. But both these formulas clearly satisfy (a) and (c), so they must both fail (b). Thus there are clauses C 1 and C 2 of φ subsumed respectively by p ψ and p ψ, although ψ subsumes neither. So C 1 must contain p; C 2, p. As an exercise, explain how we know that C 1 and C 2 have a consensus. Call their consensus ω. Observe that ω subsumes no clause of φ, for ψ subsumes ω and ψ doesn t (by (b)). φ is therefore susceptible to transformation (ii). The proof of lemma 2 is left as an exercise. Lemma 3 is proved with two observations. First, only a finite number of clauses can ever be appended with applications of transformation (ii), and no one of these can ever be appended twice. As an exercise, explain why this is true. Second, the subtractive nature of transformation (i) delimits the number of times it can be applied. Explain why this is true, as another exercise. This completes the proof of the Samson-Mills-Quine theorem. Notice how unhelpful the proof is: It sheds no light on how one might best go about applying the transformations in order to attain prime implicants and obliterate other clauses expeditiously. In fact, it is not at all clear from the proof why it is that prime implicants turn up as the algorithm runs. The consensus of two clauses might be prime, but more often it will not be it will generally even be longer than both of the clauses it is the consensus of. 5

The theorem seems almost miraculous, and, for this reason, I allege that the proof is worth some philosophical attention. Indeed, a ballistic application of the transformation rules might be very inefficient. They are not set-up for efficiency, but to make the proof as transparent as possible. However, one can approach the task of finding all of a formula s prime implicants prudently, by conjoining the second transformation rule with the original rules from the dnf simplification procedure. More precisely, if one simplifies a dnf formula as much as possible with the old procedure, then one will be left with a disjunction, each clause of which is a prime implicant. To find the remaining implicants, a relatively small number of consensus taking measures need to be done. Indeed, this is how the fifth and sixth clauses ( p r and p r ) in the above example were generated. In the formula: (p q) ( p q) (q r) ( q r), p r is the consensus of the first and third clauses, and p r is the consensus of the second and fourth. After these two clauses are appended to yield (p q) ( p q) (q r) ( q r) (p r) ( p r), consensuses of new pairs of clauses (the second and fifth, as well as the third and sixth) can be taken, but further application of transformation (ii) is nevertheless impossible because these consensuses already appear as clauses (as the third and second). Thus we can be assured that the last formula is a disjunction of all its own prime implicants. This whole enterprise of consensus taking appears to be overly complex and unnecessary when one observes a more easily describable way to generate a list of all a formula s prime implicants. Any prime implicant of φ must be built out of sentence letters appearing in φ, and there are only finitely many conjunction blocks built out of these sentence letters. One could simply write down all the possible conjunction blocks, test each to see if it is an implicant, and then pare down the list of implicants by checking for pairwise subsumption. The problem with this procedure is that the number of conjunction blocks to consider is super-exponential in the number of sentence letters that appear in the formula. More precisely, for a formula with n sentence letters, one must check n i=0 ( n i) (2 i ) conjunction blocks. Thus, for example, with seven sentence letters, one must check 2186 conjunction blocks. An efficient 6

use of the consensus method would turn up those prime implicants in much less computation time than would the brute force checking method. On the other hand, it is conceivable that a method might be discovered for finding simplest dnf equivalents that bypasses any need to find all prime implicants. The sheer number of a formula s prime implicants can itself be exponential in the number of the formula s sentence letters (according to an analysis of a seven switch Boolean circuit by Fridshal, as many as 1698 different formulas could be prime implicants of a seven letter formula). A direct simplification method that bypasses any need to consider exponentially more data than a given formula contains would be a discovery of great practical and theoretical interest. 7