Resolution in Propositional and First-Order Logic.

Slides:



Advertisements
Similar presentations
Propositional and First-Order Logic
Advertisements

Some Prolog Prolog is a logic programming language
Inference Rules Universal Instantiation Existential Generalization
1 A formula in predicate logic An atom is a formula. If F is a formula then (~F) is a formula. If F and G are Formulae then (F /\ G), (F \/ G), (F → G),
UIUC CS 497: Section EA Lecture #2 Reasoning in Artificial Intelligence Professor: Eyal Amir Spring Semester 2004.
Artificial Intelligence
Inference and Reasoning. Basic Idea Given a set of statements, does a new statement logically follow from this. For example If an animal has wings and.
We have seen that we can use Generalized Modus Ponens (GMP) combined with search to see if a fact is entailed from a Knowledge Base. Unfortunately, there.
For Friday No reading Homework: –Chapter 9, exercise 4 (This is VERY short – do it while you’re running your tests) Make sure you keep variables and constants.
Logic Use mathematical deduction to derive new knowledge.
Agents That Reason Logically Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 7 Spring 2004.
Propositional Logic CMSC 471 Chapter , 7.7 and Chuck Dyer
Resolution Theorem Proving
Propositional Logic Russell and Norvig: Chapter 6 Chapter 7, Sections 7.1—7.4 Slides adapted from: robotics.stanford.edu/~latombe/cs121/2003/home.htm.
Logic.
CPSC 422, Lecture 21Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 21 Mar, 4, 2015 Slide credit: some slides adapted from Stuart.
Logic Concepts Lecture Module 11.
Artificial Intelligence Chapter 14. Resolution in the Propositional Calculus Artificial Intelligence Chapter 14. Resolution in the Propositional Calculus.
Outline Recap Knowledge Representation I Textbook: Chapters 6, 7, 9 and 10.
Computability and Complexity 9-1 Computability and Complexity Andrei Bulatov Logic Reminder (Cnt’d)
Formal Logic Proof Methods Direct Proof / Natural Deduction Conditional Proof (Implication Introduction) Reductio ad Absurdum Resolution Refutation.
Proof methods Proof methods divide into (roughly) two kinds: –Application of inference rules Legitimate (sound) generation of new sentences from old Proof.
Inference in FOL Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 9 Spring 2004.
ITCS 3153 Artificial Intelligence Lecture 11 Logical Agents Chapter 7 Lecture 11 Logical Agents Chapter 7.
Logic in Computer Science Transparency No Chapter 3 Propositional Logic 3.6. Propositional Resolution.
Inference and Resolution for Problem Solving
Knoweldge Representation & Reasoning
Inference in First-Order Logic
Chapter 3 Propositional Logic
Inference in FOL Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 9 Fall 2004.
Artificial Intelligence Chapter 14 Resolution in the Propositional Calculus Artificial Intelligence Chapter 14 Resolution in the Propositional Calculus.
CS1502 Formal Methods in Computer Science Lecture Notes 10 Resolution and Horn Sentences.
Propositional Logic Reasoning correctly computationally Chapter 7 or 8.
INFERENCE IN FIRST-ORDER LOGIC IES 503 ARTIFICIAL INTELLIGENCE İPEK SÜĞÜT.
Logical Inference 3 resolution
Propositional Resolution Computational LogicLecture 4 Michael Genesereth Spring 2005.
Inference in First-Order logic Department of Computer Science & Engineering Indian Institute of Technology Kharagpur.
CS 4100 Artificial Intelligence Prof. C. Hafner Class Notes Jan 19, 2012.
CHAPTERS 7, 8 Oliver Schulte Logical Inference: Through Proof to Truth.
Logical Inference 2 rule based reasoning
Logical Agents Logic Propositional Logic Summary
1 Knowledge Representation. 2 Definitions Knowledge Base Knowledge Base A set of representations of facts about the world. A set of representations of.
1 CMSC 471 Fall 2002 Class #10/12–Wednesday, October 2 / Wednesday, October 9.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
Unification Algorithm Input: a finite set Σ of simple expressions Output: a mgu for Σ (if Σ is unifiable) 1. Set k = 0 and  0 = . 2. If Σ  k is a singleton,
CS Introduction to AI Tutorial 8 Resolution Tutorial 8 Resolution.
Automated Reasoning Systems For first order Predicate Logic.
CS6133 Software Specification and Verification
Logical Inference Chapter 9 Some material adopted from notes by Andreas Geyer-Schulz,, Chuck Dyer, and Mary Getoor.
For Wednesday Finish reading chapter 10 – can skip chapter 8 No written homework.
Logical Agents Chapter 7 Andreas Geyer-Schulz and Chuck Dyer
Backward chaining Assume the same representation of rules as in forward chaining, i.e. If is true, is true, … is true Then is true. Rule interpretation.
1 CSC 463 Fall 2010 Class #13. 2 Logical Inference Chapter 7.5, 9 Some material adopted from notes by Andreas Geyer-Schulz, Chuck Dyer, and Lise Getoor.
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
Propositional and First-Order Logic Chapter 7.4─7.8, 8.1─8.3, 8.5 Some material adopted from notes by Andreas Geyer-Schulz and Chuck Dyer.
Proof Methods for Propositional Logic CIS 391 – Intro to Artificial Intelligence.
Foundations of Discrete Mathematics Chapter 1 By Dr. Dalia M. Gil, Ph.D.
Knowledge Repn. & Reasoning Lecture #9: Propositional Logic UIUC CS 498: Section EA Professor: Eyal Amir Fall Semester 2005.
1 Intro to AI Logical Agents. 2 Intro to AI Outline Logic Efficient satisfiability testing by backtracking search Efficient satisfiability testing by.
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
EA C461 Artificial Intelligence
Logical Inference 2 Rule-based reasoning
Knowledge Representation and Reasoning
Resolution in the Propositional Calculus
Logical Inference 2 Rule-based reasoning
Biointelligence Lab School of Computer Sci. & Eng.
CS 416 Artificial Intelligence
Biointelligence Lab School of Computer Sci. & Eng.
Logical Inference Chapter 9 Chuck Dyer, and mary Getoor
Propositional Logic CMSC 471 Chapter , 7.7 and Chuck Dyer
Presentation transcript:

Resolution in Propositional and First-Order Logic

Inference rules Logical inference creates new sentences that logically follow from a set of sentences (KB) An inference rule is sound if every sentence X it produces when operating on a KB logically follows from the KB – i.e., inference rule creates no contradictions An inference rule is complete if it can produce every expression that logically follows from (is entailed by) the KB. – Note analogy to complete search algorithms

Sound rules of inference Here are some examples of sound rules of inference Each can be shown to be sound using a truth table RULEPREMISECONCLUSION Modus PonensA, A  BB And IntroductionA, BA  B And EliminationA  BA Double Negation  AA Unit ResolutionA  B,  BA ResolutionA  B,  B  CA  C

Soundness of modus ponens ABA → BOK? True  False  True  False True 

Resolution Resolution is a valid inference rule producing a new clause implied by two clauses containing complementary literals – A literal is an atomic symbol or its negation, i.e., P, ~P Amazingly, this is the only interference rule you need to build a sound and complete theorem prover – Based on proof by contradiction and usually called resolution refutation The resolution rule was discovered by Alan Robinson (CS, U. of Syracuse) in the mid 60s

Resolution A KB is actually a set of sentences all of which are true, i.e., a conjunction of sentences. To use resolution, put KB into conjunctive normal form (CNF), where each sentence written as a disjunc- tion of (one or more) literals Example KB: [P  Q, Q  R  S] KB in CNF: [~P  Q, ~Q  R, ~Q  S] Resolve KB(1) and KB(2) producing: ~P  R (i.e., P  R) Resolve KB(1) and KB(3) producing: ~P  S (i.e., P  S) New KB: [~P  Q, ~Q  ~R  ~S, ~P  R, ~P  S] Tautologies (A  B)↔(~A  B) (A  (B  C)) ↔(A  B)  (A  C)

Soundness of the resolution inference rule From the rightmost three columns of this truth table, we can see that (α  β)  (β  γ) ↔ (α  γ) is valid (i.e., always true regardless of the truth values assigned to α, β and γ

Resolution Resolution is a sound and complete inference procedure for unrestricted FOL Reminder: Resolution rule for propositional logic: – P 1  P 2 ...  P n –  P 1  Q 2 ...  Q m – Resolvent: P 2 ...  P n  Q 2 ...  Q m We’ll need to extend this to handle quantifiers and variables

Resolution covers many cases Modes Ponens – from P and P  Q derive Q – from P and  P  Q derive Q Chaining – from P  Q and Q  R derive P  R – from (  P  Q) and (  Q  R) derive  P  R Contradiction detection – from P and  P derive false – from P and  P derive the empty clause (=false)

Resolution in first-order logic Given sentences in conjunctive normal form: – P 1 ...  P n and Q 1 ...  Q m – P i and Q i are literals, i.e., positive or negated predicate symbol with its terms if P j and  Q k unify with substitution list θ, then derive the resolvent sentence: subst(θ, P 1  …  P j-1  P j+1 …P n  Q 1  …Q k-1  Q k+1  …  Q m ) Example – from clause P(x, f(a))  P(x, f(y))  Q(y) – and clause  P(z, f(a))   Q(z) – derive resolvent P(z, f(y))  Q(y)   Q(z) – Using θ = {x/z}

A resolution proof tree

~P(w) v Q(w)~Q(y) v S(y) ~P(w) v S(w) P(x) v R(x) ~True v P(x) v R(x) S(x) v R(x) ~R(w) v S(w) S(A)

Resolution refutation Given a consistent set of axioms KB and goal sentence Q, show that KB |= Q Proof by contradiction: Add  Q to KB and try to prove false, i.e.: (KB |- Q) ↔ (KB   Q |- False) Resolution is refutation complete: it can establish that a given sentence Q is entailed by KB, but can’t (in general) generate all logical consequences of a set of sentences Also, it cannot be used to prove that Q is not entailed by KB Resolution won’t always give an answer since entailment is only semi-decidable – And you can’t just run two proofs in parallel, one trying to prove Q and the other trying to prove  Q, since KB might not entail either one

Resolution example KB: – allergies(X)  sneeze(X) – cat(Y)  allergicToCats(X)  allergies(X) – cat(felix) – allergicToCats(mary) Goal: – sneeze(mary)

Refutation resolution proof tree  allergies(w) v sneeze(w)  cat(y) v ¬allergicToCats(z)  allergies(z)  cat(y) v sneeze(z)  ¬allergicToCats(z) cat(felix) sneeze(z) v ¬allergicToCats(z)allergicToCats(mary) false  sneeze(mary) sneeze(mary) w/z y/felix z/mary negated query Notation old/new