Inf2D 12: Resolution-Based Inference

Size: px
Start display at page:

Download "Inf2D 12: Resolution-Based Inference"

Transcription

1 School of Informatics, University of Edinburgh 09/02/18 Slide Credits: Jacques Fleuriot, Michael Rovatsos, Michael Herrmann

2 Last time Unification: Given α and β, find θ such that αθ = βθ Most general unifier (MGU) Generalised Modus Ponens p 1, p 2,..., p n (p 1 p 2 p n q) qθ when p i θ p iθ i

3 Outline Forward chaining Backward chaining Resolution

4 Forward chaining algorithm

5 West Knowledge Base American(x) Weapon(y) Sells(x, y, z) Hostile(z) Criminal(x) Owns(Nono, M 1 ) and Missile(M 1 ) Missile(x) Owns(Nono, x) Sells(West, x, Nono) Missile(x) Weapon(x) Enemy(x, America) Hostile(x) American(West) and Enemy(Nono, America)

6 Forward chaining proof American(x) Weapon(y) Sells(x, y, z) Hostile(z) Criminal(x) Owns(Nono, M 1 ) and Missile(M 1 ) Missile(x) Owns(Nono, x) Sells(West, x, Nono) Missile(x) Weapon(x) Enemy(x, America) Hostile(x) American(West) and Enemy(Nono, America)

7 Forward chaining proof American(x) Weapon(y) Sells(x, y, z) Hostile(z) Criminal(x) Owns(Nono, M 1 ) and Missile(M 1 ) Missile(x) Owns(Nono, x) Sells(West, x, Nono) Missile(x) Weapon(x) Enemy(x, America) Hostile(x) American(West) and Enemy(Nono, America)

8 Forward chaining proof American(x) Weapon(y) Sells(x, y, z) Hostile(z) Criminal(x) Owns(Nono, M 1 ) and Missile(M 1 ) Missile(x) Owns(Nono, x) Sells(West, x, Nono) Missile(x) Weapon(x) Enemy(x, America) Hostile(x) American(West) and Enemy(Nono, America)

9 Properties of forward chaining II Sound and complete for first-order definite clauses Definite clause = exactly one positive literal. Datalog = first-order definite clauses + no functions FC terminates for Datalog in finite number of iterations May not terminate in general if α is not entailed This is unavoidable: entailment with definite clauses is semi-decidable

10 Efficiency of forward chaining I Incremental forward chaining: no need to match a rule on iteration k if a premise wasn t added on iteration k 1 match each rule whose premise contains a newly added positive literal Matching itself can be expensive: Database indexing allows O(1) retrieval of known facts e.g., query Missile(x) retrieves Missile(M1) Forward chaining is widely used in deductive databases

11 Efficiency of forward chaining II Pattern Matching For each θ such that SUBST (θ, p 1 p n ) = SUBST (θ, p 1 p n) for some p 1,..., p n in KB Finding all possible unifiers can be very expensive Example Missile(x) Owns(Nono, x) Sells(West, x, Nono) Can find each object owned by Nono in constant time and then check if it is admissible But what if Nono owns many objects but very few missiles? Conjunct Ordering: Better (cost-wise) to find all missiles first and then check whether they are owned by Nono Optimal ordering is NP-hard. Heuristics available: e.g. MRV from CSP if each conjunct is viewed as a constraint on its vars

12 Hard matching example Diff (wa, nt) Diff (wa, sa) Diff (nt, q) Diff (nt, sa) Diff (q, nsw) Diff (q, sa) Diff (nsw, v) Diff (nsw, sa) Diff (v, sa) Colourable Diff (Red, Blue) Diff (Red, Green) Diff (Green, Red) Diff (Green, Blue) Diff (Blue, Red) Diff (Blue, Green) Every finite domain CSP can be expressed as a single definite clause + ground facts Colourable is inferred iff the CSP has a solution CSPs include 3SAT as a special case, hence matching is NP-hard

13 Backward chaining algorithm SUBST (COMPOSE(θ 1, θ 2 ), p) = SUBST (θ 2, SUBST (θ 1, p))

14 Backward chaining example American(x) Weapon(y) Sells(x, y, z) Hostile(z) Criminal(x) Owns(Nono, M 1 ) and Missile(M 1 ) Missile(x) Owns(Nono, x) Sells(West, x, Nono) Missile(x) Weapon(x) Enemy(x, America) Hostile(x) American(West) and Enemy(Nono, America)

15 Backward chaining example American(x) Weapon(y) Sells(x, y, z) Hostile(z) Criminal(x) Owns(Nono, M 1 ) and Missile(M 1 ) Missile(x) Owns(Nono, x) Sells(West, x, Nono) Missile(x) Weapon(x) Enemy(x, America) Hostile(x) American(West) and Enemy(Nono, America)

16 Backward chaining example American(x) Weapon(y) Sells(x, y, z) Hostile(z) Criminal(x) Owns(Nono, M 1 ) and Missile(M 1 ) Missile(x) Owns(Nono, x) Sells(West, x, Nono) Missile(x) Weapon(x) Enemy(x, America) Hostile(x) American(West) and Enemy(Nono, America)

17 Backward chaining example American(x) Weapon(y) Sells(x, y, z) Hostile(z) Criminal(x) Owns(Nono, M 1 ) and Missile(M 1 ) Missile(x) Owns(Nono, x) Sells(West, x, Nono) Missile(x) Weapon(x) Enemy(x, America) Hostile(x) American(West) and Enemy(Nono, America)

18 Backward chaining example American(x) Weapon(y) Sells(x, y, z) Hostile(z) Criminal(x) Owns(Nono, M 1 ) and Missile(M 1 ) Missile(x) Owns(Nono, x) Sells(West, x, Nono) Missile(x) Weapon(x) Enemy(x, America) Hostile(x) American(West) and Enemy(Nono, America)

19 Backward chaining example American(x) Weapon(y) Sells(x, y, z) Hostile(z) Criminal(x) Owns(Nono, M 1 ) and Missile(M 1 ) Missile(x) Owns(Nono, x) Sells(West, x, Nono) Missile(x) Weapon(x) Enemy(x, America) Hostile(x) American(West) and Enemy(Nono, America)

20 Backward chaining example American(x) Weapon(y) Sells(x, y, z) Hostile(z) Criminal(x) Owns(Nono, M 1 ) and Missile(M 1 ) Missile(x) Owns(Nono, x) Sells(West, x, Nono) Missile(x) Weapon(x) Enemy(x, America) Hostile(x) American(West) and Enemy(Nono, America)

21 Properties of backward chaining Depth-first recursive proof search: space is linear in size of proof Incomplete due to infinite loops partial fix by checking current goal against every goal on stack Inefficient due to repeated subgoals (both success and failure) fix using caching of previous results (extra space) Widely used for logic programming

22 Resolution A method for telling whether a propositional formula is satisfiable and for proving that a first-order formula is unsatisfiable. Yields a complete inference algorithm If a set of clauses if unsatisfiable, then the resolution closure of those clauses contains the empty clause (propositional logic)

23 Ground Binary Resolution Soundness: C P iff C P D P iff P D Therefore, C D, C P D P C D which is equivalent to C D Note: if both C and D are empty then resolution deduces the empty clause, i.e. false.

24 Non-Ground Binary Resolution C P D P (C D) θ where θ is the MGU of P and P The two clauses are assumed to be standardized apart so that they share no variables. Soundness: apply θ to premises then appeal to ground binary resolution. Cθ Pθ Dθ Pθ Cθ Dθ

25 Example with θ = {x/ken} Rich (x) Unhappy (x) Unhappy(Ken) Rich (Ken)

26 Factoring More generally A B A B A A C P 1... P m (C P 1 ) θ where θ is the MGU of the P i Soundness: by universal instantiation and deletion of duplicates.

27 Full Resolution C P 1... P m D P 1... P n (C D) θ where θ is MGU of all P i and P j Soundness: by combination of factoring and binary resolution. To prove α: apply resolution steps to CNF (KB α) complete for FOL, if full resolution or binary resolution + factoring is used

28 Conversion to CNF Example: Everyone who loves all animals is loved by someone: x.[ y.animal(y) Loves(x, y)] [ y.loves(y, x)] 1 Eliminate all biconditionals and implications x. [ y. Animal(y) Loves(x, y)] [ y.loves(y, x)] 2 Move inwards, use: x.p x. p, x.p x. p, etc. 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)]

29 Conversion to CNF contd. 1 Standardize variables apart: each quantifier should use a different one x.[ y.animal(y) Loves(x, y)] [ z.loves(z, x)] 2 Skolemize: a more general form of existential instantiation Each existential variable is replaced by a Skolem function of the enclosing universally quantified variables 1) : x.[animal(f (x)) Loves(x, F (x))] Loves(G(x), x) 3 Drop universal quantifiers: [Animal(F (x)) Loves(x, F (x))] Loves(G(x), x) 4 Distribute over : [Animal(F (x)) Loves(G(x), x)] [ Loves(x, F (x)) Loves(G(x), x)] 1) No enclosing universal quantifier? Just replace with Skolem constant, i.e. a function with no argument.

30 West Clauses American(x) Weapon(y) Sells(x, y, z) Hostile(z) Criminal(x) Owns(Nono, M 1 ) and Missile(M 1 ) Missile(x) Owns(Nono, x) Sells(West, x, Nono) Missile(x) Weapon(x) Enemy(x, America) Hostile(x) American(West) and Enemy(Nono, America)

31 Resolution proof: definite clauses

32 Summary Forward chaining Backward chaining Resolution

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

Resolution in FOPC. Deepak Kumar November Knowledge Engineering in FOPC

Resolution in FOPC. Deepak Kumar November Knowledge Engineering in FOPC 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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Artificial Intelligence. Chapters Reviews. Readings: Chapters 3-8 of Russell & Norvig.

Artificial Intelligence. Chapters Reviews. Readings: Chapters 3-8 of Russell & Norvig. Artificial Intelligence Chapters Reviews Readings: Chapters 3-8 of Russell & Norvig. Topics covered in the midterm Solving problems by searching (Chap. 3) How to formulate a search problem? How to measure

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

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

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

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

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

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

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

PROPOSITIONAL LOGIC (2)

PROPOSITIONAL LOGIC (2) PROPOSITIONAL LOGIC (2) based on Huth & Ruan Logic in Computer Science: Modelling and Reasoning about Systems Cambridge University Press, 2004 Russell & Norvig Artificial Intelligence: A Modern Approach

More information

Constraint Satisfaction Problems Part 2

Constraint Satisfaction Problems Part 2 Constraint Satisfaction Problems Part 2 Deepak Kumar October 2017 CSP Formulation (as a special case of search) State is defined by n variables x 1, x 2,, x n Variables can take on values from a domain

More information

Conjunctive queries. Many computational problems are much easier for conjunctive queries than for general first-order queries.

Conjunctive queries. Many computational problems are much easier for conjunctive queries than for general first-order queries. Conjunctive queries Relational calculus queries without negation and disjunction. Conjunctive queries have a normal form: ( y 1 ) ( y n )(p 1 (x 1,..., x m, y 1,..., y n ) p k (x 1,..., x m, y 1,..., y

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

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

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

STABILITY AND PARADOX IN ALGORITHMIC LOGIC

STABILITY AND PARADOX IN ALGORITHMIC LOGIC STABILITY AND PARADOX IN ALGORITHMIC LOGIC WAYNE AITKEN, JEFFREY A. BARRETT Abstract. Algorithmic logic is the logic of basic statements concerning algorithms and the algorithmic rules of deduction between

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

Introduction to Spring 2007 Artificial Intelligence Midterm Solutions

Introduction to Spring 2007 Artificial Intelligence Midterm Solutions NAME: SID#: Login: Sec: CS 88 Introduction to Spring 2007 Artificial Intelligence Midterm Solutions You have 80 minutes. There are five questions with equal points. Look at all the five questions and answer

More information

Announcements. CS 188: Artificial Intelligence Fall Reminder: CSPs. Today. Example: 3-SAT. Example: Boolean Satisfiability.

Announcements. CS 188: Artificial Intelligence Fall Reminder: CSPs. Today. Example: 3-SAT. Example: Boolean Satisfiability. CS 188: Artificial Intelligence Fall 2008 Lecture 5: CSPs II 9/11/2008 Announcements Assignments: DUE W1: NOW P1: Due 9/12 at 11:59pm Assignments: UP W2: Up now P2: Up by weekend Dan Klein UC Berkeley

More information

CS 188: Artificial Intelligence Fall 2008

CS 188: Artificial Intelligence Fall 2008 CS 188: Artificial Intelligence Fall 2008 Lecture 5: CSPs II 9/11/2008 Dan Klein UC Berkeley Many slides over the course adapted from either Stuart Russell or Andrew Moore 1 1 Assignments: DUE Announcements

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

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

System Description: iprover An Instantiation-Based Theorem Prover for First-Order Logic

System Description: iprover An Instantiation-Based Theorem Prover for First-Order Logic System Description: iprover An Instantiation-Based Theorem Prover for First-Order Logic Konstantin Korovin The University of Manchester School of Computer Science korovin@cs.man.ac.uk Abstract. iprover

More information

Constraint Satisfaction Problems. Chapter 6

Constraint Satisfaction Problems. Chapter 6 Constraint Satisfaction Problems Chapter 6 Office hours Office hours for Assignment 1 (ASB9810 in CSIL): Sep 29th(Fri) 12:00 to 13:30 Oct 3rd(Tue) 11:30 to 13:00 Late homework policy You get four late

More information

Constraint Satisfaction Problems

Constraint Satisfaction Problems Constraint Satisfaction Problems CE417: Introduction to Artificial Intelligence Sharif University of Technology Spring 2013 Soleymani Course material: Artificial Intelligence: A Modern Approach, 3 rd Edition,

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

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 Satisfaction Problems

Constraint Satisfaction Problems Constraint Satisfaction Problems Chapter 5 Chapter 5 1 Outline CSP examples Backtracking search for CSPs Problem structure and problem decomposition Local search for CSPs Chapter 5 2 Constraint satisfaction

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

CS 4100 // artificial intelligence

CS 4100 // artificial intelligence CS 4100 // artificial intelligence instructor: byron wallace Constraint Satisfaction Problems Attribution: many of these slides are modified versions of those distributed with the UC Berkeley CS188 materials

More information

Constraint Satisfaction Problems

Constraint Satisfaction Problems Constraint Satisfaction Problems Chapter 5 Chapter 5 1 Outline CSP examples Backtracking search for CSPs Problem structure and problem decomposition Local search for CSPs Chapter 5 2 Constraint satisfaction

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

Chapter 24. Active Database Concepts and Triggers. Outline. Trigger Example. Event-Condition-Action (ECA) Model

Chapter 24. Active Database Concepts and Triggers. Outline. Trigger Example. Event-Condition-Action (ECA) Model Chapter 24 Enhanced Data Models for Advanced Applications Copyright 2007 Ramez Elmasri and Shamkant B. Navathe Slide 24-1 Copyright 2007 Ramez Elmasri and Shamkant B. Navathe Outline Active database &

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

Set 9: Planning Classical Planning Systems. ICS 271 Fall 2013

Set 9: Planning Classical Planning Systems. ICS 271 Fall 2013 Set 9: Planning Classical Planning Systems ICS 271 Fall 2013 Outline: Planning Classical Planning: Situation calculus PDDL: Planning domain definition language STRIPS Planning Planning graphs Readings:

More information

Australia Western Australia Western Territory Northern Territory Northern Australia South Australia South Tasmania Queensland Tasmania Victoria

Australia Western Australia Western Territory Northern Territory Northern Australia South Australia South Tasmania Queensland Tasmania Victoria Constraint Satisfaction Problems Chapter 5 Example: Map-Coloring Western Northern Territory South Queensland New South Wales Tasmania Variables WA, NT, Q, NSW, V, SA, T Domains D i = {red,green,blue} Constraints:

More information

Constraint Satisfaction Problems

Constraint Satisfaction Problems Constraint Satisfaction Problems Chapter 5 Section 1 3 Constraint Satisfaction 1 Outline Constraint Satisfaction Problems (CSP) Backtracking search for CSPs Local search for CSPs Constraint Satisfaction

More information

Constraint Satisfaction Problems

Constraint Satisfaction Problems Constraint Satisfaction Problems Tuomas Sandholm Carnegie Mellon University Computer Science Department [Read Chapter 6 of Russell & Norvig] Constraint satisfaction problems (CSPs) Standard search problem:

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

Logic Programming and Resolution Lecture notes for INF3170/4171

Logic Programming and Resolution Lecture notes for INF3170/4171 Logic Programming and Resolution Lecture notes for INF3170/4171 Leif Harald Karlsen Autumn 2015 1 Introduction This note will explain the connection between logic and computer programming using Horn Clauses

More information

1 Inference for Boolean theories

1 Inference for Boolean theories Scribe notes on the class discussion on consistency methods for boolean theories, row convex constraints and linear inequalities (Section 8.3 to 8.6) Speaker: Eric Moss Scribe: Anagh Lal Corrector: Chen

More information

A Pearl on SAT Solving in Prolog (extended abstract)

A Pearl on SAT Solving in Prolog (extended abstract) A Pearl on SAT Solving in Prolog (extended abstract) Jacob M. Howe and Andy King 1 Introduction The Boolean satisfiability problem, SAT, is of continuing interest because a variety of problems are naturally

More information

Normal Forms for Boolean Expressions

Normal Forms for Boolean Expressions Normal Forms for Boolean Expressions A NORMAL FORM defines a class expressions s.t. a. Satisfy certain structural properties b. Are usually universal: able to express every boolean function 1. Disjunctive

More information

Deduction Rule System vs Production Rule System. Prof. Bob Berwick. Rules Rule

Deduction Rule System vs Production Rule System. Prof. Bob Berwick. Rules Rule Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.034 Artificial Intelligence, Fall 2003 Recitation 2, September 11/12 Rules Rule Prof. Bob Berwick Agenda

More information

Boolean Functions (Formulas) and Propositional Logic

Boolean Functions (Formulas) and Propositional Logic EECS 219C: Computer-Aided Verification Boolean Satisfiability Solving Part I: Basics Sanjit A. Seshia EECS, UC Berkeley Boolean Functions (Formulas) and Propositional Logic Variables: x 1, x 2, x 3,, x

More information

Constraint Satisfaction Problems. A Quick Overview (based on AIMA book slides)

Constraint Satisfaction Problems. A Quick Overview (based on AIMA book slides) Constraint Satisfaction Problems A Quick Overview (based on AIMA book slides) Constraint satisfaction problems What is a CSP? Finite set of variables V, V 2,, V n Nonempty domain of possible values for

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

Constraint Satisfaction

Constraint Satisfaction Constraint Satisfaction Philipp Koehn 1 October 2015 Outline 1 Constraint satisfaction problems (CSP) examples Backtracking search for CSPs Problem structure and problem decomposition Local search for

More information

(QiuXin Hui) 7.2 Given the following, can you prove that the unicorn is mythical? How about magical? Horned? Decide what you think the right answer

(QiuXin Hui) 7.2 Given the following, can you prove that the unicorn is mythical? How about magical? Horned? Decide what you think the right answer (QiuXin Hui) 7.2 Given the following, can you prove that the unicorn is mythical? How about magical? Horned? Decide what you think the right answer is yourself, then show how to get the answer using both

More information

Symbolic and Concolic Execution of Programs

Symbolic and Concolic Execution of Programs Symbolic and Concolic Execution of Programs Information Security, CS 526 Omar Chowdhury 10/7/2015 Information Security, CS 526 1 Reading for this lecture Symbolic execution and program testing - James

More information

Lecture 6: Constraint Satisfaction Problems (CSPs)

Lecture 6: Constraint Satisfaction Problems (CSPs) Lecture 6: Constraint Satisfaction Problems (CSPs) CS 580 (001) - Spring 2018 Amarda Shehu Department of Computer Science George Mason University, Fairfax, VA, USA February 28, 2018 Amarda Shehu (580)

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

SAT solver of Howe & King as a logic program

SAT solver of Howe & King as a logic program SAT solver of Howe & King as a logic program W lodzimierz Drabent June 6, 2011 Howe and King [HK11b, HK11a] presented a SAT solver which is an elegant and concise Prolog program of 22 lines. It is not

More information

Constraint Satisfaction Problems

Constraint Satisfaction Problems Revised by Hankui Zhuo, March 14, 2018 Constraint Satisfaction Problems Chapter 5 Chapter 5 1 Outline CSP examples Backtracking search for CSPs Problem structure and problem decomposition Local search

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

DATABASE THEORY. Lecture 11: Introduction to Datalog. TU Dresden, 12th June Markus Krötzsch Knowledge-Based Systems

DATABASE THEORY. Lecture 11: Introduction to Datalog. TU Dresden, 12th June Markus Krötzsch Knowledge-Based Systems DATABASE THEORY Lecture 11: Introduction to Datalog Markus Krötzsch Knowledge-Based Systems TU Dresden, 12th June 2018 Announcement All lectures and the exercise on 19 June 2018 will be in room APB 1004

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

Range Restriction for General Formulas

Range Restriction for General Formulas Range Restriction for General Formulas 1 Range Restriction for General Formulas Stefan Brass Martin-Luther-Universität Halle-Wittenberg Germany Range Restriction for General Formulas 2 Motivation Deductive

More information

Question 1: 25% of students lost more than 2 points Question 2: 50% of students lost 2-4 points; 50% got it entirely correct Question 3: 95% of

Question 1: 25% of students lost more than 2 points Question 2: 50% of students lost 2-4 points; 50% got it entirely correct Question 3: 95% of Question 1: 25% of students lost more than 2 points Question 2: 50% of students lost 2-4 points; 50% got it entirely correct Question 3: 95% of students got this problem entirely correct Question 4: Only

More information

Linear Clause Generation by Tableaux and DAGs

Linear Clause Generation by Tableaux and DAGs kovasznai 2007/8/10 11:27 page 109 #1 5/1 (2007), 109 118 tmcs@inf.unideb.hu http://tmcs.math.klte.hu Linear Clause Generation by Tableaux and DAGs Gergely Kovásznai Abstract. Clause generation is a preliminary

More information

Programming Systems in Artificial Intelligence Introduction

Programming Systems in Artificial Intelligence Introduction Click to add Text Programming Systems in Artificial Intelligence Introduction Siegfried Nijssen 23/02/16 Discover thediscover world at the Leiden world University at Leiden University Programming Paradigms

More information

Constraint Satisfaction Problems

Constraint Satisfaction Problems Last update: February 25, 2010 Constraint Satisfaction Problems CMSC 421, Chapter 5 CMSC 421, Chapter 5 1 Outline CSP examples Backtracking search for CSPs Problem structure and problem decomposition Local

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

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

CS W4701 Artificial Intelligence

CS W4701 Artificial Intelligence CS W4701 Artificial Intelligence Fall 2013 Chapter 6: Constraint Satisfaction Problems Jonathan Voris (based on slides by Sal Stolfo) Assignment 3 Go Encircling Game Ancient Chinese game Dates back At

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

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

Dipartimento di Elettronica Informazione e Bioingegneria. Cognitive Robotics. SATplan. Act1. Pre1. Fact. G. Gini Act2

Dipartimento di Elettronica Informazione e Bioingegneria. Cognitive Robotics. SATplan. Act1. Pre1. Fact. G. Gini Act2 Dipartimento di Elettronica Informazione e Bioingegneria Cognitive Robotics SATplan Pre1 Pre2 @ 2015 Act1 Act2 Fact why SAT (satisfability)? 2 Classical planning has been observed as a form of logical

More information

Artificial Intelligence

Artificial Intelligence Artificial Intelligence Constraint Satisfaction Problems Marc Toussaint University of Stuttgart Winter 2015/16 (slides based on Stuart Russell s AI course) Inference The core topic of the following lectures

More information

Basic Foundations of Isabelle/HOL

Basic Foundations of Isabelle/HOL Basic Foundations of Isabelle/HOL Peter Wullinger May 16th 2007 1 / 29 1 Introduction into Isabelle s HOL Why Type Theory Basic Type Syntax 2 More HOL Typed λ Calculus HOL Rules 3 Example proof 2 / 29

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

Lecture 7: January 15, 2014

Lecture 7: January 15, 2014 32002: AI (First order Predicate Logic, Syntax and Semantics) Spring 2014 Lecturer: K.R. Chowdhary Lecture 7: January 15, 2014 : Professor of CS (GF) Disclaimer: These notes have not been subjected to

More information

On the implementation of a multiple output algorithm for defeasible argumentation

On the implementation of a multiple output algorithm for defeasible argumentation On the implementation of a multiple output algorithm for defeasible argumentation Teresa Alsinet 1, Ramón Béjar 1, Lluis Godo 2, and Francesc Guitart 1 1 Department of Computer Science University of Lleida

More information

CS 188: Artificial Intelligence Fall 2011

CS 188: Artificial Intelligence Fall 2011 CS 188: Artificial Intelligence Fall 2011 Lecture 5: CSPs II 9/8/2011 Dan Klein UC Berkeley Multiple slides over the course adapted from either Stuart Russell or Andrew Moore 1 Today Efficient Solution

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

Example: Map coloring

Example: Map coloring Today s s lecture Local Search Lecture 7: Search - 6 Heuristic Repair CSP and 3-SAT Solving CSPs using Systematic Search. Victor Lesser CMPSCI 683 Fall 2004 The relationship between problem structure and

More information

Back to the knights and knaves island

Back to the knights and knaves island Back to the knights and knaves island During your Thanksgiving trip, you found another island with knights and knaves (you have a feeling that you may encounter many such islands this semester). Knights

More information

Set 5: Constraint Satisfaction Problems

Set 5: Constraint Satisfaction Problems Set 5: Constraint Satisfaction Problems ICS 271 Fall 2014 Kalev Kask ICS-271:Notes 5: 1 The constraint network model Outline Variables, domains, constraints, constraint graph, solutions Examples: graph-coloring,

More information

OWL 2 Profiles. An Introduction to Lightweight Ontology Languages. Markus Krötzsch University of Oxford. Reasoning Web 2012

OWL 2 Profiles. An Introduction to Lightweight Ontology Languages. Markus Krötzsch University of Oxford. Reasoning Web 2012 University of Oxford Department of Computer Science OWL 2 Profiles An Introduction to Lightweight Ontology Languages Markus Krötzsch University of Oxford Reasoning Web 2012 Remark for the Online Version

More information

Automated Reasoning. Natural Deduction in First-Order Logic

Automated Reasoning. Natural Deduction in First-Order Logic Automated Reasoning Natural Deduction in First-Order Logic Jacques Fleuriot Automated Reasoning Lecture 4, page 1 Problem Consider the following problem: Every person has a heart. George Bush is a person.

More information

6.034 Notes: Section 11.1

6.034 Notes: Section 11.1 6.034 Notes: Section 11.1 Slide 11.1.1 We've now spent a fair bit of time learning about the language of first-order logic and the mechanisms of automatic inference. And, we've also found that (a) it is

More information