1 Example: The following knowledge is given :The following knowledge is given : 1. Marcus was a man. 2. Marcus was a Pompeian. 3. All Pompeians were Romans.

Slides:



Advertisements
Similar presentations
Some Prolog Prolog is a logic programming language
Advertisements

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),
Knowledge & Reasoning Logical Reasoning: to have a computer automatically perform deduction or prove theorems Knowledge Representations: modern ways of.
CS.462 Artificial Intelligence SOMCHAI THANGSATHITYANGKUL Lecture 06 : First Order Logic Resolution Prove.
Standard Logical Equivalences
Automated Reasoning Systems For first order Predicate Logic.
AR: clausal logic The step to Resolution. A deeper study: Modus ponens Ground Horn Logic Unification Horn Logic Resolution Clausal Logic Clausal Logic.
1 Logic Logic in general is a subfield of philosophy and its development is credited to ancient Greeks. Symbolic or mathematical logic is used in AI. In.
Diagram 1 shows a four wires (w1, w2, w3 & w4) logic circuit.
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.
Artificial Intelligence Inference in first-order logic Fall 2008 professor: Luigi Ceccaroni.
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.
Resolution
Resolution Theorem Proving
Resolution in Propositional and First-Order Logic.
Chapter 6 Logical Reasoning Xiu-jun GONG (Ph. D) School of Computer Science and Technology, Tianjin University
KNOWLEDGE REASONING & INFERENCE KNOWLEDGE REASONING & INFERENCE 1 Dr. Abbas Fadhil M. A. AL-Juboori Computer Science Dept. – Kerbala University
Artificial Intelligence Chapter 14. Resolution in the Propositional Calculus Artificial Intelligence Chapter 14. Resolution in the Propositional Calculus.
Automated reasoning and theorem proving Introduction: logic in AI Automated reasoning: ResolutionUnificationNormalization.
Using Predicate Logic Chapter 5.
Predicate Logic Terms represent specific objects in the world and can be constants, variables or functions. Predicate Symbols refer to a particular relation.
RESOLUTION: A COMPLETE INFERENCE PROCEDURE. I Then we certainly want to be able to conclude S(A); S(A) is true if S(A) or R(A) is true, and one of those.
Propositional Calculus A propositional calculus formula is composed of atomic propositions, which area simply statements that are either true or false.
Outline Recap Knowledge Representation I Textbook: Chapters 6, 7, 9 and 10.
Inference in FOL Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 9 Spring 2004.
Logic and Proof. Argument An argument is a sequence of statements. All statements but the first one are called assumptions or hypothesis. The final statement.
Chapter 3 Propositional Logic
Propositional logic It represents real-world facts as logical propositions in well formed formulas. It presented as an atomic propositions, and complex.
Start with atomic sentences in the KB and apply Modus Ponens, adding new atomic sentences, until “done”.
Logical and Rule-Based Reasoning Part I. Logical Models and Reasoning Big Question: Do people think logically?
Knowledge & Reasoning Logical Reasoning: to have a computer automatically perform deduction or prove theorems Knowledge Representations: modern ways of.
CS1502 Formal Methods in Computer Science Lecture Notes 10 Resolution and Horn Sentences.
UBI517 Expert Systems 1 Lecture 2 Knowledge Representation.
SAT-solving An old AI technique becomes very popular in modern A.I.
Automated reasoning and theorem proving Introduction: logic in AI Automated reasoning: ResolutionUnificationNormalization.
Inference in First-Order logic Department of Computer Science & Engineering Indian Institute of Technology Kharagpur.
SAT-solving Introduction: logic in AI SAT-solving techniques: Unit-propagationLocal-search.
UNIVERSITI TENAGA NASIONAL 1 CSNB234 ARTIFICIAL INTELLIGENCE Chapter 3 Propositional Logic & Predicate Logic Chapter 3 Propositional Logic & Predicate.
CS 4100 Artificial Intelligence Prof. C. Hafner Class Notes Jan 19, 2012.
Computation. Binary Numbers Decimal numbers Binary numbers.
Logical Representations and Resolution. Boolean Logic Conjunctive normal form Resolution.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]
Logical Reasoning:Proof Prove the theorem using the basic axioms of algebra.
CSE LOGIC1 Propositional Logic An “adventure game” example Thinking?
9/30/98 Prof. Richard Fikes Inference In First Order Logic Computer Science Department Stanford University CS222 Fall 1998.
Automated Reasoning Early AI explored how to automated several reasoning tasks – these were solved by what we might call weak problem solving methods as.
Automated Reasoning Early AI explored how to automate several reasoning tasks – these were solved by what we might call weak problem solving methods as.
Automated Reasoning Systems For first order Predicate Logic.
Artificial Intelligence 7. Making Deductive Inferences Course V231 Department of Computing Imperial College, London Jeremy Gow.
Prolog Conversion to clause form Reference: Artificial Intelligence, by Elaine Rich and Kevin Knight.
Propositional Logic Predicate Logic
Propositional & Predicate Calculus _I
CS.462 Artificial Intelligence SOMCHAI THANGSATHITYANGKUL Lecture 05 : Knowledge Base & First Order Logic.
CIT 856 – Artificial Intelligence
Chapter 3 Propositional calculus Predicate calculus Artificial Intelligence Dr.Hassan Al-Tarawneh.
Knowledge Representation
Resolution in the Propositional Calculus
Automated reasoning and theorem proving
A I (Artificial Intelligence)
Knowledge Representation
Predicate Logic Lecture 7.
Inference in First-Order Logic Chapter 9
Knowledge & Reasoning Logical Reasoning: to have a computer automatically perform deduction or prove theorems Knowledge Representations: modern ways of.
Artificial Intelligence
CSNB234 ARTIFICIAL INTELLIGENCE
Quiz Nov Logic.
Teorie assiomatico-deduttive (calcolo dei predicati)
Proving Statements about Segments
Presentation transcript:

1 Example: The following knowledge is given :The following knowledge is given : 1. Marcus was a man. 2. Marcus was a Pompeian. 3. All Pompeians were Romans. 4. Caesar was a ruler. 5. All Romans were either loyal to Caesar or hated him. 6. Everyone is loyal to someone. 7. People only try to assassinate rulers to whom they are not loyal. 8. Marcus tried to assassinate Caesar. Can we automatically answer the following questions?Can we automatically answer the following questions? Was Marcus loyal to Caesar? Was Marcus loyal to Caesar? Did Marcus hate Caesar? Did Marcus hate Caesar?

2 Conversion to the First Order Logic: Representation of facts:Representation of facts: 1. Marcus was a man. man(Marcus) 2. Marcus was a Pompeian. Pompeian(Marcus) 4. Caesar was a ruler. ruler(Caesar) 8. Marcus tried to assassinate Caesar. try_assassinate(Marcus, Caesar)

3 5. All Romans were either loyal to Caesar or hated him. Conversion to the First Order Logic (2): General representation (representation of rules):General representation (representation of rules): 3. All Pompeians were Romans.  x Pompeian(x)  Roman(x) 6. Everyone is loyal to someone.  x  y loyal_to(x,y) 7. People only try to assassinate rulers to whom they are not loyal.  x  y person(x)  ruler(y)  try_assassinate(x,y)  ~loyal_to(x,y) ( )  ( )  ~(loyal_to(x,Caesar)  hates(x,Caesar)) XOR  x Roman(x)  loyal_to(x,Caesar)  hates(x,Caesar)

4 Prove that he did: The “theorem” ? Was Marcus loyal to Caesar? Did Marcus hate Caesar? hates(Marcus,Caesar) Try, for example, to prove that he was not : ~loyal_to(Marcus,Caesar)

5 A proof using backward-reasoning problem- reduction: ~loyal_to(Marcus,Caesar)  x  y person(x)  ruler(y)  try_assassinate(x,y)  ~loyal_to(x,y) + substitution: x/Marcus y/Caesar y/Caesar person(Marcus)  ruler(Caesar)  try_assassi- nate(Marcus,Caesar)  ~loyal_to(Marcus,Caesar) + Modus ponens person(Marcus) ruler(Cesar) AND try_assassinate(Marcus, Caesar) Done! 4. Done! 8. Extra rule:  x man(x)  person(x)  person(x) man(Marcus) Done!1.

6 Marcus example: RESOLUTION  x  y ~(man(x)  ruler(y)  try_assassinate(x,y))  ~loyal_to(x,y)  x  y ~man(x)  ~ruler(y)  ~try_assassinate(x,y)  ~loyal_to(x,y) false  man(x)  ruler(y)  try_assassinate(x,y)  loyal_to(x,y)  x loyal_to(x,f(x)) loyal_to(x,f(x)) Facts 1., 2., 4. and 8. were already o.k.:Facts 1., 2., 4. and 8. were already o.k.: – ex.: ruler(Caesar) 3.  x Pompeian(x)  Roman(x) : o.k. !3.  x Pompeian(x)  Roman(x) : o.k. ! 6.  x  y loyal_to(x,y)6.  x  y loyal_to(x,y) 7.  x  y man(x)  ruler(y)  try_assassinate(x,y)  ~loyal_to(x,y)7.  x  y man(x)  ruler(y)  try_assassinate(x,y)  ~loyal_to(x,y)

7 Axioms in Normal form:  1. man(Marcus)  2. Pompeian(Marcus)  3. Roman(x)  Pompeian(x)  4. ruler(Caesar)  5. loyal_to(x,Caesar)  hates(x,Caesar)  Roman(x)  6. loyal_to(x,f(x))  7. false  man(x)  ruler(y)  try_assassinate(x,y)  loyal_to(x,y)  8. try_assassinate(Marcus,Caesar) To show: hates(Marcus,Caesar) Negation: ~hates(Marcus,Caesar) Normal Form: false  hates(Marcus,Caesar)

8 Resolution proof (1): false  hates(Marcus,Caesar) loyal_to(x,Caesar)  hates(x,Caesar)  Roman(x) loyal_to(Marcus,Caesar)  Roman(Marcus) {x/Marcus}5. Roman(x)  Pompeian(x) loyal_to(Marcus,Caesar)  Pompeian(Marcus) {x/Marcus}3. Pompeian(Marcus) loyal_to(Marcus,Caesar) {}2.

9 Resolution proof (2) loyal_to(Marcus,Caesar) false  man(x)  ruler(y)  try_assassinate(x,y)  loyal_to(x,y) false  man(Marcus)  ruler(Caesar)  try_assassinate(Marcus,Caesar) 7.{x/Marcus,y/Caesar} man(Marcus) false  ruler(Caesar)  try_assassinate(Marcus,Caesar) 1. {} ruler(Caesar) false  try_assassinate(Marcus,Caesar) 4.{} try_assassinate(Marcus,Caesar) false  8.{}