Supplementary exercises in propositional logic

Similar documents
Solutions to Sample Problems for Midterm

Propositional Calculus: Formula Simplification, Essential Laws, Normal Forms

COMP9414: Artificial Intelligence Propositional Logic: Automated Reasoning

Tautologies, Contradictions, and Contingencies

Propositional Resolution

Comp487/587 - Boolean Formulas

Logic: Propositional Logic (Part I)

Inference in Propositional Logic

COMP219: Artificial Intelligence. Lecture 20: Propositional Reasoning

CSE 20: Discrete Mathematics

Knowledge base (KB) = set of sentences in a formal language Declarative approach to building an agent (or other system):

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

CSC Discrete Math I, Spring Propositional Logic

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

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

CS206 Lecture 03. Propositional Logic Proofs. Plan for Lecture 03. Axioms. Normal Forms

Part 1: Propositional Logic

Deductive Systems. Lecture - 3

Advanced Topics in LP and FP

Propositional Logic Resolution (6A) Young W. Lim 12/12/16

Inference Methods In Propositional Logic

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

Propositional Logic Resolution (6A) Young W. Lim 12/31/16

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

Conjunctive Normal Form and SAT

Logic and Inferences

CSE 20 DISCRETE MATH WINTER

Propositional Logic Language

Introduction Logic Inference. Discrete Mathematics Andrei Bulatov

Normal Forms of 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.

Inference Methods In Propositional Logic

Logic as a Tool Chapter 1: Understanding Propositional Logic 1.1 Propositions and logical connectives. Truth tables and tautologies

Section 1.1: Logical Form and Logical Equivalence

PHIL12A Section answers, 16 February 2011

Tecniche di Verifica. Introduction to Propositional Logic

Informatics 1 - Computation & Logic: Tutorial 5 v:1.12 1st November :36:40

Propositional logic II.

Compound Propositions

Example. Logic. Logical Statements. Outline of logic topics. Logical Connectives. Logical Connectives

Propositional Logic: Models and Proofs

3 The Semantics of the Propositional Calculus

Conjunctive Normal Form and SAT

CSCI Homework Set 1 Due: September 11, 2018 at the beginning of class

Propositional Logic: Methods of Proof (Part II)

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

Propositional Logic: Review

CS250: Discrete Math for Computer Science. L6: CNF and Natural Deduction for PropCalc

Propositional and Predicate Logic - II

LOGIC PROPOSITIONAL REASONING

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

CSE 20 DISCRETE MATH WINTER

ECE473 Lecture 15: Propositional Logic

Chapter 4: Classical Propositional Semantics

Propositional Logic: Evaluating the Formulas

The Calculus of Computation: Decision Procedures with Applications to Verification. Part I: FOUNDATIONS. by Aaron Bradley Zohar Manna

Propositional Reasoning

Lecture 9: The Splitting Method for SAT

CS156: The Calculus of Computation

Introduction to Artificial Intelligence. Logical Agents

Logic: First Order Logic

1.1 Language and Logic

Natural Deduction. Formal Methods in Verification of Computer Systems Jeremy Johnson

Logic, Sets, and Proofs

Theory of Computer Science

Conjunctive Normal Form and SAT

6. Logical Inference

In this chapter, we specify a deductive apparatus for PL.

Propositional Logic: Part II - Syntax & Proofs 0-0

Exercises 1 - Solutions

Topic 1: Propositional logic

PHIL012. SYMBOLIC LOGIC PROPOSITIONAL LOGIC DERIVATIONS

Review CHAPTER. 2.1 Definitions in Chapter Sample Exam Questions. 2.1 Set; Element; Member; Universal Set Partition. 2.

Language of Propositional Logic

Description Logics. Deduction in Propositional Logic. franconi. Enrico Franconi

Logical Agents (I) Instructor: Tsung-Che Chiang

CSC242: Intro to AI. Lecture 11. Tuesday, February 26, 13

Natural Deduction for Propositional Logic

Proof Methods for Propositional Logic

CS156: The Calculus of Computation Zohar Manna Autumn 2008

Announcements. CS311H: Discrete Mathematics. Propositional Logic II. Inverse of an Implication. Converse of a Implication

Preparing for the CS 173 (A) Fall 2018 Midterm 1

A brief introduction to Logic. (slides from

Propositional Logic: Methods of Proof. Chapter 7, Part II

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

Knowledge based Agents

Introduction to Sets and Logic (MATH 1190)

Computation and Logic Definitions

Propositional Logic: Equivalence

The statement calculus and logic

Class Assignment Strategies

EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS

Propositional Resolution Introduction

2. The Logic of Compound Statements Summary. Aaron Tan August 2017

Propositional Resolution

Logic. Introduction to Artificial Intelligence CS/ECE 348 Lecture 11 September 27, 2001

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

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

Solutions to Homework I (1.1)

2.2: Logical Equivalence: The Laws of Logic

Transcription:

Supplementary exercises in propositional logic The purpose of these exercises is to train your ability to manipulate and analyze logical formulas. Familiarize yourself with chapter 7.3-7.5 in the course book before starting. This kind of questions might appear in the final exam. 1. Construct truth tables for the following formulas. Use the truth tables to see if each formula is valid or at least satisfiable. (a) P (P Q) (b) ((P Q) Q) P 2. Prove the following equivalences using truth tables. (a) (P Q) P Q (b) P (Q R) (P Q) (P R) 3. Prove the following equivalences by rewriting the formulas according to the standard logical equivalences on page 210 in the course book. (a) P Q (P Q) (b) (P Q) R P (Q R) 4. Check if the following entailments hold by constructing truth tables for each formula. (a) P Q P Q (b) P (P Q) P Q (c) P P Q 5. Convert the following formulas to CNF (conjunctive normal form) using the method on page 215 in the course book. (a) ((P Q) Q) P (b) ( Q P) (P Q) (c) (P Q) ( P Q) 6. Prove the following using resolution. (Negate the conclusion, convert all formulas to CNF and then try to prove a contradiction.) (a) P Q P Q (b) {P Q, Q (R S), (P R) U} U

Solutions If you think you have found an error, please contact me via e-mail on petda@ida.liu.se 1. Using the defintion of each connective we can construct truth tables for whole formulas (see page 207). It is often easier to take it step by step and start by constructing a truth table for a subformula. When we are finished, each row in the truth table corresponds to an interpretation. If the formula is true in an interpretation, we say that it is a model. If the formula is true in some row, it is satisfiable. If it is true in all rows, it is valid. Then we call the formula a tautology. P Q P Q P (P Q) T T T T T F T T F T T T F F F T P Q P Q (P Q) Q ((P Q) Q) P T T T F T T F F F T F T T F T F F T T T 2. Two formulas are equivalent if they have the same truth value in all interpretations (all rows in the truth table). P Q (P Q) P Q T T F F T F T T F T F F P Q R (Q R) P (Q R) (P Q) (P R) (P Q) (P R) T T T T T T T T T T F F T T T T T F T F T T T T T F F F T T T T F T T T T T T T F T F F F T F F F F T F F F T F

3. There are of course many ways to rewrite a formula, but here are some suggestions. P Q P Q P Q (P Q) (P Q) R (P Q) R ( P Q) R P ( Q R) P (Q R) implication elimination double negation introduction De Morgan implication elimination De Morgan associativity implication introduction 4. The definition of entailment is that A B means that whenever A is true, B should also be true. The truth value of B in all other interpretations is not interesting. We only have to check the rows in the truth table where A is true. (a) Entailment holds. (b) Entailment does not hold. (c) Entailment holds (left hand side has no models at all). P Q P Q P Q T T T T Yes T F F T F T F T P Q P Q P (P Q) P Q T T T T T Yes T F F F T F T F T F No! F F F T T Yes P Q P P Q T T F T T F F F F T F T 5. Using the method from the book we rewrite the formulas in the following way: ((P Q) Q) P (( P Q) Q) P ( ( P Q) Q) P (( P Q) Q) P (P Q) (Q P) (P Q P) ( Q Q P) eliminate eliminate double negation and regroup distributivity law

( Q P) (P Q) ( Q P) ( P Q) ( Q P) ( P Q) ( Q P) ( P Q) ( Q P Q) (P P Q) eliminate eliminate double negations distributivity law (P Q) ( P Q) (P Q) (( P Q) (Q P)) eliminate (P Q) (( P Q) ( Q P)) eliminate ( P Q) ((P Q) ( Q P)) move in and eliminate double negations ( P Q P Q) ( P Q Q P) distributivity law P Q simplify (left clause is always true and there are two identical literals in the right one) 6. First we negate the conclusion (right hand side). Then we convert all formulas to CNF. Finally we do resolution and try to prove a contradiction (see page 215). Exericse (a) There is only one formula to the left, P Q, which is already in CNF, giving us the two clauses P and Q. We negate the right hand side, which gives us (P Q). This is equivalent to P Q, which gives us the two clauses P and Q. From this we can easily draw a resolution tree, e.g. combining P with P, which leads to a contradiction. Thus the original claim is proven. Exercise (b) We start by converting all formulas to CNF to find the clauses: P Q Q (R S) Q (R S) ( Q R) ( Q S) (P R) U (P R) U ( P R) U ( P U ) ( R U) which gives us the clause P Q which gives us the clauses Q R, Q S which gives us the clauses P U, R U To these clauses we add the negated conclusion which is simply U. Now we draw a resolution tree, trying to prove a contratiction (an empty clause).

P Q Q R Q S P U U R U P R Q R