Prolog Conversion to clause form Reference: Artificial Intelligence, by Elaine Rich and Kevin Knight.

Slides:



Advertisements
Similar presentations
Dr.A.Kannan Professor Dept of CSE Anna University Chennai-25
Advertisements

Artificial Intelligence 8. The Resolution Method
Resolution Proof System for First Order Logic
Rule-Based Deduction Systems
Knowledge & Reasoning Logical Reasoning: to have a computer automatically perform deduction or prove theorems Knowledge Representations: modern ways of.
Standard Logical Equivalences
First Order Logic Resolution
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.
Resolution
13 Automated Reasoning 13.0 Introduction to Weak Methods in Theorem Proving 13.1 The General Problem Solver and Difference Tables 13.2 Resolution.
F22H1 Logic and Proof Week 7 Clausal Form and Resolution.
Resolution Proof Example Prateek Tandon, John Dickerson.
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.
Discussion #16 1/12 Discussion #16 Validity & Equivalences.
Prolog IV Logic, condensed. 2 Propositional logic Propositional logic consists of: The logical values true and false ( T and F ) Propositions: “Sentences,”
Formal Logic Proof Methods Direct Proof / Natural Deduction Conditional Proof (Implication Introduction) Reductio ad Absurdum Resolution Refutation.
Inference in FOL Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 9 Spring 2004.
1 Automated Reasoning Introduction to Weak Methods in Theorem Proving 13.1The General Problem Solver and Difference Tables 13.2Resolution Theorem.
Inference and Resolution for Problem Solving
Artificial Intelligence
Start with atomic sentences in the KB and apply Modus Ponens, adding new atomic sentences, until “done”.
Knowledge & Reasoning Logical Reasoning: to have a computer automatically perform deduction or prove theorems Knowledge Representations: modern ways of.
CSE 311 Foundations of Computing I Lecture 6 Predicate Logic, Logical Inference Spring
UBI517 Expert Systems 1 Lecture 2 Knowledge Representation.
Logic. 2 What is logic? Logic is an “algebra” for manipulating only two values: true ( T ) and false ( F ) Nevertheless, logic can be quite challenging.
Mathematical Structures A collection of objects with operations defined on them and the accompanying properties form a mathematical structure or system.
Inference in First-Order logic Department of Computer Science & Engineering Indian Institute of Technology Kharagpur.
For Wednesday Read chapter 10 Prolog Handout 4. Exam 1 Monday Take home due at the exam.
UNIVERSITI TENAGA NASIONAL 1 CSNB234 ARTIFICIAL INTELLIGENCE Chapter 3 Propositional Logic & Predicate Logic Chapter 3 Propositional Logic & Predicate.
Conjunctive normal form: any formula of the predicate calculus can be transformed into a conjunctive normal form. Def. A formula is said to be in conjunctive.
1 Chapter 8 Inference and Resolution for Problem Solving.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
Prolog IV Logic.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
Logical Representations and Resolution. Boolean Logic Conjunctive normal form Resolution.
1CS3754 Class Notes 14B, John Shieh, Figure 2.5: Further steps in the unification of (parents X (father X) (mother bill)) and (parents bill.
CS Introduction to AI Tutorial 8 Resolution Tutorial 8 Resolution.
Math 51/COEN 19 Day 3, 1.4 Quantifiers 1. 3 Predicates A lot like functions that return booleans Let P(x) denote x
CSE 311 Foundations of Computing I Lecture 7 Logical Inference Autumn 2012 CSE
Scope, free variable, closed wff §In  X(A) or  X(A), where A is a wff : X is called the variable quantified over; A is said to be (within) the scope.
Automated Reasoning Early AI explored how to automated several reasoning tasks – these were solved by what we might call weak problem solving methods as.
CPSC 386 Artificial Intelligence Ellen Walker Hiram College
Chapter 2 Logic 2.1 Statements 2.2 The Negation of a Statement 2.3 The Disjunction and Conjunction of Statements 2.4 The Implication 2.5 More on Implications.
C. Varela1 Logic Programming (PLP 11) Predicate Calculus, Horn Clauses, Clocksin-Mellish Procedure Carlos Varela Rennselaer Polytechnic Institute November.
Reasoning using First-Order Logic
For Wednesday Finish reading chapter 10 – can skip chapter 8 No written homework.
CIT 856 – Artificial Intelligence
Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil Johri CS 440 / ECE 448 Introduction to Artificial Intelligence.
Converting arbitrary wffs to CNF A wff is in prenex form iff it consists of a string of quantifiers (called a prefix) followed by a quantifier free formula.
Chapter 3 Propositional calculus Predicate calculus Artificial Intelligence Dr.Hassan Al-Tarawneh.
Artificial Intelligence
Conversion to Conjunctive Normal Form. Assertion All Romans who know Marcus either hate Caesar or think than anyone who hates anyone is crazy. All Romans.
CS621: Artificial Intelligence
CSNB 143 Discrete Mathematical Structures
A I (Artificial Intelligence)
For Monday Read Prolog handout 4 Homework:
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.
CHAPTER 1: LOGICS AND PROOF
Artificial Intelligence
Carlos Varela Rensselaer Polytechnic Institute November 10, 2017
(1.4) An Introduction to Logic
Prolog IV Logic, condensed.
Negations of quantifiers
CSNB234 ARTIFICIAL INTELLIGENCE
RESOLUTION.
Resolution Proof System for First Order Logic
Carlos Varela Rennselaer Polytechnic Institute August 30, 2007
LECTURE 06 Logical Agent Course : T0264 – Artificial Intelligence
Presentation transcript:

Prolog Conversion to clause form Reference: Artificial Intelligence, by Elaine Rich and Kevin Knight

I’m thinking of something. A. Animal B. Vegetable C. Mineral

3 Running example All Romans who know Marcus either hate Caesar or think that anyone who hates anyone is crazy  x, [ Roman(x)  know(x, Marcus) ]  [ hate(x, Caesar)  (  y,  z, hate(y, z)  thinkCrazy(x, y))]

4 Step 1: Eliminate implications Use the fact that x  y is equivalent to  x  y  x, [ Roman(x)  know(x, Marcus) ]  [ hate(x, Caesar)  (  y,  z, hate(y, z)  thinkCrazy(x, y))]  x,  [ Roman(x)  know(x, Marcus) ]  [hate(x, Caesar)  (  y,  (  z, hate(y, z)  thinkCrazy(x, y))]

5 Step 2: Reduce the scope of  Reduce the scope of negation to a single term, using:  (  p)  p  (a  b)  (  a   b)  (a  b)  (  a   b)  x, p(x)   x,  p(x)  x, p(x)   x,  p(x)  x,  [ Roman(x)  know(x, Marcus) ]  [hate(x, Caesar)  (  y,  (  z, hate(y, z)  thinkCrazy(x, y))]  x, [  Roman(x)   know(x, Marcus) ]  [hate(x, Caesar)  (  y,  z,  hate(y, z)  thinkCrazy(x, y))]

6 Step 3: Standardize variables apart  x, P(x)   x, Q(x) becomes  x, P(x)   y, Q(y) This is just to keep the scopes of variables from getting confused Not necessary in our running example

7 Step 4: Move quantifiers Move all quantifiers to the left, without changing their relative positions  x, [  Roman(x)   know(x, Marcus) ]  [hate(x, Caesar)  (  y,  z,  hate(y, z)  thinkCrazy(x, y)]  x,  y,  z,[  Roman(x)   know(x, Marcus) ]  [hate(x, Caesar)  (  hate(y, z)  thinkCrazy(x, y))]

8 Step 5: Eliminate existential quantifiers We do this by introducing Skolem functions: If  x, p(x) then just pick one; call it x’ If the existential quantifier is under control of a universal quantifier, then the picked value has to be a function of the universally quantified variable: If  x,  y, p(x, y) then  x, p(x, y(x)) Not necessary in our running example

9 Step 6: Drop the prefix (quantifiers)  x,  y,  z,[  Roman(x)   know(x, Marcus) ]  [hate(x, Caesar)  (  hate(y, z)  thinkCrazy(x, y))] At this point, all the quantifiers are universal quantifiers We can just take it for granted that all variables are universally quantified [  Roman(x)   know(x, Marcus) ]  [hate(x, Caesar)  (  hate(y, z)  thinkCrazy(x, y))]

10 Step 7: Create a conjunction of disjuncts [  Roman(x)   know(x, Marcus) ]  [hate(x, Caesar)  (  hate(y, z)  thinkCrazy(x, y))] becomes  Roman(x)   know(x, Marcus)  hate(x, Caesar)   hate(y, z)  thinkCrazy(x, y)

11 Step 8: Create separate clauses Every place we have an , we break our expression up into separate pieces Not necessary in our running example

12 Step 9: Standardize apart Rename variables so that no two clauses have the same variable Not necessary in our running example Final result:  Roman(x)   know(x, Marcus)  hate(x, Caesar)   hate(y, z)  thinkCrazy(x, y) That’s it! It’s a long process, but easy enough to do mechanically

13 The End