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

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

Propositional Logic Logical Implication (4A) Young W. Lim 4/11/17

Propositional Logic Logical Implication (4A) Young W. Lim 4/21/17

Propositional Logic Arguments (5A) Young W. Lim 11/30/16

Propositional Logic Arguments (5A) Young W. Lim 10/11/16

First Order Logic Implication (4A) Young W. Lim 4/6/17

Propositional Logic Arguments (5A) Young W. Lim 11/8/16

Propositional Logic (2A) Young W. Lim 11/8/15

Propositional Logic Arguments (5A) Young W. Lim 2/23/17

Logic Background (1A) Young W. Lim 5/14/18

First Order Logic Arguments (5A) Young W. Lim 2/24/17

Propositional Logic Arguments (5B) Young W. Lim 11/30/16

Propositional Logic Arguments (5A) Young W. Lim 11/29/16

First Order Logic Arguments (5A) Young W. Lim 3/10/17

First Order Logic Semantics (3A) Young W. Lim 8/9/17

First Order Logic Semantics (3A) Young W. Lim 9/17/17

Logic Background (1A) Young W. Lim 12/14/15

Resolution (14A) Young W. Lim 8/15/14

Implication (6A) Young Won Lim 3/17/18

Logic (3A) Young W. Lim 10/29/13

First Order Logic (1A) Young W. Lim 11/5/13

Logic (3A) Young W. Lim 12/5/13

Logic (3A) Young W. Lim 11/2/13

Logic (3A) Young W. Lim 10/31/13

Resolution (7A) Young Won Lim 4/21/18

Relations (3A) Young Won Lim 3/27/18

Implication (6A) Young Won Lim 3/12/18

First Order Logic (1A) Young W. Lim 11/18/13

Higher Order ODE's (3A) Young Won Lim 7/7/14

Inference in Propositional Logic

Higher Order ODE's (3A) Young Won Lim 12/27/15

Propositional Resolution

COMP219: Artificial Intelligence. Lecture 20: Propositional Reasoning

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

Supplementary exercises in propositional logic

COMP9414: Artificial Intelligence Propositional Logic: Automated Reasoning

CSC Discrete Math I, Spring Propositional Logic

Propositional Calculus: Formula Simplification, Essential Laws, Normal Forms

Matrix Transformation (2A) Young Won Lim 11/10/12

2.2: Logical Equivalence: The Laws of Logic

Logic and Inferences

Tautologies, Contradictions, and Contingencies

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

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

The Growth of Functions (2A) Young Won Lim 4/6/18

Introduction Logic Inference. Discrete Mathematics Andrei Bulatov

General CORDIC Description (1A)

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

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

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

Expected Value (10D) Young Won Lim 6/12/17

Inference Methods In Propositional Logic

Higher Order ODE's (3A) Young Won Lim 7/8/14

Propositional Resolution Introduction

Advanced Topics in LP and FP

Language of Propositional Logic

CS 730/730W/830: Intro AI

Inference Methods In Propositional Logic

Part 1: Propositional Logic

Bayes Theorem (4A) Young Won Lim 3/5/18

Introduction to ODE's (0A) Young Won Lim 3/9/15

Compound Propositions

Root Locus (2A) Young Won Lim 10/15/14

Knowledge based Agents

Background Trigonmetry (2A) Young Won Lim 5/5/15

Fourier Analysis Overview (0A)

Propositional Logic Language

CT Rectangular Function Pairs (5B)

Propositional Resolution Part 1. Short Review Professor Anita Wasilewska CSE 352 Artificial Intelligence

CS 730/830: Intro AI. 3 handouts: slides, asst 6, asst 7. Wheeler Ruml (UNH) Lecture 12, CS / 16. Reasoning.

Audio Signal Generation. Young Won Lim 1/29/18

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

Separable Equations (1A) Young Won Lim 3/24/15

Differentiation Rules (2A) Young Won Lim 1/30/16

Comp487/587 - Boolean Formulas

DFT Frequency (9A) Each Row of the DFT Matrix. Young Won Lim 7/31/10

Overview. I Review of natural deduction. I Soundness and completeness. I Semantics of propositional formulas. I Soundness proof. I Completeness proof.

CS156: The Calculus of Computation

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

CSE 311: Foundations of Computing. Lecture 2: More Logic, Equivalence & Digital Circuits

What is Logic? Introduction to Logic. Simple Statements. Which one is statement?

Detect Sensor (6B) Eddy Current Sensor. Young Won Lim 11/19/09

Logic: First Order Logic

Complex Trigonometric and Hyperbolic Functions (7A)

Introduction to Artificial Intelligence Propositional Logic & SAT Solving. UIUC CS 440 / ECE 448 Professor: Eyal Amir Spring Semester 2010

Propositional Logic: Models and Proofs

A brief introduction to Logic. (slides from

Logic: Propositional Logic (Part I)

Deductive Systems. Lecture - 3

cse 311: foundations of computing Fall 2015 Lecture 6: Predicate Logic, Logical Inference

Hamiltonian Cycle (3A) Young Won Lim 5/5/18

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

Propositional logic II.

General Vector Space (2A) Young Won Lim 11/4/12

Propositional Reasoning

CSE 20 DISCRETE MATH WINTER

Discrete Structures of Computer Science Propositional Logic III Rules of Inference

Artificial Intelligence. Propositional logic

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

Normal Forms of Propositional Logic

Transcription:

Propositional Logic Resolution (6A) Young W. Lim

Copyright (c) 2016 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". Please send corrections (or suggestions) to youngwlim@hotmail.com. This document was produced by using LibreOffice

Based on Contemporary Artificial Intelligence, R.E. Neapolitan & X. Jiang Logic and Its Applications, Burkey & Foxley 3

Definitions A literal : A proposition of the form A or A, Where A is an atomic proposition other than True or False A conjunctive clause A conjunction of literal A disjunctive clause A disjunction of literal A disjunctive normal form proposition The disjunction of conjunctive clause A conjunctive normal form proposition The conjunction of disjunctive clause 4

Definitions A literal : A 1, A 2,, A n, B 1, B 2,, B n, C 1, C 2,, C n A conjunctive clause (A 1 A 2 A n ) A disjunctive clause (B 1 B 2 B n ) A disjunctive normal form proposition (A 1 A n ) (B 1 B n ) (C 1 C n ) A conjunctive normal form proposition (A 1 A n ) (B 1 B n ) (C 1 C n ) 5

Logical Equivalences Commutativity Law A B B A, A B B A Distributivity Law A (B C) (A B) (A C), A (B C) (A B) (A C) De Morgan s Law (A B) A B, (A B) A B Implication Elimination A B A B If and Only If Elimination Double Negation A B (A B) (B A) ( A B) ( B A) A A A (B C) (A B) (A C) (A B) C (A C) (B C) 6

Logical Equivalences Commutativity Law A B B A, A B B A Distributivity Law A (B C) (A B) (A C), A (B C) (A B) (A C) De Morgan s Law (A B) A B, (A B) A B Implication Elimination A B A B If and Only If Elimination Double Negation A B (A B) (B A) ( A B) ( B A) A A ((P Q) R) (( P Q) R) Implication Elimination ( P Q) R De Morgan s Law ( P Q) R Double Negation ( P Q) R De Morgan s Law (P Q) R Double Negation (P R) ( Q R) Distributive Law 7

Logical Equivalences Commutativity Law A B B A, A B B A Distributivity Law A (B C) (A B) (A C), A (B C) (A B) (A C) De Morgan s Law (A B) A B, (A B) A B Implication Elimination A B A B If and Only If Elimination Double Negation A B (A B) (B A) ( A B) ( B A) A A (P Q) (R S) ((P Q) R) ((P Q) S) Distributive Law (P R) (Q R) ((P Q) S) Distributive Law (P R) (Q R) (P S) (P S) Distributive Law 8

Conjunctive Normal Form Algorithm Procedure Conj_Normal_From (var Proposition); Remove all Remove all Repeat A A (A B) A B (A B) A B Until the only negations are single negations of atomic propositions Repeat A (B C) (A B) (A C) (A B) C (A C) (B C) Until proposition is in conjunctive normal form 9

Conjunctive Normal Form Algorithm detail Input: a proposition Output : a logically equivalent proposition in conjunctive normal form Procedure Conj_Normal_From (var Proposition); Remove all using the iff elimination law; Remove all using the implication elimination law; Repeat If there are any double negations Remove them using the double negation law; If there are any negations of non-atomic propositions (A B), (A B) Remove them using the DeMorgan s law; Until the only negations are single negations of atomic propositions Repeat If there are any disjunctions in which one or more terms is a conjuction Remove them using the following laws A (B C) (A B) (A C) (A B) C (A C) (B C); Until proposition is in conjunctive normal form 10

Refutation An argument consisting of the premises A 1, A 2,, A n and the conclusion B The negation of the conclusion B A 1, A 2,, A n B A 1 A 2 A n B Contradiction A 1, A 2,, A n B A 1 A 2 A n B False A 1, A 2,, A n B A 1 A 2 A n B Always True A 1, A 2,, A n B A 1 A 2 A n B Tautology 11

Resolution (A P), (B P) A B Resolution is on P Resolvent : A B (A P) (B P) When P: (A T) (B F) B When P: (A F) (B T) A (A B) (A P) (B P) A (B P) P (B P) (A B) (A P) ( P B) ( P P) When P: (A B) (B) B When P: (A B) (A) A (A B) (A P) (B P) A B 12

Resolution (A P), (B P) A B Resolution is on P Resolvent : A B (Q P), (R P) Q R Resolution is on P Resolvent : Q R (P Q R), ( S Q) P R S Resolution is on Q Resolvent : P R S (A P) (B P) A B (Q P), (R P) Q R (P Q R), ( S Q) (P R) S 13

Resolution A, (A B) B CNF A, ( A B) A ( A B) (A A) (A B) A, B B 1. A Premise 2. ( A B) Premise 3. B Negation of conclusion 4. B Resolvent 1 & 2 B B B, B False 5. False Resolvent of 3 & 4 14

Resolution (A B), (B C) (A C) CNF ( A B), ( B C) ( A C) A C A, C 1. ( A B) Premise 2. ( B C) Premise 3. A Added Premise from the Negation of conclusion 4. C Added Premise from the Negation of conclusion 5. B Resolvent of 1 & 3 6. B Resolvent of 2 & 4 7. False Resolvent of 5 & 6 ( A B), ( B C), A, C ( A B) A A B A, B ( B C) C B C B, C B, B False 15

Resolution Set_of_Support: initially the negation of the conclusion Auxiliary_Set : no two clauses in this set resolve to False (all the premises) Perform all possible resolutions Where one clauses is from the Set of support All the Resolvents obtained in this way are added into the Set of support each clause C in Set_of_Support each clauses D in Auxilary_Set Set_of_Support Resolvents = set of clauses obtained by resolving C and D; If False Resolvents return True; else New = New Resolvents endif until New Set_of_Support; 16

Resolution Algorithm Set_of_Support_Resolution Input: A set Premises containing the premises in an argument; The Conclusion in the argument. Output: The value True if Premises entail Conclusion; False otherwise Function Premises_Entail_Conclusion (Premises, Conclusion) Set_of_Support = clauses derived from the negation of Conclusion; Auxiliary_Set = clauses derived from Premises; New = { }; Repeat Set_of_Support = Set_of_Support New; for each clause C in Set_of_Support for each clauses D in Auxilary_Set Set_of_Support Resolvents = set of clauses obtained by resolving C and D; If False Resolvents return True; else New = New Resolvents endif endfor endfor until New Set_of_Support; return False; 17

Resolution Set_of_Support = clauses derived from the negation of Conclusion; Set_of_Support = Set_of_Support New; Auxiliary_Set = clauses derived from Premises; New = { }; New = New Resolvents each clause C in Set_of_Support each clauses D in Auxilary_Set Set_of_Support Resolvents = set of clauses obtained by resolving C and D; If False Resolvents return True; else New = New Resolvents endif until New Set_of_Support; 18

Resolution A, (A B) B New Set of Support Auxiliary Set CNF A, ( A B), B B, ( A B) A A, A False { } { } { A} { A} { A, False} { } { B} { B, A} { } {A, ( A B) } {A, ( A B) } 19

Resolution (A B), (B C) (A C) CNF ( A B), ( B C), A, C A, ( A B) B C, ( B C) B B, B False New { } { } {B} {B} {B, B} {B, B} {B, B, False} Set of Support { } {A, C} {A, C} {A, C, B} {A, C, B} {A, C, B, B} Auxiliary Set { } {( A B), ( B C) } {( A B), ( B C) } {( A B), ( B C) } {( A B), ( B C) } {( A B), ( B C) } 20

Logical Equivalences,,,, 21

References [1] en.wikipedia.org [2] en.wiktionary.org [3] U. Endriss, Lecture Notes : Introduction to Prolog Programming [4] http://www.learnprolognow.org/ Learn Prolog Now! [5] http://www.csupomona.edu/~jrfisher/www/prolog_tutorial [6] www.cse.unsw.edu.au/~billw/cs9414/notes/prolog/intro.html [7] www.cse.unsw.edu.au/~billw/dictionaries/prolog/negation.html [8] http://ilppp.cs.lth.se/, P. Nugues,` An Intro to Lang Processing with Perl and Prolog 22