Answer Key #1 Phil 414 JL Shaheen Fall 2010

Similar documents
PROPOSITIONAL LOGIC (2)

To prove something about all Boolean expressions, we will need the following induction principle: Axiom 7.1 (Induction over Boolean expressions):

To prove something about all Boolean expressions, we will need the following induction principle: Axiom 7.1 (Induction over Boolean expressions):

Example of a Demonstration that a Problem is NP-Complete by reduction from CNF-SAT

Mathematical Logic Prof. Arindama Singh Department of Mathematics Indian Institute of Technology, Madras. Lecture - 9 Normal Forms

1. Suppose you are given a magic black box that somehow answers the following decision problem in polynomial time:

(a) (4 pts) Prove that if a and b are rational, then ab is rational. Since a and b are rational they can be written as the ratio of integers a 1

Propositional Logic Formal Syntax and Semantics. Computability and Logic

Definition: A context-free grammar (CFG) is a 4- tuple. variables = nonterminals, terminals, rules = productions,,

2SAT Andreas Klappenecker

CSE 20 DISCRETE MATH. Fall

Binary Decision Diagrams

STABILITY AND PARADOX IN ALGORITHMIC LOGIC

Propositional Calculus: Boolean Algebra and Simplification. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson

Some Hardness Proofs

NP-Complete Reductions 2

(QiuXin Hui) 7.2 Given the following, can you prove that the unicorn is mythical? How about magical? Horned? Decide what you think the right answer

CS 3512, Spring Instructor: Doug Dunham. Textbook: James L. Hein, Discrete Structures, Logic, and Computability, 3rd Ed. Jones and Barlett, 2010

NP-Completeness of 3SAT, 1-IN-3SAT and MAX 2SAT

8 NP-complete problem Hard problems: demo

The Satisfiability Problem [HMU06,Chp.10b] Satisfiability (SAT) Problem Cook s Theorem: An NP-Complete Problem Restricted SAT: CSAT, k-sat, 3SAT

Propositional Logic. Part I

Combinatorial Optimization

CSE 20 DISCRETE MATH. Winter

Lecture 14: Lower Bounds for Tree Resolution

W4231: Analysis of Algorithms

The Resolution Algorithm

Mathematical Logic Prof. Arindama Singh Department of Mathematics Indian Institute of Technology, Madras. Lecture - 37 Resolution Rules

Mixed Integer Linear Programming

SAT Solver. CS 680 Formal Methods Jeremy Johnson

Homework 1. Due Date: Wednesday 11/26/07 - at the beginning of the lecture

Where Can We Draw The Line?

DO NOT RE-DISTRIBUTE THIS SOLUTION FILE

Linear Time Unit Propagation, Horn-SAT and 2-SAT

BOOLEAN ALGEBRA AND CIRCUITS

== is a decent equivalence

University of Illinois at Chicago Department of Computer Science. Final Examination. CS 151 Mathematical Foundations of Computer Science Fall 2012

Assignment # 4 Selected Solutions

Polynomial SAT-Solver Algorithm Explanation

Foundations of AI. 9. Predicate Logic. Syntax and Semantics, Normal Forms, Herbrand Expansion, Resolution

Semantics via Syntax. f (4) = if define f (x) =2 x + 55.

1 Definition of Reduction

Notes for Recitation 8

(More) Propositional Logic and an Intro to Predicate Logic. CSCI 3202, Fall 2010

Lecture 2: NP-Completeness

Solutions to In-Class Problems Week 4, Fri

2010 SMT Power Round

P Is Not Equal to NP. ScholarlyCommons. University of Pennsylvania. Jon Freeman University of Pennsylvania. October 1989

1.4 Normal Forms. We define conjunctions of formulas as follows: and analogously disjunctions: Literals and Clauses

Program Verification & Testing; Review of Propositional Logic

[Ch 6] Set Theory. 1. Basic Concepts and Definitions. 400 lecture note #4. 1) Basics

Integrity Constraints (Chapter 7.3) Overview. Bottom-Up. Top-Down. Integrity Constraint. Disjunctive & Negative Knowledge. Proof by Refutation

Workbook Unit 13: Natural Deduction Proofs (IV)

Chapter 3. Set Theory. 3.1 What is a Set?

Solutions to In Class Problems Week 5, Wed.

1 Matchings in Graphs

Resolution (14A) Young W. Lim 6/14/14

1. Chapter 1, # 1: Prove that for all sets A, B, C, the formula

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF

Horn Formulae. CS124 Course Notes 8 Spring 2018

CS 456 (Fall 2018) Scribe Notes: 2

Propositional logic (Ch. 7)

Indicate the option which most accurately completes the sentence.

CS446: Machine Learning Fall Problem Set 4. Handed Out: October 17, 2013 Due: October 31 th, w T x i w

Propositional Calculus

SAT-CNF Is N P-complete

Boolean Functions (Formulas) and Propositional Logic

Propositional Logic. Andreas Klappenecker

Computer Science 236 Fall Nov. 11, 2010

CS 380/480 Foundations of Artificial Intelligence Winter 2007 Assignment 2 Solutions to Selected Problems

Concept Learning (2) Aims. Introduction. t Previously we looked at concept learning in an arbitrary conjunctive representation

Strategies for Proofs

CS40-S13: Functional Completeness

8.1 Polynomial-Time Reductions

LECTURE 2 An Introduction to Boolean Algebra

These are not polished as solutions, but ought to give a correct idea of solutions that work. Note that most problems have multiple good solutions.

CMPUT 366 Intelligent Systems

AXIOMS FOR THE INTEGERS

Lecture Notes 15 Number systems and logic CSS Data Structures and Object-Oriented Programming Professor Clark F. Olson

NP Completeness. Andreas Klappenecker [partially based on slides by Jennifer Welch]

COMP4418 Knowledge Representation and Reasoning

Exam in Algorithms & Data Structures 3 (1DL481)

CPSC 121: Models of Computation. Module 6: Rewriting predicate logic statements

Open and Closed Sets

MATH20902: Discrete Maths, Solutions to Problem Set 1. These solutions, as well as the corresponding problems, are available at

Chapter 3: Paths and Cycles

Truth Functional Properties on Truth Trees

Informatics 1 - Computation & Logic: Tutorial 3

Geometry Note-Sheet Overview

TA: Jade Cheng ICS 241 Recitation Lecture Notes #12 November 13, 2009

ASSIGNMENT 4 SOLUTIONS

Treewidth and graph minors

Logic and Proof course Solutions to exercises from chapter 6

Computer-Aided Program Design

We will show that the height of a RB tree on n vertices is approximately 2*log n. In class I presented a simple structural proof of this claim:

Propositional Logic:

Problem Set 2 Solutions

Multi-Place Predicates and Multiple Quantifiers

Solution : a) C(18, 1)C(325, 1) = 5850 b) C(18, 1) + C(325, 1) = 343

CPS 102: Discrete Mathematics. Quiz 3 Date: Wednesday November 30, Instructor: Bruce Maggs NAME: Prob # Score. Total 60

Transcription:

Answer Key #1 Phil 414 JL Shaheen Fall 2010 1. 1.42(a) B is equivalent to B, and so also to C, where C is a DNF formula equivalent to B. (By Prop 1.5, there is such a C.) Negated DNF meets de Morgan s Laws = C is equivalent to some CNF formula. (You should probably have actually given an argument to show that a negated DNF formula is a CNF formula. An inductive argument based on the number of disjuncts in the DNF works. To prove the inductive step, truth tables!) So B is too. 1.42(c)(ii) Let C be the DNF formula where each disjunct is the conjunction of literals corresponding to each row in the truth table for B that makes B true. (That is, for each such row, there is exactly one disjunct in C that is the conjunction of the statement letters true in that row together with the negations of the statement letters false in that row.) Since C is a disjunction, a row of its truth table makes C false just in case none of the disjuncts in C is true in that row. But any such row also makes B false by construction of C. Similarly, a row of C s truth table makes it true just in case one of its disjuncts is true in that row, and any such row also makes B true by construction of C. So B and C are equivalent. Now, if this C has exactly n (distinct) letters, then the truth table for B has 2 n rows. Since C has one disjunct for each row of B s truth table that makes B true, if C has 2 n disjuncts, B is true in every row of its truth table. That is, it s a tautology. The other direction follows more or less directly by construction of C. (No further proof is really necessary, but presumably it will be clear if you understand why this is true from how you say it.) 2. 1.43(a) S pose B is satisfiable. Then there is some way to assign T s and F s to its statement letters that makes it true. But then this same way of assigning T s and F s to its statement letters makes B false. So B ain t no tautology. Now s pose B fails of tautologousness. 1 Then there s some way 1 In at least one ancient manuscript, tautologology. 1

to assign T s and F s to its statement letters that makes it false. But that way makes B true, so it s satisfiable. 1.43(c) S pose some truth assignment satisfies D. Then it makes some disjunct of D, say L i, true. Any extension of the assignment will then make the conjunct of E containing L i. So we need to extend the assignment to cover the C j such that every other conjunct is true as well. Note first that if i = 1 or i = 2, then making all the C j false makes E true, so henceforth we ll assume i 3, i.e., that at least two literals containing some C j, one negated and one just a statement letter, appear as the other two disjuncts in L i s conjunct in D. Now we extend the original truth assignment by assigning true to all C j where 1 j i 2 and false to all C j for i 1 j n 2, which results in an extension of the original truth assignment that satisfies E. (To prove the extended assignment described in this way indeed satisfies E, induction on n 4 works.) Now s pose some truth assignment satisfies E. To show that it extends a truth assignment that satisfies D, it suffices to show that it extends a truth assignment that makes some literal of D true. Proof by contradiction: suppose it makes all literals of D false. Then it must assign C 1 to true. And if it makes C j true, it better make C j + 1 true, since none of the L i are true but each conjunct has to be true. In particular, it makes C n 2 true. But then the final conjunct, C n 2 L n C 1, is false, contradicting the supposition that the truth assignment satisfies E. So indeed it must extend a truth assignment that satisfies D. 1.43(d) The important properties of E are that any truth assignment satisfying D, here L 1 L 2 L 3, can be extended to satisfy E, and that any truth assignment satisfying E itself extends a truth assignment satisfying D. The particular kind of E that we ll consider is a CNF formula such that every conjunct has at most two literals. To prove this by contradiction, s pose there is such an E. E must contain each of L 1, L 2, and L 3, or else E would be satisfiable by a truth assignment that does not extend a truth assignment satisfying D just because it assigns no truth value to the missing statement letter. So each of the statement letters of D appears in E. Now, any conjunct containing some L i contains at most either another L j or some literal not appearing in D, say 2

C k. If some such conjunct contains no other statement letter, then the truth assignment that makes the sole statement in this conjunct false, but assigns T to at least one of the other L j is a truth assignment that makes D true but cannot be extended to an assignment that truthifies the CNF formula E. Further, if one of them, suppose without loss of generality one that contains L 1, contains some L j, suppose without loss of generality L 3, then E contains a conjunct, call it C, which contains only the statement letters L 1 and L 3, in which case there is a truth assignment that makes D true by making L 2 true but these literals false, which cannot be extended to an assignment that satisfies E just because it makes both literals in C false, and thus the disjunction C and thereby the CNF form E false. So each conjunct in E containing any L i contains as a second literal some C k not appearing in D. But then E can be satisfied by assigning the right values to the C k, and F to each of L 1, L 2, and L 3. So the conjuncts of E containing any L i must contain some other statement letter, but cannot contain any statement letter from D, and cannot each have as their other statement letters only those not in D. But this just means that there can be no such E. 3. 1.44(a) (i) (A B) B A (ii) (A B C) (A B C) (A C) (iii) (A C) ( A B) (A C) ( A B) (B C) A (C B) (B C) A ( C B) 1.44(b) S pose B holds. Then each conjunct in Res(B) that is also in B holds. Now to deal with the conjuncts in Res(B) not also in B. By construction of Res(B), any such conjunct, e.g., C, is formed from two conjuncts from B that we are supposing to be true, one of which is a disjunction including a statement letter as disjunct, and the other of which is a disjunction including the negation of that statement letter as disjunct. Clearly one of these disjunctive conjuncts is true based on the literal containing that statement letter. The corresponding literal in the other of the two disjunctive conjuncts will then be false, so the conjunct itself can only be true on the basis of some other of its disjuncts. And that disjunct appears again in C, the conjunct which appears in Res(B) but not in B. But this means that C also must be true. Since C is an arbitrary conjunct of Res(B) not in B, and since we have already taken care of the conjuncts that appear in both 3

Res(B) and B itself, it follows that Res(B) is itself true. 1.44(c) S pose r C (B) is satisfiable, and consider some truth assignment that witnesses this. According to this truth assignment, all conjuncts that r C (B) and B have in common are true, since r C (B) is itself true according to the assignment. By construction of r C (B), the only conjuncts in B that are not in r C (B) are conjunctions that yielded conjuncts in r C (B) by resolution on C. But these conjuncts in r C (B) are themselves true on the assignment, and any disjunction reached by resolution on C implies both of the disjunctions that yielded it by resolution on C, because whatever disjunct witnesses the truth of such a disjunction witnesses the truth of both of its parents. 1.44(d) Take the book s hint to do induction on the number of distinct statement letters that occur in some unsatisfiable CNF formula B. To be brief, here s just the inductive step: we assume that, for any CNF formula B containing n distinct statement letters, B is unsatisfiable only if Res(B ) is a blatant contradiction, and consider a CNF formula, call it B, containing n + 1 statement letters, and s pose it s unsatisfiable. Pick a statement letter occurring in B. We ll assume WLOG that it is C. Now consider r C (B). Since B is stipulated to be unsatisfiable, so is r C (B) (from part (c) by contraposition). Now, r C (B) is a CNF formula with n statement letters, so Res(r C (B)) is a blatant contradiction, by the inductive hypothesis. Finally, note that all of the conjuncts of Res(r C (B)) also appear in Res(B), by construction of r C (B) and Res(B) (and, if you like, Res(r C (B)) too), so Res(B) must be a blatant contradiction as well. 1.44(e) The left-to-right direction is just part (d). For the rightto-left direction, s pose Res(B) is a blatant contradiction. If the conjuncts in Res(B) that witness its being a blatant contradiction are also in B, then B is itself a blatant contradiction, and therefore obviously unsatisfiable. If those conjuncts, which we can assume WLOG to be C and C are not in B, then they were each formed as the result of resolution on some other statement letter, say D and E respectively. That is, B must contain as conjuncts (C D) and (C D), as well as ( C E) and ( C E). But the conjunction of these four disjunctions is unsatisfiable (give some 4

argument!), so B, which entails that conjunction, must be as well. 4. 1.45(a) S pose B D is a tautology, that B and D has no statement letters in common, and that B is not contradictory. Then there is some truth assignment to the statement letters in B that makes it true. If D is not a tautology, there is also some truth assignment to the statement letters in D that makes it false. Since B and D share no sentence letters in common, these truth assignments can be unified in a truth assignment that is an extension of each, according to which B is true and D is false. But B D is a tautology, so nope. 1.45(b) Let C be the disjunction of all eligible conjunctions, as defined in the hint on p. 405, such that each eligible conjunction contains all and only statement letters that occur in both B and D. Then B C is a tautology. (You should probably say more than this here, but the meat of the problem is to show that C D is a tautology.) Now s pose for dolphins 2 of contradiction that there is some truth assignment that makes C truthy but D falsey. Extend this to a truth assignment that covers the statement letters in B that are not in D (and so not in C). Some such truth assignment still makes C truthy and D feel inadequate, since it doesn t change anything about the statement letters in either formula. But it also truthifies B, per impossible since B D is a tautology. So there ain t no such truth assignment. So C D is also a tautology. Boogie. 2 porpoises 5