Resolution in FOPC. Deepak Kumar November Knowledge Engineering in FOPC

Size: px
Start display at page:

Download "Resolution in FOPC. Deepak Kumar November Knowledge Engineering in FOPC"

Transcription

1 Resolution in FOPC Deepak Kumar November 2017 Knowledge Engineering in FOPC Identify the task Assemble relevant knowledge Decide on a vocabulary of predicates, functions, and constants Encode general knowledge about the domain Encode a description of the specific problem instance Pose queries to the inference procedure and get answers Debug the knowledge base 2 1

2 FOPC Inference Rules Inference rules for Quantifiers (, ) Universal Instantiation Existential Instantiation Generalized Modus Ponens Unification Forward & Backward Chaining Definite Clauses Logic Programming in Prolog Resolution Reductio ad Absurdum 3 Resolution in Propositional Logic New rule of inference that combines Modus Ponens, as well as others, in one rule. Requires wffs to be in a special form: A wff is either a literal: P, P Or a clause a disjunction of literals: P Q R An empty set is equivalent to False: { } False Rule: Resolvent ω ω 1 ω k ω α 1 α m ω 1 ω k α 1 α m 4 2

3 Resolution Rule: ω ω 1 ω k ω α 1 α m ω 1 ω k α 1 α m Example: R P P Q R Q 5 Example: x y z [American(x) Weapon(y) Sells(x, y, z) Hostile(z) Criminal(x)] Becomes: American(x) Weapon(y) Sells(x, y, z) Hostile(z) Criminal(x) Procedure to convert FOPC wffs to CNF is similar to Propositional wffs except we need to - Eliminate - Have only quatified variables 3

4 2. Move inwards 3. Standardize Variables 4. Skolemize (i.e. Eliminate ) 5. Drop 6. Distribute over to get CNF 7. Write as clauses Example: Everyone who loves all animals is loved by someone. x [ y [ Animal(y) Loves(x, y) ] [ y Loves(y, x)] ] ] x [ y [ Animal(y) Loves(x, y) ] [ y Loves(y, x)] ] ] x [ y Animal(y) Loves(x, y) ] [ y Loves(y, x)] ] 4

5 x [ y [ Animal(y) Loves(x, y) ] [ y Loves(y, x)] ] ] x [ y Animal(y) Loves(x, y) ] [ y Loves(y, x)] ] 2. Move inwards x [ y Animal(y) Loves(x, y) ] [ y Loves(y, x)] ] x [ y Animal(y) Loves(x, y) ] [ y Loves(y, x)] ] x [ y Animal(y) Loves(x, y) ] [ y Loves(y, x)] ] 2. Move inwards x [ y Animal(y) Loves(x, y) ] [ y Loves(y, x)] ] 3. Standardize Variables x [ y Animal(y) Loves(x, y) ] [ z Loves(z, x)] ] 5

6 2. Move inwards x [ y Animal(y) Loves(x, y) ] [ y Loves(y, x)] ] 3. Standardize Variables x [ y Animal(y) Loves(x, y) ] [ z Loves(z, x)] ] 4. Skolemize (i.e. Eliminate ) Recall: x Owns(Nono, x) became Owns(Nono, M52) 4. Skolemize (i.e. Eliminate ) Recall: x Owns(Nono, x) became Owns(Nono, M52) But in: x [ y Animal(y) Loves(x, y) ] [ z Loves(z, x)] ] The existentially quantified variable is in the scope of a variable. We use a new function, F(x) such that F(x) = y, and G(x) = z. F and G are called Skolem Functions. x [Animal(F(x)) Loves(x, F(x)) ] [Loves(G(x), x)] ] 6

7 2. Move inwards 3. Standardize Variables 4. Skolemize (i.e. Eliminate ) x [Animal(F(x)) Loves(x, F(x)) ] [Loves(G(x), x)] ] 5. Drop [Animal(F(x)) Loves(x, F(x)) ] [Loves(G(x), x)] ] 2. Move inwards 3. Standardize Variables 4. Skolemize (i.e. Eliminate ) 5. Drop [Animal(F(x)) Loves(x, F(x)) ] [Loves(G(x), x)] ] 6. Distribute over [Animal(F(x)) Loves(G(x), x)] [ Loves(x, F(x)) Loves(G(x), x)] 7

8 2. Move inwards 3. Standardize Variables 4. Skolemize (i.e. Eliminate ) 5. Drop 6. Distribute over [Animal(F(x)) [Loves(G(x), x)] [ Loves(x, F(x)) Loves(G(x), x)] 7. Write as clauses Animal(F(x)) Loves(G(x), x) Loves(x, F(x)) Loves(G(x), x) Resolution in FOPC Rule: l 1 l k m 1 m n SUBST(θ, l 1 l i 1 l i+1... l k m 1 m j 1 m j+1... m n ) where θ = UNIFY(l i, m j ) Example: Human(Deepak) x Human(x) Mortal(x) Human(x) Mortal(x) Human(Deepak) Mortal(Deepak) θ = {x/deepak} 8

9 Resolution in FOPC Example: Animal(F(x)) Loves(G(x), x) Loves(u, v) Kills(u, v) Animal(F(x)) Kills(G(x), x) θ = {u/g(x), v/x} Using Resolution w/ Reductio ad Absurdum To prove KB resolution α show that KB α is unsatisfiable. Therefore, by refutation, it must be that KB resolution α 9

10 Example: Col. West Knowledge Base x y z [American(x) Weapon(y) Sells(x, y, z) Hostile(z) Criminal(x)] x [Owns(Nono, x) Missile(x)] x [Missile(x) Owns(Nono, x) Sells(CWest, x, Nono)] x [Missile(x) Weapon(x)] x [Enemy(x, America) Hostile(x)] American(CWest) Enemy(Nono, America) Is Colonel West a criminal? (Criminal(CWest)) Convert KB to Clause Form Knowledge Base x y z [American(x) Weapon(y) Sells(x, y, z) Hostile(z) Criminal(x)] x [Owns(Nono, x) Missile(x)] x [Missile(x) Owns(Nono, x) Sells(CWest, x, Nono)] x [Missile(x) Weapon(x)] x [Enemy(x, America) Hostile(x)] American(CWest) Enemy(Nono, America) Is Colonel West a criminal? (Criminal(CWest)) 10

11 Convert KB to Clause Form Knowledge Base x y z [American(x) Weapon(y) Sells(x, y, z) Hostile(z) Criminal(x)] American(x) Weapon(y) Sells(x, y, z) Hostile(z) Criminal(x) x [Owns(Nono, x) Missile(x)] Owns(Nono, m52) Missile(M52) x [Missile(x) Owns(Nono, x) Sells(CWest, x, Nono)] Missile(x) Owns(Nono, x) Sells(Cwest, x, Nono) x [Missile(x) Weapon(x)] x [Enemy(x, America) Hostile(x)] Missile(x) Weapon(x) Enemy(x, America) Hostile(x) American(CWest) Enemy(Nono, America) Is Colonel West a criminal? (Criminal(CWest)) Convert KB to Clause Form Knowledge Base American(x) Weapon(y) Sells(x, y, z) Hostile(z) Criminal(x) Owns(Nono, m52) Missile(M52) Missile(x) Owns(Nono, x) Sells(Cwest, x, Nono) Missile(x) Weapon(x) Enemy(x, America) Hostile(x) American(CWest) Enemy(Nono, America) Is Colonel West a criminal? (Criminal(CWest)) 11

12 Proof by Refutation 1. American(x) Weapon(y) Sells(x, y, z) Hostile(z) Criminal(x) 2. Owns(Nono, m52) 3. Missile(M52) 4. Missile(x) Owns(Nono, x) Sells(Cwest, x, Nono) 5. Missile(x) Weapon(x) 6. Enemy(x, America) Hostile(x) 7. American(CWest) 8. Enemy(Nono, America) 9. Criminal(CWest) Negation of Conclusion Proof by Refutation 1. American(x) Weapon(y) Sells(x, y, z) Hostile(z) Criminal(x) 2. Owns(Nono, m52) 3. Missile(M52) 4. Missile(x) Owns(Nono, x) Sells(Cwest, x, Nono) 5. Missile(x) Weapon(x) 6. Enemy(x, America) Hostile(x) 7. American(CWest) 8. Enemy(Nono, America) 9. Criminal(CWest) Negation of Conclusion 10. American(CWest) Weapon(y) Sells(CWest, y, z) Hostile(z) From (1) & (9) & {x/cwest} 11. Weapon(y) Sells(CWest, y, z) Hostile(z) From (10) & 7 & { } 12. Missile(y) Sells(CWest, y, z) Hostile(z) From (11) & (5) & {x/y} 13. Sells(CWest, M52, z) Hostile(z) From (12) & (3) & {y/m52} 14. Missile(M52) Owns(Nono, M52) Hostile(Nono) From (13) & (4) & {x/m52, z/nono} 15. Owns(Nono, M52) Hostile(Nono) From (14) & (3) & { } 16. Hostile(Nono) From (15) & (2) & { } 17. Enemy(Nono, America) From (16) & (6) & {x/nono} 18. Ø From (17) & (8) & { } Since KB Criminal(Cwest) leads to a contradiction, it must be that KB resolution Criminal(Cwest). 12

13 Proofs by Resolution & Refutation Do the did Curiosity Kill the Cat example from your text. Answer Extraction Green s Trick Knowledge Base American(x) Weapon(y) Sells(x, y, z) Hostile(z) Criminal(x) Owns(Nono, m52) Missile(M52) Missile(x) Owns(Nono, x) Sells(Cwest, x, Nono) Missile(x) Weapon(x) Enemy(x, America) Hostile(x) American(CWest) Enemy(Nono, America) Who is a criminal? Criminal(x) Answer(x) 13

14 Answer Extraction Green s Trick 1. American(x) Weapon(y) Sells(x, y, z) Hostile(z) Criminal(x) 2. Owns(Nono, m52) 3. Missile(M52) 4. Missile(x) Owns(Nono, x) Sells(Cwest, x, Nono) 5. Missile(x) Weapon(x) 6. Enemy(x, America) Hostile(x) 7. American(CWest) 8. Enemy(Nono, America) 9. Criminal(x) Answer(x) Negation of Conclusion 10. American(x) Weapon(y) Sells(x, y, z) Hostile(z) Answer(x) From (1) & (9) & {x/x} 11. Weapon(y) Sells(CWest, y, z) Hostile(z) Answer(CWest) From (10) & 7 & {x/cwest} 12. Missile(y) Sells(CWest, y, z) Hostile(z) Answer(CWest) From (11) & (5) & {x/y} 13. Sells(CWest, M52, z) Hostile(z) Answer(CWest) From (12) & (3) & {y/m52} 14. Missile(M52) Owns(Nono, M52) Hostile(Nono) Answer(CWest) From (13) & (4) & {x/m52, z/nono} 15. Owns(Nono, M52) Hostile(Nono) Answer(CWest) From (14) & (3) & { } 16. Hostile(Nono) Answer(CWest) From (15) & (2) & { } 17. Enemy(Nono, America) Answer(CWest) From (16) & (6) & {x/nono} 18. Answer(CWest) From (17) & (8) & { } CWest is the answer. Proofs by Resolution & Refutation Do the did Curiosity Kill the Cat example from your text. Try: Who killed the cat 14

Inf2D 12: Resolution-Based Inference

Inf2D 12: Resolution-Based Inference School of Informatics, University of Edinburgh 09/02/18 Slide Credits: Jacques Fleuriot, Michael Rovatsos, Michael Herrmann Last time Unification: Given α and β, find θ such that αθ = βθ Most general unifier

More information

First Order Logic. Introduction to AI Bert Huang

First Order Logic. Introduction to AI Bert Huang First Order Logic Introduction to AI Bert Huang Review Propositional logic syntax and semantics Inference in propositional logic: table, inference rules, resolution Horn clauses, forward/backward chaining

More information

CS S-10 First Order Logic 1

CS S-10 First Order Logic 1 CS662-2013S-10 First Order Logic 1 10-0: Representation Propositional Logic has several nice features Lets us easily express disjunction and negation There is a pit in (1,1) or in (2,2) There is not a

More information

Outline. Forward chaining Backward chaining Resolution. West Knowledge Base. Forward chaining algorithm. Resolution-Based Inference.

Outline. Forward chaining Backward chaining Resolution. West Knowledge Base. Forward chaining algorithm. Resolution-Based Inference. Resolution-Based Inference Outline R&N: 9.3-9.6 Michael Rovatsos University of Edinburgh Forward chaining Backward chaining Resolution 10 th February 2015 Forward chaining algorithm West Knowledge Base

More information

First Order Logic and Resolution

First Order Logic and Resolution Artificial Intelligence CS 6364 Professor Dan Moldovan Section 6 First Order Logic and Resolution First Order Logic (First Order Predicate Calculus) n n There is need to access components of a sentence.

More information

CSL105: Discrete Mathematical Structures. Ragesh Jaiswal, CSE, IIT Delhi

CSL105: Discrete Mathematical Structures. Ragesh Jaiswal, CSE, IIT Delhi is another way of showing that an argument is correct. Definitions: Literal: A variable or a negation of a variable is called a literal. Sum and Product: A disjunction of literals is called a sum and a

More information

Implementation Techniques

Implementation Techniques Web Science & Technologies University of Koblenz Landau, Germany Implementation Techniques Acknowledgements to Angele, Gehrke, STI Word of Caution There is not the one silver bullet In actual systems,

More information

Foundations of AI. 9. Predicate Logic. Syntax and Semantics, Normal Forms, Herbrand Expansion, Resolution

Foundations of AI. 9. Predicate Logic. Syntax and Semantics, Normal Forms, Herbrand Expansion, Resolution Foundations of AI 9. Predicate Logic Syntax and Semantics, Normal Forms, Herbrand Expansion, Resolution Wolfram Burgard, Andreas Karwath, Bernhard Nebel, and Martin Riedmiller 09/1 Contents Motivation

More information

Automated Reasoning PROLOG and Automated Reasoning 13.4 Further Issues in Automated Reasoning 13.5 Epilogue and References 13.

Automated Reasoning PROLOG and Automated Reasoning 13.4 Further Issues in Automated Reasoning 13.5 Epilogue and References 13. 13 Automated Reasoning 13.0 Introduction to Weak Methods in Theorem Proving 13.1 The General Problem Solver and Difference Tables 13.2 Resolution Theorem Proving 13.3 PROLOG and Automated Reasoning 13.4

More information

Resolution (14A) Young W. Lim 6/14/14

Resolution (14A) Young W. Lim 6/14/14 Copyright (c) 2013-2014. 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

More information

CS221 / Autumn 2017 / Liang & Ermon. Lecture 17: Logic II

CS221 / Autumn 2017 / Liang & Ermon. Lecture 17: Logic II CS221 / Autumn 2017 / Liang & Ermon Lecture 17: Logic II Review: ingredients of a logic Syntax: defines a set of valid formulas (Formulas) Example: Rain Wet Semantics: for each formula, specify a set of

More information

Inference in First-Order Logic

Inference in First-Order Logic Inference in First-Order Logic Proofs Unification Generalized modus ponens Forward and backward chaining Completeness Resolution Logic programming CS 561, Session 16-18 1 Inference in First-Order Logic

More information

Lecture 17 of 41. Clausal (Conjunctive Normal) Form and Resolution Techniques

Lecture 17 of 41. Clausal (Conjunctive Normal) Form and Resolution Techniques Lecture 17 of 41 Clausal (Conjunctive Normal) Form and Resolution Techniques Wednesday, 29 September 2004 William H. Hsu, KSU http://www.kddresearch.org http://www.cis.ksu.edu/~bhsu Reading: Chapter 9,

More information

Knowledge Representation. CS 486/686: Introduction to Artificial Intelligence

Knowledge Representation. CS 486/686: Introduction to Artificial Intelligence Knowledge Representation CS 486/686: Introduction to Artificial Intelligence 1 Outline Knowledge-based agents Logics in general Propositional Logic& Reasoning First Order Logic 2 Introduction So far we

More information

INF5390 Kunstig intelligens. First-Order Logic. Roar Fjellheim

INF5390 Kunstig intelligens. First-Order Logic. Roar Fjellheim INF5390 Kunstig intelligens First-Order Logic Roar Fjellheim Outline Logical commitments First-order logic First-order inference Resolution rule Reasoning systems Summary Extracts from AIMA Chapter 8:

More information

CS 8520: Artificial Intelligence

CS 8520: Artificial Intelligence CS 8520: Artificial Intelligence Logical Agents and First Order Logic Paula Matuszek Spring 2013 1 References These slides draw from a number of sources, including: Hwee Tou Ng, http://aima.eecs.berkeley.edu/

More information

Automatic Reasoning (Section 8.3)

Automatic Reasoning (Section 8.3) Automatic Reasoning (Section 8.3) Automatic Reasoning Can reasoning be automated? Yes, for some logics, including first-order logic. We could try to automate natural deduction, but there are many proof

More information

CS 4700: Artificial Intelligence

CS 4700: Artificial Intelligence CS 4700: Foundations of Artificial Intelligence Fall 2017 Instructor: Prof. Haym Hirsh Lecture 16 Cornell Cinema Thursday, April 13 7:00pm Friday, April 14 7:00pm Sunday, April 16 4:30pm Cornell Cinema

More information

INFERENCE IN FIRST-ORDER LOGIC

INFERENCE IN FIRST-ORDER LOGIC A-PDF Split DEMO : Purchase from www.a-pdf.com to remove the watermark 9 INFERENCE IN FIRST-ORDER LOGIC In which we dejine eflective procedures for answering questions posed in jirstorder logic. Chapter

More information

Notes for Chapter 12 Logic Programming. The AI War Basic Concepts of Logic Programming Prolog Review questions

Notes for Chapter 12 Logic Programming. The AI War Basic Concepts of Logic Programming Prolog Review questions Notes for Chapter 12 Logic Programming The AI War Basic Concepts of Logic Programming Prolog Review questions The AI War How machines should learn: inductive or deductive? Deductive: Expert => rules =>

More information

Inference in First-Order Logic

Inference in First-Order Logic Inference in First-Order Logic Proofs Unification Generalized modus ponens Forward and backward chaining Completeness Resolution Logic programming CS 460, Session 16-18 1 Inference in First-Order Logic

More information

6.034 Notes: Section 10.1

6.034 Notes: Section 10.1 6.034 Notes: Section 10.1 Slide 10.1.1 A sentence written in conjunctive normal form looks like ((A or B or not C) and (B or D) and (not A) and (B or C)). Slide 10.1.2 Its outermost structure is a conjunction.

More information

COMP4418 Knowledge Representation and Reasoning

COMP4418 Knowledge Representation and Reasoning COMP4418 Knowledge Representation and Reasoning Week 3 Practical Reasoning David Rajaratnam Click to edit Present s Name Practical Reasoning - My Interests Cognitive Robotics. Connect high level cognition

More information

15-780: Graduate AI Lecture 2. Proofs & FOL. Geoff Gordon (this lecture) Tuomas Sandholm TAs Byron Boots, Sam Ganzfried

15-780: Graduate AI Lecture 2. Proofs & FOL. Geoff Gordon (this lecture) Tuomas Sandholm TAs Byron Boots, Sam Ganzfried 15-780: Graduate AI Lecture 2. Proofs & FOL Geoff Gordon (this lecture) Tuomas Sandholm TAs Byron Boots, Sam Ganzfried 1 Admin 2 Audits http://www.cmu.edu/hub/forms/esg-audit.pdf 3 Matlab tutorial When

More information

Resolution in FO logic (Ch. 9)

Resolution in FO logic (Ch. 9) Resolution in FO logic (Ch. 9) Review: CNF form Conjunctive normal form is a number of clauses stuck together with ANDs Each clause can only contain ORs, and logical negation must appears right next to

More information

(More) Propositional Logic and an Intro to Predicate Logic. CSCI 3202, Fall 2010

(More) Propositional Logic and an Intro to Predicate Logic. CSCI 3202, Fall 2010 (More) Propositional Logic and an Intro to Predicate Logic CSCI 3202, Fall 2010 Assignments Next week: Guest lectures (Jim Martin and Nikolaus Correll); Read Chapter 9 (but you can skip sections on logic

More information

Knowledge Representation and Reasoning Logics for Artificial Intelligence

Knowledge Representation and Reasoning Logics for Artificial Intelligence Knowledge Representation and Reasoning Logics for Artificial Intelligence Stuart C. Shapiro Department of Computer Science and Engineering and Center for Cognitive Science University at Buffalo, The State

More information

Knowledge & Reasoning

Knowledge & Reasoning Knowledge & Reasoning Logical Reasoning: to have a computer automatically perform deduction or prove theorems Knowledge Representations: modern ways of representing large bodies of knowledge 1 Logical

More information

Module 6. Knowledge Representation and Logic (First Order Logic) Version 2 CSE IIT, Kharagpur

Module 6. Knowledge Representation and Logic (First Order Logic) Version 2 CSE IIT, Kharagpur Module 6 Knowledge Representation and Logic (First Order Logic) Lesson 15 Inference in FOL - I 6.2.8 Resolution We have introduced the inference rule Modus Ponens. Now we introduce another inference rule

More information

SECTION 1.5: LOGIC PROGRAMMING

SECTION 1.5: LOGIC PROGRAMMING SECTION 1.5: LOGIC PROGRAMMING William DeMeo williamdemeo@gmail.com University of South Carolina February 7, 2013 SPECIFYING FACTS AND RULES We populate our Prolog database with facts using predicates,

More information

6. Inference and resolution

6. Inference and resolution Computer Science and Software Engineering University of Wisconsin - Platteville 6. Inference and resolution CS 3030 Lecture Notes Yan Shi UW-Platteville Read: Textbook Chapter 8 Part of the slides are

More information

Mathematical Logic Prof. Arindama Singh Department of Mathematics Indian Institute of Technology, Madras. Lecture - 37 Resolution Rules

Mathematical Logic Prof. Arindama Singh Department of Mathematics Indian Institute of Technology, Madras. Lecture - 37 Resolution Rules Mathematical Logic Prof. Arindama Singh Department of Mathematics Indian Institute of Technology, Madras Lecture - 37 Resolution Rules If some literals can be unified, the same algorithm should be able

More information

Lecture 4: January 12, 2015

Lecture 4: January 12, 2015 32002: AI (First Order Predicate Logic, Interpretation and Inferences) Spring 2015 Lecturer: K.R. Chowdhary Lecture 4: January 12, 2015 : Professor of CS (VF) Disclaimer: These notes have not been subjected

More information

For next Tuesday. Read chapter 8 No written homework Initial posts due Thursday 1pm and responses due by class time Tuesday

For next Tuesday. Read chapter 8 No written homework Initial posts due Thursday 1pm and responses due by class time Tuesday For next Tuesday Read chapter 8 No written homework Initial posts due Thursday 1pm and responses due by class time Tuesday Any questions? Program 1 Imperfect Knowledge What issues arise when we don t know

More information

CSE 473 Lecture 12 Chapter 8. First-Order Logic. CSE AI faculty

CSE 473 Lecture 12 Chapter 8. First-Order Logic. CSE AI faculty CSE 473 Lecture 12 Chapter 8 First-Order Logic CSE AI faculty What s on our menu today? First-Order Logic Definitions Universal and Existential Quantifiers Skolemization Unification 2 Propositional vs.

More information

LOGIC-BASED TRUTH MAINTENANCE SYSTEMS. EECS 344 Winter, 2008

LOGIC-BASED TRUTH MAINTENANCE SYSTEMS. EECS 344 Winter, 2008 LOGIC-BASED TRUTH MAINTENANCE SYSTEMS EECS 344 Winter, 2008 Overview Limitations of the JTMS LTMS basics Logical Specification of LTMS Boolean Constraint Propagation Interface to inference engine Example:

More information

15-780: Graduate AI Lecture 2. Proofs & FOL. Geoff Gordon (this lecture) Tuomas Sandholm TAs Byron Boots, Sam Ganzfried

15-780: Graduate AI Lecture 2. Proofs & FOL. Geoff Gordon (this lecture) Tuomas Sandholm TAs Byron Boots, Sam Ganzfried 15-780: Graduate AI Lecture 2. Proofs & FOL Geoff Gordon (this lecture) Tuomas Sandholm TAs Byron Boots, Sam Ganzfried 1 Admin 2 Audits http://www.cmu.edu/hub/forms/esg-audit.pdf 3 Review 4 What is AI?

More information

Logic as a Programming Language

Logic as a Programming Language Logic as a Programming Language! Logic can be considered the oldest programming language! Aristotle invented propositional logic over 2000 years ago in order to prove properties of formal arguments! Propositions

More information

CS 416, Artificial Intelligence Midterm Examination Fall 2004

CS 416, Artificial Intelligence Midterm Examination Fall 2004 CS 416, Artificial Intelligence Midterm Examination Fall 2004 Name: This is a closed book, closed note exam. All questions and subquestions are equally weighted. Introductory Material 1) True or False:

More information

Set 7: Predicate logic Chapter 8 R&N. ICS 271 Fall 2015

Set 7: Predicate logic Chapter 8 R&N. ICS 271 Fall 2015 Set 7: Predicate logic Chapter 8 R&N ICS 271 Fall 2015 Outline New ontology objects, relations, properties, functions New Syntax Constants, predicates, properties, functions New semantics meaning of new

More information

Logical reasoning systems

Logical reasoning systems Logical reasoning systems Theorem provers and logic programming languages Production systems Frame systems and semantic networks Description logic systems CS 561, Session 19 1 Logical reasoning systems

More information

THE PREDICATE CALCULUS

THE PREDICATE CALCULUS 2 THE PREDICATE CALCULUS Slide 2.1 2.0 Introduction 2.1 The Propositional Calculus 2.2 The Predicate Calculus 2.3 Using Inference Rules to Produce Predicate Calculus Expressions 2.4 Application: A Logic-Based

More information

2SAT Andreas Klappenecker

2SAT Andreas Klappenecker 2SAT Andreas Klappenecker The Problem Can we make the following boolean formula true? ( x y) ( y z) (z y)! Terminology A boolean variable is a variable that can be assigned the values true (T) or false

More information

The Resolution Principle

The Resolution Principle Summary Introduction [Chang-Lee Ch. 5.1] for Propositional Logic [Chang-Lee Ch. 5.2] Herbrand's orem and refutation procedures Satisability procedures We can build refutation procedures building on Herbrand's

More information

15-780: Graduate AI Lecture 2. Proofs & FOL. Geoff Gordon (this lecture) Tuomas Sandholm TAs Erik Zawadzki, Abe Othman

15-780: Graduate AI Lecture 2. Proofs & FOL. Geoff Gordon (this lecture) Tuomas Sandholm TAs Erik Zawadzki, Abe Othman 15-780: Graduate AI Lecture 2. Proofs & FOL Geoff Gordon (this lecture) Tuomas Sandholm TAs Erik Zawadzki, Abe Othman 1 Admin Recitations: Fri. 3PM here (GHC 4307) Vote: useful to have one tomorrow? would

More information

References. Topic #16: Logic Programming. Motivation. What is a program? Prolog Program Structure

References. Topic #16: Logic Programming. Motivation. What is a program? Prolog Program Structure References Topic #16: Logic Programming CSE 413, Autumn 2004 Programming Languages Slides from CSE 341 S. Tanimoto See Chapter 16 of the text Read 16.1, 16.4, 16.5, 16.6 (skip 16.6.7) Skim 16.7, 16.8 http://www.cs.washington.edu/education/courses/413/04au/

More information

15-780: Graduate AI Lecture 2. Proofs & FOL. Geoff Gordon (this lecture) Tuomas Sandholm TAs Erik Zawadzki, Abe Othman

15-780: Graduate AI Lecture 2. Proofs & FOL. Geoff Gordon (this lecture) Tuomas Sandholm TAs Erik Zawadzki, Abe Othman 15-780: Graduate AI Lecture 2. Proofs & FOL Geoff Gordon (this lecture) Tuomas Sandholm TAs Erik Zawadzki, Abe Othman 1 Admin Recitations: Fri. 3PM here (GHC 4307) Vote: useful to have one tomorrow? would

More information

Logic Languages. Hwansoo Han

Logic Languages. Hwansoo Han Logic Languages Hwansoo Han Logic Programming Based on first-order predicate calculus Operators Conjunction, disjunction, negation, implication Universal and existential quantifiers E A x for all x...

More information

Mathematical Logics. 17 Resolution and Unification. Luciano Serafini. Fondazione Bruno Kessler, Trento, Italy

Mathematical Logics. 17 Resolution and Unification. Luciano Serafini. Fondazione Bruno Kessler, Trento, Italy 17 Resolution and Fondazione Bruno Kessler, Trento, Italy November 26, 2014 The rule of Propositional Resolution A C, C B RES A B The formula A B is called a resolvent of A C and B C, denoted Res(A C,

More information

Problem #2. For each of the following pairs of atomic sentences, give the most general unifier, if it exists. a. P(A,B,B), P(x,y,z)

Problem #2. For each of the following pairs of atomic sentences, give the most general unifier, if it exists. a. P(A,B,B), P(x,y,z) Problem #2 For each of the following pairs of atomic sentences, give the most general unifier, if it exists. a. P(A,B,B), P(x,y,z) b. Q(y,G(A,B)), Q(G(x,x),y) c. Older(Father(y),y), Older(Father(x),John)

More information

Propositional logic (Ch. 7)

Propositional logic (Ch. 7) Propositional logic (Ch. 7) Announcements Writing 3 due Sunday - ideally use for project - if you haven't decided project by then, you will have to redo this work Logic: definitions We say that two sentences

More information

Assignment 3: Logical Agents: Solutions

Assignment 3: Logical Agents: Solutions Assignment 3: Logical Agents: Solutions Due 2/22 at 11:59pm. Please work individually and use the submission instructions. Q1. Basics (2 points) State if each of the sentences below are unsatisfiable,

More information

Module 6. Knowledge Representation and Logic (First Order Logic) Version 2 CSE IIT, Kharagpur

Module 6. Knowledge Representation and Logic (First Order Logic) Version 2 CSE IIT, Kharagpur Module 6 Knowledge Representation and Logic (First Order Logic) 6.1 Instructional Objective Students should understand the advantages of first order logic as a knowledge representation language Students

More information

Integrity Constraints (Chapter 7.3) Overview. Bottom-Up. Top-Down. Integrity Constraint. Disjunctive & Negative Knowledge. Proof by Refutation

Integrity Constraints (Chapter 7.3) Overview. Bottom-Up. Top-Down. Integrity Constraint. Disjunctive & Negative Knowledge. Proof by Refutation CSE560 Class 10: 1 c P. Heeman, 2010 Integrity Constraints Overview Disjunctive & Negative Knowledge Resolution Rule Bottom-Up Proof by Refutation Top-Down CSE560 Class 10: 2 c P. Heeman, 2010 Integrity

More information

The Logic Paradigm. Joseph Spring. 7COM1023 Programming Paradigms

The Logic Paradigm. Joseph Spring. 7COM1023 Programming Paradigms The Logic Paradigm Joseph Spring 7COM1023 Programming Paradigms 1 Discussion The Logic Paradigm Propositional and Predicate Logic See also notes and slides on PP website Horn Clauses Definition, Examples

More information

Logic Programming Languages

Logic Programming Languages Logic Programming Languages Introduction Logic programming languages, sometimes called declarative programming languages Express programs in a form of symbolic logic Use a logical inferencing process to

More information

Homework 1. Due Date: Wednesday 11/26/07 - at the beginning of the lecture

Homework 1. Due Date: Wednesday 11/26/07 - at the beginning of the lecture Homework 1 Due Date: Wednesday 11/26/07 - at the beginning of the lecture Problems marked with a [*] are a littlebit harder and count as extra credit. Note 1. For any of the given problems make sure that

More information

First-Order Logic (FOL)

First-Order Logic (FOL) First-Order Logic (FOL) FOL consists of the following parts: Objects/terms Quantified variables Predicates Logical connectives Implication Objects/Terms FOL is a formal system that allows us to reason

More information

15-780: Graduate AI Lecture 5. Logic, Planning. Geoff Gordon (this lecture) Ziv Bar-Joseph TAs Geoff Hollinger, Henry Lin

15-780: Graduate AI Lecture 5. Logic, Planning. Geoff Gordon (this lecture) Ziv Bar-Joseph TAs Geoff Hollinger, Henry Lin 15-780: Graduate AI Lecture 5. Logic, Planning Geoff Gordon (this lecture) Ziv Bar-Joseph TAs Geoff Hollinger, Henry Lin Review Review CSPs (definition, examples) Sudoku, jobshop scheduling Over-, under-,

More information

Chapter 16. Logic Programming. Topics. Unification. Resolution. Prolog s Search Strategy. Prolog s Search Strategy

Chapter 16. Logic Programming. Topics. Unification. Resolution. Prolog s Search Strategy. Prolog s Search Strategy Topics Chapter 16 Logic Programming Summary (resolution, unification, Prolog search strategy ) Disjoint goals The cut operator Negative goals Predicate fail Debugger / tracer Lists 2 Resolution Resolution

More information

PdOd Kev Events I Re-world war I1 rwa

PdOd Kev Events I Re-world war I1 rwa I PdOd Kev Events I Re-world war I rwa LECTURE: Knowledge Representation Overview 0 'Qpes of knowledge: objects, events, meta-knowledge, etc. 0 Characteristics of representation: expressive adequacy vs.

More information

Full Clausal Logic - Syntax: clauses

Full Clausal Logic - Syntax: clauses Full Clausal Logic - Syntax: clauses compound terms aggregate objects Add function symbols (functors), with an arity; constants are 0-ary functors. object proposition functor : single word starting with

More information

First-Order Predicate Logic. CSCI 5582, Fall 2007

First-Order Predicate Logic. CSCI 5582, Fall 2007 First-Order Predicate Logic CSCI 5582, Fall 2007 What Can t We Do in FOPL? We can t take anything back once we ve asserted it. We can t make statements about relations themselves (e.g., Brother is a commutative

More information

CSI30. Chapter 1. The Foundations: Logic and Proofs Rules of inference with quantifiers Logic and bit operations Specification consistency

CSI30. Chapter 1. The Foundations: Logic and Proofs Rules of inference with quantifiers Logic and bit operations Specification consistency Chapter 1. The Foundations: Logic and Proofs 1.13 Rules of inference with quantifiers Logic and bit operations Specification consistency 1.13 Rules of inference with quantifiers universal instantiation

More information

Formal Predicate Calculus. Michael Meyling

Formal Predicate Calculus. Michael Meyling Formal Predicate Calculus Michael Meyling May 24, 2013 2 The source for this document can be found here: http://www.qedeq.org/0_04_07/doc/math/qedeq_formal_logic_v1.xml Copyright by the authors. All rights

More information

Lecture 14: Lower Bounds for Tree Resolution

Lecture 14: Lower Bounds for Tree Resolution IAS/PCMI Summer Session 2000 Clay Mathematics Undergraduate Program Advanced Course on Computational Complexity Lecture 14: Lower Bounds for Tree Resolution David Mix Barrington and Alexis Maciel August

More information

Knowledge Representation and Reasoning Logics for Artificial Intelligence

Knowledge Representation and Reasoning Logics for Artificial Intelligence Knowledge Representation and Reasoning Logics for Artificial Intelligence Stuart C. Shapiro Department of Computer Science and Engineering and Center for Cognitive Science University at Buffalo, The State

More information

The Resolution Algorithm

The Resolution Algorithm The Resolution Algorithm Introduction In this lecture we introduce the Resolution algorithm for solving instances of the NP-complete CNF- SAT decision problem. Although the algorithm does not run in polynomial

More information

Practice Problems: All Computer Science majors are people. Some computer science majors are logical thinkers. Some people are logical thinkers.

Practice Problems: All Computer Science majors are people. Some computer science majors are logical thinkers. Some people are logical thinkers. CSE 240, Fall, 2013 Homework 2 Due, Tuesday September 17. Can turn in class, at the beginning of class, or earlier in the mailbox labelled Pless in Bryan Hall, room 509c. Practice Problems: 1. Consider

More information

Declarative Programming. 2: theoretical backgrounds

Declarative Programming. 2: theoretical backgrounds Declarative Programming 2: theoretical backgrounds 1 Logic Systems: structure and meta-theoretical properties logic system syntax semantics proof theory defines which sentences are legal in the logical

More information

CPSC 121: Models of Computation. Module 6: Rewriting predicate logic statements

CPSC 121: Models of Computation. Module 6: Rewriting predicate logic statements CPSC 121: Models of Computation Module 6: Rewriting predicate logic statements Module 6: Rewriting predicate logic statements Pre-class quiz #7 is due March 1st at 19:00. Assigned reading for the quiz:

More information

Advanced Logic and Functional Programming

Advanced Logic and Functional Programming Advanced Logic and Functional Programming Lecture 1: Programming paradigms. Declarative programming. From first-order logic to Logic Programming. Programming paradigms Programming paradigm (software engineering)

More information

What is the study of logic?

What is the study of logic? Chapter 2: The Representation of Knowledge Expert Systems: Principles and Programming, Fourth Edition What is the study of logic? Logic is the study of making inferences given a set of facts, we attempt

More information

Chapter 16. Logic Programming Languages

Chapter 16. Logic Programming Languages Chapter 16 Logic Programming Languages Chapter 16 Topics Introduction A Brief Introduction to Predicate Calculus Predicate Calculus and Proving Theorems An Overview of Logic Programming The Origins of

More information

Fundamentals of Prolog

Fundamentals of Prolog Fundamentals of Prolog Prof. Geraint A. Wiggins Centre for Cognition, Computation and Culture Goldsmiths College, University of London Contents Summary of Lecture 1 What makes a good Prolog program? What

More information

Semantics and First-Order Predicate Calculus

Semantics and First-Order Predicate Calculus Semantics and First-Order Predicate Calculus 11-711 Algorithms for NLP 17 November 2016 (With thanks to Noah Smith) Key Challenge of Meaning We actually say very little - much more is left unsaid, because

More information

Logic: TD as search, Datalog (variables)

Logic: TD as search, Datalog (variables) Logic: TD as search, Datalog (variables) Computer Science cpsc322, Lecture 23 (Textbook Chpt 5.2 & some basic concepts from Chpt 12) June, 8, 2017 CPSC 322, Lecture 23 Slide 1 Lecture Overview Recap Top

More information

Introduction to dependent types in Coq

Introduction to dependent types in Coq October 24, 2008 basic use of the Coq system In Coq, you can play with simple values and functions. The basic command is called Check, to verify if an expression is well-formed and learn what is its type.

More information

proof through refutation

proof through refutation Prolog's logic; resolution grammars & parsing 1 proof through refutation we saw that Prolog uses the strategy: test the claim that a query is false by (1) finding it is immediately true (matches a fact

More information

Using first order logic (Ch. 8-9)

Using first order logic (Ch. 8-9) Using first order logic (Ch. 8-9) Review: First order logic In first order logic, we have objects and relations between objects The relations are basically a list of all valid tuples that satisfy the relation

More information

Constraint Solving. Systems and Internet Infrastructure Security

Constraint Solving. Systems and Internet Infrastructure Security Systems and Internet Infrastructure Security Network and Security Research Center Department of Computer Science and Engineering Pennsylvania State University, University Park PA Constraint Solving Systems

More information

Where Can We Draw The Line?

Where Can We Draw The Line? Where Can We Draw The Line? On the Hardness of Satisfiability Problems Complexity 1 Introduction Objectives: To show variants of SAT and check if they are NP-hard Overview: Known results 2SAT Max2SAT Complexity

More information

(a) (4 pts) Prove that if a and b are rational, then ab is rational. Since a and b are rational they can be written as the ratio of integers a 1

(a) (4 pts) Prove that if a and b are rational, then ab is rational. Since a and b are rational they can be written as the ratio of integers a 1 CS 70 Discrete Mathematics for CS Fall 2000 Wagner MT1 Sol Solutions to Midterm 1 1. (16 pts.) Theorems and proofs (a) (4 pts) Prove that if a and b are rational, then ab is rational. Since a and b are

More information

Using first order logic (Ch. 8-9)

Using first order logic (Ch. 8-9) Using first order logic (Ch. 8-9) Review: First order logic In first order logic, we have objects and relations between objects The relations are basically a list of all valid tuples that satisfy the relation

More information

Notes. Notes. Introduction. Notes. Propositional Functions. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry.

Notes. Notes. Introduction. Notes. Propositional Functions. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry Spring 2006 1 / 1 Computer Science & Engineering 235 Introduction to Discrete Mathematics Sections 1.3 1.4 of Rosen cse235@cse.unl.edu Introduction

More information

Towards a Logical Reconstruction of Relational Database Theory

Towards a Logical Reconstruction of Relational Database Theory Towards a Logical Reconstruction of Relational Database Theory On Conceptual Modelling, Lecture Notes in Computer Science. 1984 Raymond Reiter Summary by C. Rey November 27, 2008-1 / 63 Foreword DB: 2

More information

Introduction to Logic Programming

Introduction to Logic Programming Introduction to Logic Programming York University CSE 3401 Vida Movahedi York University CSE 3401 V. Movahedi 1 Overview Programming Language Paradigms Logic Programming Functional Programming Brief review

More information

PHIL 240, Introduction to Logic, Sections Fall 2011 FINAL EXAM 14 December Name (5 points): Section (5 points):

PHIL 240, Introduction to Logic, Sections Fall 2011 FINAL EXAM 14 December Name (5 points): Section (5 points): Section I True / False questions (2 points each) 1. TRUE Any argument that is sound is also valid. 2. FALSE_ If the premises of an argument are all true, then that argument is sound. 3. TRUE Every universal

More information

Markov Logic: Representation

Markov Logic: Representation Markov Logic: Representation Overview Statistical relational learning Markov logic Basic inference Basic learning Statistical Relational Learning Goals: Combine (subsets of) logic and probability into

More information

Chapter 16. Logic Programming Languages ISBN

Chapter 16. Logic Programming Languages ISBN Chapter 16 Logic Programming Languages ISBN 0-321-49362-1 Chapter 16 Topics Introduction A Brief Introduction to Predicate Calculus Predicate Calculus and Proving Theorems An Overview of Logic Programming

More information

Mixed Integer Linear Programming

Mixed Integer Linear Programming Mixed Integer Linear Programming Part I Prof. Davide M. Raimondo A linear program.. A linear program.. A linear program.. Does not take into account possible fixed costs related to the acquisition of new

More information

DM841 DISCRETE OPTIMIZATION. Part 2 Heuristics. Satisfiability. Marco Chiarandini

DM841 DISCRETE OPTIMIZATION. Part 2 Heuristics. Satisfiability. Marco Chiarandini DM841 DISCRETE OPTIMIZATION Part 2 Heuristics Satisfiability Marco Chiarandini Department of Mathematics & Computer Science University of Southern Denmark Outline 1. Mathematical Programming Constraint

More information

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

Propositional Resolution Part 3. Short Review Professor Anita Wasilewska CSE 352 Artificial Intelligence Propositional Resolution Part 3 Short Review Professor Anita Wasilewska CSE 352 Artificial Intelligence Resolution Strategies We present here some Deletion Strategies and discuss their Completeness. Deletion

More information

Solutions to Exercises

Solutions to Exercises TDDC36 (LOGIC): EXAM Solutions to Exercises EXERCISE 1 1. Prove the following propositional formula: [ ( P Q) (P Q) R ] [ Q R ] (a) (2 points) using tableaux (b) (2 points) using Gentzen system (as provided

More information

CSE20: Discrete Mathematics

CSE20: Discrete Mathematics Spring 2018 Summary Last time: Today: Introduction to Basic Set Theory (Vardy) More on sets Connections between sets and logic Reading: Chapter 2 Set Notation A, B, C: sets A = {1, 2, 3}: finite set with

More information

Module 7. Knowledge Representation and Logic (Rule based Systems) Version 2 CSE IIT, Kharagpur

Module 7. Knowledge Representation and Logic (Rule based Systems) Version 2 CSE IIT, Kharagpur Module 7 Knowledge Representation and Logic (Rule based Systems) 7.1 Instructional Objective The students should understand the use of rules as a restricted class of first order logic statements The student

More information

Definition: A context-free grammar (CFG) is a 4- tuple. variables = nonterminals, terminals, rules = productions,,

Definition: A context-free grammar (CFG) is a 4- tuple. variables = nonterminals, terminals, rules = productions,, CMPSCI 601: Recall From Last Time Lecture 5 Definition: A context-free grammar (CFG) is a 4- tuple, variables = nonterminals, terminals, rules = productions,,, are all finite. 1 ( ) $ Pumping Lemma for

More information

Chapter 16. Logic Programming Languages ISBN

Chapter 16. Logic Programming Languages ISBN Chapter 16 Logic Programming Languages ISBN 0-321-49362-1 Chapter 16 Topics Introduction A Brief Introduction to Predicate Calculus Predicate Calculus and Proving Theorems An Overview of Logic Programming

More information

INTLOGS17 Test 1. Prof: S Bringsjord TA: Rini Palamittam NY

INTLOGS17 Test 1. Prof: S Bringsjord TA: Rini Palamittam NY INTLOGS17 Test 1 Prof: S Bringsjord TA: Rini Palamittam 0306170626NY Immediate Action Items: Please now, before you do anything else, write down the following details on the Scantron sheets as well as

More information

CSE & CSE6002E - Soft Computing Fall Semester, 2013

CSE & CSE6002E - Soft Computing Fall Semester, 2013 CSE4403 3.0 & CSE6002E - Soft Computing Fall Semester, 2013 Introduction to Logic and Resolution Principle Theorem Proving Andrew, Bernard, Claude, Donald, and Eugene have summer houses along the Atlantic

More information