Announcements. Project 1 underway... Second midterm Friday. discuss ideas with TAs check out wiki
|
|
- Roberta Brown
- 6 years ago
- Views:
Transcription
1 Announcements Project 1 underway... discuss ideas with TAs check out wiki Second midterm Friday You may bring on one letter-sized sheet of paper with anything written or drawn or... anywhere on it. It will cover up to as much as we get to today (including unification and top-down proofs with variables, equality and possibly negation as failure) c D. Poole and A. Mackworth 2017 CPSC Lecture 17 1 / 31
2 Review Prolog extends propositional logic program by having predicates, constants, variables and function symbols. Triples are universal representations of relations, and are the basis for RDF URIs provide constants that have standard meanings Ontologies define the meaning of symbols used in information systems. Unification is used to extend the top-down proof procedure to include structured atoms (predicates, functions, constants, variables). c D. Poole and A. Mackworth 2017 CPSC Lecture 17 2 / 31
3 Clicker Question What does this triple mean: cir, rdfs:domain, A cir is a property that applies only to newspapers B cir is a newspaper C cir is a property where some of the values are newspapers D cir is a property which apples to newspapers, and perhaps other things c D. Poole and A. Mackworth 2017 CPSC Lecture 17 3 / 31
4 Clicker Question For the atoms foo(x, X, Z) and foo(y, T, W ) The substitution {X /Y, T /Y, W /Y, Z/Y } A is a most general unifier B is a unifier, but not a most-general unifier C is not a unifier c D. Poole and A. Mackworth 2017 CPSC Lecture 17 4 / 31
5 Clicker Question For the atoms foo(x, X, Z) and foo(y, T, W ) The substitution {X /V, T /V, Y /V, W /M, Z/M} A is a most general unifier B is a unifier, but not a most-general unifier C is not a unifier c D. Poole and A. Mackworth 2017 CPSC Lecture 17 5 / 31
6 Clicker Question For the atoms foo(x, X, Z) and foo(y, b, W ) A most general unifier is A {Y /X, X /b, Z/W } B {X /b, Y /b, Z/X } C {X /b, Y /b, Z/T, W /T } D There are most general unifiers, but none of A-C are most general unifiers. E There are no most general unifiers c D. Poole and A. Mackworth 2017 CPSC Lecture 17 6 / 31
7 Top-down Proof procedure A generalized answer clause is of the form yes(t 1,..., t k ) :- a 1, a 2,..., a m, where t 1,..., t k are terms and a 1,..., a m are atoms. The SLD resolution of this generalized answer clause on a 1 with the clause a :- b 1,..., b p, where a i and a have most general unifier θ, is (yes(t 1,..., t k ) :- b 1,..., b p, a 2,..., a m )θ. c D. Poole and A. Mackworth 2017 CPSC Lecture 17 7 / 31
8 Top-down Proof Procedure To solve query?b with variables V 1,..., V k : Set ac to generalized answer clause yes(v 1,..., V k ) :- B while body of ac is not empty do Suppose ac is yes(t 1,..., t k ) :- a 1, a 2,..., a m select leftmost atom a i in the body of ac choose clause a :- b 1,..., b p in KB Rename all variables in a :- b 1,..., b p Let θ be the most general unifier of a i and a. Fail if they don t unify Set ac to (yes(t 1,..., t k ) :- b 1,..., b p, a 2,..., a m )θ end while. Answer is V 1 = t 1,..., V k = t k c D. Poole and A. Mackworth 2017 CPSC Lecture 17 8 / 31
9 Example append([], L, L). append([h T ], A, [H R]) :- append(t, A, R).? append([a, b, c], [1, 2, 3], L). yes(l) :- append([a, b, c], [1, 2, 3], L). yes([a R1]) :- append([b, c], [1, 2, 3], R1). yes([a, b R2]) :- append([c], [1, 2, 3], R2). yes([a, b, c R3]) :- append([], [1, 2, 3], R3). yes([a, b, c, 1, 2, 3]) :-. Answer is L = [a, b, c, 1, 2, 3] c D. Poole and A. Mackworth 2017 CPSC Lecture 17 9 / 31
10 Clicker Question For the answer clause yes(obj) :- noun([sam, likes, cs312], T 2, Obj), vp(t 2, T 3, Obj) and the clause in the knowledge base noun([x R], R, X ) :- person(x ) What is the most general unifier used in the top-down derivation A {R/[likes, cs312], X /sam, T 2/R, Obj/X } B {R/[cs312], X /[sam, likes], T 2/[cs312], Obj/sam} C {R/[likes, cs312], X /sam, T 2/[likes, cs312], Obj/sam} D It doesn t unify as there is no vp in the clause. E None of the above c D. Poole and A. Mackworth 2017 CPSC Lecture / 31
11 Clicker Question For the answer clause yes(obj) :- noun([sam, likes, cs312], T 2, Obj), vp(t 2, T 3, Obj). and the clause in the knowledge base noun([x R], R, X ) :- person(x ). What is the resulting answer clause (up to renaming of variables): A yes(x ) :- person(x ), vp(t 2, T 3, X ). B yes(sam) :- person(sam), vp([likes, cs312], T 3, sam). C yes(obj) :- noun([sam, likes, cs312], T 2, Obj), person(obj), vp(t 2, T 3, Obj). D yes(obj) :- person(obj), vp(t 2, T 3, Obj). E the proof fails here c D. Poole and A. Mackworth 2017 CPSC Lecture / 31
12 Clicker Question What is not a reason for renaming variables in the clause when resolving: A The system can forget about the names of variables when compiling clauses B To prevent name clashes for variables in the query and the clauses in the knowledge base C One clause in a program may be used multiple times in a proof with different substitutions D An answer may require multiple different instances of variables E These are all reasons c D. Poole and A. Mackworth 2017 CPSC Lecture / 31
13 Today Proofs with variables (cont) Equality, unique names assumption Negation as failure c D. Poole and A. Mackworth 2017 CPSC Lecture / 31
14 Unification with function symbols Consider a knowledge base consisting of one fact: lt(x, s(x )). Should the following query succeed??- lt(y, Y ). What does the top-down proof procedure give? Solution: variable X should not unify with a term that contains X inside. Occurs check E.g., X should not unify with s(x ). Simple modification of the unification algorithm, which Prolog does not do! c D. Poole and A. Mackworth 2017 CPSC Lecture / 31
15 Complete Knowledge Assumption Often you want to assume that your knowledge is complete. Example: assume that a database of what students are enrolled in a course is complete. We don t want to have to state all negative enrolment facts! The definite clause language is monotonic: adding clauses can t invalidate a previous conclusion. Under the complete knowledge assumption, the system is non-monotonic: adding clauses can invalidate a previous conclusion. c D. Poole and A. Mackworth 2017 CPSC Lecture / 31
16 Equality Equality is a special predicate symbol with a standard domain-independent intended interpretation. Suppose interpretation I = D, φ, π. t 1 and t 2 are ground terms then t 1 = t 2 is true in interpretation I if t 1 and t 2 denote the same individual. That is, t 1 = t 2 if φ(t 1 ) is the same as φ(t 2 ). t 1 t 2 when t 1 and t 2 denote different individuals. Example: D = {,, }. φ(phone) =, φ(pencil) =, φ(telephone) = What equalities and inequalities hold? phone = telephone, phone = phone, pencil = pencil, telephone = telephone pencil phone, pencil telephone Equality does not mean similarity! c D. Poole and A. Mackworth 2017 CPSC Lecture / 31
17 Equality Constants/Terms a b c d Individuals f(a) e c D. Poole and A. Mackworth 2017 CPSC Lecture / 31
18 Properties of Equality Equality is: Reflexive: X = X Symmetric: if X = Y then Y = X Transitive: if X = Y and Y = Z then X = Z For each n-ary function symbol f f (X 1,..., X n ) = f (Y 1,..., Y n ) if X 1 = Y 1 and and X n = Y n. For each n-ary predicate symbol p p(x 1,..., X n ) if p(y 1,..., Y n ) and X 1 = Y 1 and and X n = Y n. c D. Poole and A. Mackworth 2017 CPSC Lecture / 31
19 Unique Names Assumption Suppose the only clauses for enrolled are enrolled(sam, cs222) enrolled(chris, cs222) enrolled(sam, cs873) To conclude enrolled(chris, cs873), what do we need to assume? All other enrolled facts are false Inequalities: sam chris cs873 cs222 The unique names assumption (UNA) is the assumption that distinct ground terms denote different individuals. c D. Poole and A. Mackworth 2017 CPSC Lecture / 31
20 Inequality as a subgoal What should the following query return?? X 4. What should the following query return?? X 4, X = 7. What should the following query return?? X 4, X = 4. Prolog has 3 different inequalities that differ on examples like these: \== \= dif() They differ in cases where there are free variables, and terms unify but are not identical. c D. Poole and A. Mackworth 2017 CPSC Lecture / 31
21 Completion of a knowledge base: propositional case Suppose the rules for atom a are a b 1.. a b n. equivalently a b 1... b n. Under the Complete Knowledge Assumption, if a is true, one of the b i must be true: a b 1... b n. Thus, the clauses for a mean a b 1... b n c D. Poole and A. Mackworth 2017 CPSC Lecture / 31
22 Clark Normal Form The Clark normal form of the clause p(t 1,..., t k ) B. is the clause where p(v 1,..., V k ) W 1... W m V 1 = t 1,..., V k = t k, B. V 1,..., V k are k variables that did not appear in the original clause W 1,..., W m are the original variables in the clause. When the clause is an atomic clause, B is true. Often can be simplified by replacing W V = W p(w ) with P(V ). c D. Poole and A. Mackworth 2017 CPSC Lecture / 31
23 Clark normal form For the clauses student(mary). student(sam). student(x ) undergrad(x ). the Clark normal form is student(v ) V = mary. student(v ) V = sam. student(v ) X V = X undergrad(x ). c D. Poole and A. Mackworth 2017 CPSC Lecture / 31
24 Clark s Completion Suppose all of the clauses for p are put into Clark normal form, with the same set of introduced variables, giving p(v 1,..., V k ) B 1.. p(v 1,..., V k ) B n. which is equivalent to p(v 1,..., V k ) B 1... B n. Clark s completion of predicate p is the equivalence V 1... V k p(v 1,..., V k ) B 1... B n If there are no clauses for p, the completion results in V 1... V k p(v 1,..., V k ) false Clark s completion of a knowledge base consists of the completion of every predicate symbol along the unique names assumption. c D. Poole and A. Mackworth 2017 CPSC Lecture / 31
25 Completion example p q, \+ r. p s. q \+ s. r \+ t. t. s w. c D. Poole and A. Mackworth 2017 CPSC Lecture / 31
26 Completion Example Consider the recursive definition: passed each([ ], St, MinPass). passed each([c R], St, MinPass) passed(st, C, MinPass), passed each(r, St, MinPass). In Clark normal form, this can be written as passed each(l, S, M) :- L = [ ]. passed each(l, S, M) C R L = [C R], passed(s, C, M), passed each(r, S, M). Here we renamed the variables as appropriate. Thus, Clark s completion of passed each is L S M passed each(l, S, M) L = [ ] C R L = [C R], passed(s, C, M), passed each(r, S, M). c D. Poole and A. Mackworth 2017 CPSC Lecture / 31
27 Clark s Completion of a KB Clark s completion of a knowledge base consists of the completion of every predicate. The completion of an n-ary predicate p with no clauses is p(v 1,..., V n ) false. You can interpret negations in the body of clauses. \+ a means a is false under the complete knowledge assumption. \+ a is replaced by a in the completion. This is negation as failure. c D. Poole and A. Mackworth 2017 CPSC Lecture / 31
28 Defining empty course Given database of: course(c) that is true if C is a course enrolled(s, C) that is true if student S is enrolled in course C. Define empty course(c) that is true if there are no students enrolled in course C. Using negation as failure, empty course(c) can be defined by empty course(c) course(c), has enrollment(c) enrolled(s, C). \+ has enrollment(c). The completion of this is: C empty course(c) course(c), has enrollment(c). C has enrollment(c) S enrolled(s, C). c D. Poole and A. Mackworth 2017 CPSC Lecture / 31
29 Top-Down negation as failure proof procedure If the proof for a fails, you can conclude \+ a. Failure can be defined recursively: Suppose you have rules for atom a: a b 1. a b n If each body b i fails, a fails. A body fails if one of the conjuncts in the body fails. Note that you need finite failure. Example p :- p. c D. Poole and A. Mackworth 2017 CPSC Lecture / 31
30 Floundering p(x ) \+ q(x ), r(x ). q(a). q(b). r(d).?- p(x ). What is the answer to the query? How can a top-down proof procedure find the answer? Delay the subgoal until it is bound enough. Sometimes it never gets bound enough floundering. c D. Poole and A. Mackworth 2017 CPSC Lecture / 31
31 Problematic Cases p(x ) :- \+ q(x ) q(x ) :- \+ r(x ) r(a)?- p(x ). What is the answer? What does delaying do? How can this be implemented? c D. Poole and A. Mackworth 2017 CPSC Lecture / 31
Contents Chapters 2 & 3
Contents Chapters 2 & 3 Chapters 2 & 3: A Representation and Reasoning System Lecture 1 Representation and Reasoning Systems. Datalog. Lecture 2 Semantics. Lecture 3 Variables, queries and answers, limitations.
More informationIndividuals and Relations
Individuals and Relations It is useful to view the world as consisting of individuals (objects, things) and relations among individuals. Often features are made from relations among individuals and functions
More informationPropositions. c D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 5.1, Page 1
Propositions An interpretation is an assignment of values to all variables. A model is an interpretation that satisfies the constraints. Often we don t want to just find a model, but want to know what
More informationAnnouncements. Assignment 5 due today Assignment 6 (smaller than others) available sometime today Midterm: 27 February.
Announcements Assignment 5 due today Assignment 6 (smaller than others) available sometime today Midterm: 27 February. You can bring in a letter sized sheet of paper with anything written in it. Exam will
More informationTop-Down Execution CS240B Notes
Top-Down Execution CS240B Notes Notes based on Section 9.4 of Advanced Database Systems Morgan Kaufmann, 1997 C. Zaniolo, March 2002 p.1/22 Top-Down Execution of Datalog A strict bottom-up execution strategy
More informationPropositional Logic: Bottom-Up Proofs
Propositional Logic: Bottom-Up Proofs CPSC 322 Logic 3 Textbook 5.2 Propositional Logic: Bottom-Up Proofs CPSC 322 Logic 3, Slide 1 Lecture Overview 1 Recap 2 Bottom-Up Proofs 3 Soundness of Bottom-Up
More informationLogic (3A) Young W. Lim 12/5/13
Copyright (c) 2013. 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 Software
More informationFoundations of Logic Programming
Foundations of Logic Programming Deductive Logic e.g. of use: Gypsy specifications and proofs About deductive logic (Gödel, 1931) Interesting systems (with a finite number of axioms) are necessarily either:
More informationProlog. Resolution (for beginners?) Resolution (cont.) Resolution (cont.) Unification. Resolution (still cont.) Resolution & Unification
Resolution & Unification Prolog Computer Science Resolution (for beginners?) Resolution is a theorem proving method developed by Robinson based on representing logical formulas as clauses Clauses are build
More informationReasoning Under Uncertainty: Introduction to Probability
Reasoning Under Uncertainty: Introduction to Probability CPSC 322 Uncertainty 1 Textbook 6.1 Reasoning Under Uncertainty: Introduction to Probability CPSC 322 Uncertainty 1, Slide 1 Lecture Overview 1
More informationAnnouncements. Solution to Assignment 3 is posted Assignment 4 is available. c D. Poole and A. Mackworth 2017 CPSC 322 Lecture 8 1 / 25
Announcements Solution to Assignment 3 is posted Assignment 4 is available c D. Poole and A. Mackworth 2017 CPSC 322 Lecture 8 1 / 25 Review: So far... Constraint satisfaction problems defined in terms
More informationKünstliche Intelligenz
Künstliche Intelligenz 4. Wissensrepräsentation Dr. Claudia Schon schon@uni-koblenz.de Institute for Web Science and Technologies 1 Except for some small changes these slides are transparencies from Poole,
More informationLogic: Bottom-up & Top-down proof procedures
Logic: Bottom-up & Top-down proof procedures Alan Mackworth UBC CS 322 Logic 3 March 4, 2013 P & M Textbook 5.2 Lecture Overview Recap: Soundness, Completeness, Bottom-up proof procedure Bottom-up Proof
More informationPropositional Logic: Semantics and an Example
Propositional Logic: Semantics and an Example CPSC 322 Logic 2 Textbook 5.2 Propositional Logic: Semantics and an Example CPSC 322 Logic 2, Slide 1 Lecture Overview 1 Recap: Syntax 2 Propositional Definite
More informationLogic: Top-down proof procedure and Datalog
Logic: Top-down proof procedure and Datalog CPSC 322 Logic 4 Textbook 5.2 March 11, 2011 Lecture Overview Recap: Bottom-up proof procedure is sound and complete Top-down Proof Procedure Datalog 2 Logical
More informationUniversity of Aberdeen, Computing Science CS2013 Predicate Logic 4 Kees van Deemter
University of Aberdeen, Computing Science CS2013 Predicate Logic 4 Kees van Deemter 01/11/16 Kees van Deemter 1 First-Order Predicate Logic (FOPL) Lecture 4 Making numerical statements: >0, 1,>2,1,2
More information3. The Logic of Quantified Statements Summary. Aaron Tan August 2017
3. The Logic of Quantified Statements Summary Aaron Tan 28 31 August 2017 1 3. The Logic of Quantified Statements 3.1 Predicates and Quantified Statements I Predicate; domain; truth set Universal quantifier,
More informationLogical reasoning - Can we formalise our thought processes?
Logical reasoning - Can we formalise our thought processes? Why study (mathematical) logic? Logic: the science or method of reasoning Logical: able to reason correctly Human reasoning poorly understood,
More informationLogic: Resolution Proofs; Datalog
Logic: ; Datalog CPSC 322 Logic 5 Textbook 5.2; 12.2 Logic: ; Datalog CPSC 322 Logic 5, Slide 1 Lecture Overview 1 Recap 2 Logic: ; Datalog CPSC 322 Logic 5, Slide 2 Proofs A proof is a mechanically derivable
More informationCS2742 midterm test 2 study sheet. Boolean circuits: Predicate logic:
x NOT ~x x y AND x /\ y x y OR x \/ y Figure 1: Types of gates in a digital circuit. CS2742 midterm test 2 study sheet Boolean circuits: Boolean circuits is a generalization of Boolean formulas in which
More informationStrong AI vs. Weak AI Automated Reasoning
Strong AI vs. Weak AI Automated Reasoning George F Luger ARTIFICIAL INTELLIGENCE 6th edition Structures and Strategies for Complex Problem Solving Artificial intelligence can be classified into two categories:
More informationCS 4700: Artificial Intelligence
CS 4700: Foundations of Artificial Intelligence Fall 2017 Instructor: Prof. Haym Hirsh Lecture 14 Today Knowledge Representation and Reasoning (R&N Ch 7-9) Prelim, Statler Auditorium Tuesday, March 21
More informationResolution and Refutation
Resolution and Refutation York University Department of Computer Science and Engineering York University- CSE 3401- V. Movahedi 04_Resolution 1 Propositional Logic Resolution Refutation Predicate Logic
More informationCSC384: Intro to Artificial Intelligence Knowledge Representation II. Required Readings: 9.1, 9.2, and 9.5 Announcements:
CSC384: Intro to Artificial Intelligence Knowledge Representation II Required Readings: 9.1, 9.2, and 9.5 Announcements: 1 Models Examples. Environment A Language (Syntax) Constants: a,b,c,e Functions:
More informationCOMP9414: Artificial Intelligence First-Order Logic
COMP9414, Wednesday 13 April, 2005 First-Order Logic 2 COMP9414: Artificial Intelligence First-Order Logic Overview Syntax of First-Order Logic Semantics of First-Order Logic Conjunctive Normal Form Wayne
More informationDefinite Logic Programs
Chapter 2 Definite Logic Programs 2.1 Definite Clauses The idea of logic programming is to use a computer for drawing conclusions from declarative descriptions. Such descriptions called logic programs
More informationReasoning Under Uncertainty: Introduction to Probability
Reasoning Under Uncertainty: Introduction to Probability CPSC 322 Lecture 23 March 12, 2007 Textbook 9 Reasoning Under Uncertainty: Introduction to Probability CPSC 322 Lecture 23, Slide 1 Lecture Overview
More informationComputing logical consequences
CSE 3402: Intro to Artificial Intelligence Inference in First-Order Logic Required Readings: 9.1, 9.2, and 9.5 Resolution Proofs. Part I: Convert to clausal form Part II: Dealing with variables (unification).
More informationIntroduction to Predicate Logic Part 1. Professor Anita Wasilewska Lecture Notes (1)
Introduction to Predicate Logic Part 1 Professor Anita Wasilewska Lecture Notes (1) Introduction Lecture Notes (1) and (2) provide an OVERVIEW of a standard intuitive formalization and introduction to
More informationAdvanced Topics in LP and FP
Lecture 1: Prolog and Summary of this lecture 1 Introduction to Prolog 2 3 Truth value evaluation 4 Prolog Logic programming language Introduction to Prolog Introduced in the 1970s Program = collection
More informationChapters 2&3: A Representation and Reasoning System
Computational Intelligence Chapter 2 Chapters 2&3: A Representation and Reasoning System Lecture 1 Representation and Reasoning Systems. Datalog. Lecture 2 Semantics. Lecture 3 Variables, queries and answers,
More informationPropositional Definite Clause Logic: Syntax, Semantics and Bottom-up Proofs
Propositional Definite Clause Logic: Syntax, Semantics and Bottom-up Proofs Computer Science cpsc322, Lecture 20 (Textbook Chpt 5.1.2-5.2.2 ) June, 6, 2017 CPSC 322, Lecture 20 Slide 1 Lecture Overview
More informationOutline. Logic. Definition. Theorem (Gödel s Completeness Theorem) Summary of Previous Week. Undecidability. Unification
Logic Aart Middeldorp Vincent van Oostrom Franziska Rapp Christian Sternagel Department of Computer Science University of Innsbruck WS 2017/2018 AM (DCS @ UIBK) week 11 2/38 Definitions elimination x φ
More informationCOMP9414: Artificial Intelligence Propositional Logic: Automated Reasoning
COMP9414, Monday 26 March, 2012 Propositional Logic 2 COMP9414: Artificial Intelligence Propositional Logic: Automated Reasoning Overview Proof systems (including soundness and completeness) Normal Forms
More informationComputational Logic Fundamentals (of Definite Programs): Syntax and Semantics
Computational Logic Fundamentals (of Definite Programs): Syntax and Semantics 1 Towards Logic Programming Conclusion: resolution is a complete and effective deduction mechanism using: Horn clauses (related
More informationINTRODUCTION TO LOGIC
INTRODUCTION TO LOGIC 6 Natural Deduction Volker Halbach There s nothing you can t prove if your outlook is only sufficiently limited. Dorothy L. Sayers http://www.philosophy.ox.ac.uk/lectures/ undergraduate_questionnaire
More informationINTRODUCTION TO LOGIC 8 Identity and Definite Descriptions
8.1 Qualitative and Numerical Identity INTRODUCTION TO LOGIC 8 Identity and Definite Descriptions Volker Halbach Keith and Volker have the same car. Keith and Volker have identical cars. Keith and Volker
More information1 FUNDAMENTALS OF LOGIC NO.10 HERBRAND THEOREM Tatsuya Hagino hagino@sfc.keio.ac.jp lecture URL https://vu5.sfc.keio.ac.jp/slide/ 2 So Far Propositional Logic Logical connectives (,,, ) Truth table Tautology
More information07 Equational Logic and Algebraic Reasoning
CAS 701 Fall 2004 07 Equational Logic and Algebraic Reasoning Instructor: W. M. Farmer Revised: 17 November 2004 1 What is Equational Logic? Equational logic is first-order logic restricted to languages
More informationPropositional Logic Not Enough
Section 1.4 Propositional Logic Not Enough If we have: All men are mortal. Socrates is a man. Does it follow that Socrates is mortal? Can t be represented in propositional logic. Need a language that talks
More informationPropositional and Predicate Logic - V
Propositional and Predicate Logic - V Petr Gregor KTIML MFF UK WS 2016/2017 Petr Gregor (KTIML MFF UK) Propositional and Predicate Logic - V WS 2016/2017 1 / 21 Formal proof systems Hilbert s calculus
More information8 General first order representation
Intro. to Artificial Intelligence: Dale Schuurmans, Relu Patrascu 1 8 General first order representation 8.1 First order language Propositional core constants A, B, C, D predicates on(, ) associated arity,
More informationInference in First Order Logic
Inference in First Order Logic Course: CS40002 Instructor: Dr. Pallab Dasgupta Department of Computer Science & Engineering Indian Institute of Technology Kharagpur Inference rules Universal elimination:
More informationLogic and Reasoning. Foundations of Computing Science. Pallab Dasgupta Professor, Dept. of Computer Sc & Engg INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR
Logic and Reasoning Foundations of Computing Science Pallab Dasgupta Professor, Dept. of Computer Sc & Engg 2 Knowledge and Reasoning Representation, Reasoning and Logic Propositional Logic First-Order
More informationExercises 1 - Solutions
Exercises 1 - Solutions SAV 2013 1 PL validity For each of the following propositional logic formulae determine whether it is valid or not. If it is valid prove it, otherwise give a counterexample. Note
More informationPropositions. c D. Poole and A. Mackworth 2008 Artificial Intelligence, Lecture 5.1, Page 1
Propositions An interpretation is an assignment of values to all variables. A model is an interpretation that satisfies the constraints. Often we don t want to just find a model, but want to know what
More informationcse 311: foundations of computing Fall 2015 Lecture 6: Predicate Logic, Logical Inference
cse 311: foundations of computing Fall 2015 Lecture 6: Predicate Logic, Logical Inference quantifiers x P(x) P(x) is true for every x in the domain read as for all x, P of x x P x There is an x in the
More informationLogic. Knowledge Representation & Reasoning Mechanisms. Logic. Propositional Logic Predicate Logic (predicate Calculus) Automated Reasoning
Logic Knowledge Representation & Reasoning Mechanisms Logic Logic as KR Propositional Logic Predicate Logic (predicate Calculus) Automated Reasoning Logical inferences Resolution and Theorem-proving Logic
More informationDiscrete Mathematics and Its Applications
Discrete Mathematics and Its Applications Lecture 1: The Foundations: Logic and Proofs (1.3-1.5) MING GAO DASE @ ECNU (for course related communications) mgao@dase.ecnu.edu.cn Sep. 19, 2017 Outline 1 Logical
More informationConvert to clause form:
Convert to clause form: Convert the following statement to clause form: x[b(x) ( y [ Q(x,y) P(y) ] y [ Q(x,y) Q(y,x) ] y [ B(y) E(x,y)] ) ] 1- Eliminate the implication ( ) E1 E2 = E1 E2 x[ B(x) ( y [
More informationLogic Programming Theory Lecture 7: Negation as Failure
Logic Programming Theory Lecture 7: Negation as Failure Richard Mayr School of Informatics 6th November 2014 Negation as failure: problem 1 Prolog s treatment of negation as failure is a procedural rather
More informationPropositional Reasoning
Propositional Reasoning CS 440 / ECE 448 Introduction to Artificial Intelligence Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil Johri Spring 2010 Intro to AI (CS
More informationThe non-logical symbols determine a specific F OL language and consists of the following sets. Σ = {Σ n } n<ω
1 Preliminaries In this chapter we first give a summary of the basic notations, terminology and results which will be used in this thesis. The treatment here is reduced to a list of definitions. For the
More informationINTRODUCTION TO LOGIC 8 Identity and Definite Descriptions
INTRODUCTION TO LOGIC 8 Identity and Definite Descriptions Volker Halbach The analysis of the beginning would thus yield the notion of the unity of being and not-being or, in a more reflected form, the
More informationUnification and occur check. The programming language Prolog
Resolution and Logic Programming Ground resolution Unification and occur check General Resolution Logic Programming SLD-resolution The programming language Prolog Syntax Arithmetic Lists Slide 1 Motivation
More informationLogic and Modelling. Introduction to Predicate Logic. Jörg Endrullis. VU University Amsterdam
Logic and Modelling Introduction to Predicate Logic Jörg Endrullis VU University Amsterdam Predicate Logic In propositional logic there are: propositional variables p, q, r,... that can be T or F In predicate
More informationInf2D 13: Resolution-Based Inference
School of Informatics, University of Edinburgh 13/02/18 Slide Credits: Jacques Fleuriot, Michael Rovatsos, Michael Herrmann Last lecture: Forward and backward chaining Backward chaining: If Goal is known
More informationCPSC 121: Models of Computation
CPSC 121: Models of Computation Unit 6 Rewriting Predicate Logic Statements Based on slides by Patrice Belleville and Steve Wolfman Coming Up Pre-class quiz #7 is due Wednesday October 25th at 9:00 pm.
More informationBachelor/Master Exam Version V3B
Prof aadr Jürgen Giesl Carsten Fuhs, Carsten Otto, Thomas Ströder Bachelor/Master Exam Version V3B First Name: Last Name: Immatriculation Number: Course of Studies (please mark exactly one): Informatik
More informationSymbolising Quantified Arguments
Symbolising Quantified Arguments 1. (i) Symbolise the following argument, given the universe of discourse is U = set of all animals. Animals are either male or female. Not all Cats are male, Therefore,
More informationInference in first-order logic
CS 2710 Foundations of AI Lecture 15 Inference in first-order logic Milos Hauskrecht milos@cs.pitt.edu 5329 Sennott Square Logical inference in FOL Logical inference problem: Given a knowledge base KB
More informationKnowledge base (KB) = set of sentences in a formal language Declarative approach to building an agent (or other system):
Logic Knowledge-based agents Inference engine Knowledge base Domain-independent algorithms Domain-specific content Knowledge base (KB) = set of sentences in a formal language Declarative approach to building
More informationINTRODUCTION TO LOGIC
Introduction INTRODUCTION TO LOGIC 6 Natural Deduction Volker Halbach Definition Let Γ be a set of sentences of L 2 and ϕ a sentence of L 2. Then Γ ϕ if and only if there is no L 2 -structure in which
More informationA Brief Introduction to Nonmonotonic Reasoning
A Brief Introduction to Nonmonotonic Reasoning Gerhard Brewka, Stefan Woltran Computer Science Institute University of Leipzig [brewka,woltran]@informatik.uni-leipzig.de G. Brewka, S. Woltran (Leipzig)
More informationSection Summary. Predicate logic Quantifiers. Negating Quantifiers. Translating English to Logic. Universal Quantifier Existential Quantifier
Section 1.4 Section Summary Predicate logic Quantifiers Universal Quantifier Existential Quantifier Negating Quantifiers De Morgan s Laws for Quantifiers Translating English to Logic Propositional Logic
More informationAdvanced Topics in LP and FP
Lecture 3: Logic Programming in Prolog Outline 1 2 3 The control of execution Logic Programming Declarative programming style: Emphasis on What is the solution? instead of How to find the solution? Symbolic
More informationComputational Logic. Recall of First-Order Logic. Damiano Zanardini
Computational Logic Recall of First-Order Logic Damiano Zanardini UPM European Master in Computational Logic (EMCL) School of Computer Science Technical University of Madrid damiano@fi.upm.es Academic
More informationPredicate Logic: Sematics Part 1
Predicate Logic: Sematics Part 1 CS402, Spring 2018 Shin Yoo Predicate Calculus Propositional logic is also called sentential logic, i.e. a logical system that deals with whole sentences connected with
More informationChapter 5: Propositions and Inference. c D. Poole, A. Mackworth 2010, W. Menzel 2015 Artificial Intelligence, Chapter 5, Page 1
Chapter 5: Propositions and Inference c D. Poole, A. Mackworth 2010, W. Menzel 2015 Artificial Intelligence, Chapter 5, Page 1 Propositions An interpretation is an assignment of values to all variables.
More informationChapter 7. Negation: Declarative Interpretation
Chapter 7 1 Outline First-Order Formulas and Logical Truth The Completion semantics Soundness and restricted completeness of SLDNF-Resolution Extended consequence operator An alternative semantics: Standard
More information2/2/2018. CS 103 Discrete Structures. Chapter 1. Propositional Logic. Chapter 1.1. Propositional Logic
CS 103 Discrete Structures Chapter 1 Propositional Logic Chapter 1.1 Propositional Logic 1 1.1 Propositional Logic Definition: A proposition :is a declarative sentence (that is, a sentence that declares
More informationICS141: Discrete Mathematics for Computer Science I
ICS141: Discrete Mathematics for Computer Science I Dept. Information & Computer Sci., Originals slides by Dr. Baek and Dr. Still, adapted by J. Stelovsky Based on slides Dr. M. P. Frank and Dr. J.L. Gross
More informationPropositional Logic: Review
Propositional Logic: Review Propositional logic Logical constants: true, false Propositional symbols: P, Q, S,... (atomic sentences) Wrapping parentheses: ( ) Sentences are combined by connectives:...and...or
More informationTDDD08 Tutorial 1. Who? From? When? 6 september Victor Lagerkvist (& Wªodek Drabent)
TDDD08 Tutorial 1 Who? From? Victor Lagerkvist (& Wªodek Drabent) Theoretical Computer Science Laboratory, Linköpings Universitet, Sweden When? 6 september 2015 1 / 18 Preparations Before you start with
More informationCSE 20. Final Review. CSE 20: Final Review
CSE 20 Final Review Final Review Representation of integers in base b Logic Proof systems: Direct Proof Proof by contradiction Contraposetive Sets Theory Functions Induction Final Review Representation
More informationCOMP4418: Knowledge Representation and Reasoning First-Order Logic
COMP4418: Knowledge Representation and Reasoning First-Order Logic Maurice Pagnucco School of Computer Science and Engineering University of New South Wales NSW 2052, AUSTRALIA morri@cse.unsw.edu.au COMP4418
More informationResolution for Predicate Logic
Logic and Proof Hilary 2016 James Worrell Resolution for Predicate Logic A serious drawback of the ground resolution procedure is that it requires looking ahead to predict which ground instances of clauses
More informationAnnouncement. Homework 1
Announcement I made a few small changes to the course calendar No class on Wed eb 27 th, watch the video lecture Quiz 8 will take place on Monday April 15 th We will submit assignments using Gradescope
More informationLecture 10: Even more on predicate logic" Prerequisites for lifted inference: Skolemization and Unification" Inference in predicate logic"
CS440/ECE448: Intro to Artificial Intelligence Lecture 10: Even more on predicate logic Prof. Julia Hockenmaier juliahmr@illinois.edu http://cs.illinois.edu/fa11/cs440 Inference in predicate logic All
More information1 FUNDAMENTALS OF LOGIC NO.8 SEMANTICS OF PREDICATE LOGIC Tatsuya Hagino hagino@sfc.keio.ac.jp lecture URL https://vu5.sfc.keio.ac.jp/slide/ 2 So Far Propositional Logic Logical connectives (,,, ) Truth
More informationInference in first-order logic
CS 57 Introduction to AI Lecture 5 Inference in first-order logic Milos Hauskrecht milos@cs.pitt.edu 5329 Sennott Square Logical inference in FOL Logical inference problem: Given a knowledge base KB (a
More information15414/614 Optional Lecture 3: Predicate Logic
15414/614 Optional Lecture 3: Predicate Logic Anvesh Komuravelli 1 Why Predicate Logic? Consider the following statements. 1. Every student is younger than some instructor. 2. Not all birds can fly. Propositional
More informationLogic: Intro & Propositional Definite Clause Logic
Logic: Intro & Propositional Definite Clause Logic Alan Mackworth UBC CS 322 Logic 1 February 27, 2013 P & M extbook 5.1 Lecture Overview Recap: CSP planning Intro to Logic Propositional Definite Clause
More informationModels. Let our knowledge base KB, consist of a set of formulas. We say that I is a model of KB or that I satisfies KB
Models Let our knowledge base KB, consist of a set of formulas. We say that I is a model of KB or that I satisfies KB If, every formula f Î KB is true under I We write I KB if I satisfies KB, and I f if
More informationIntroduction to Sets and Logic (MATH 1190)
Introduction to Sets Logic () Instructor: Email: shenlili@yorku.ca Department of Mathematics Statistics York University Sept 18, 2014 Outline 1 2 Tautologies Definition A tautology is a compound proposition
More informationLecture overview. Knowledge-based systems in Bioinformatics, 1MB602. Reasoning. Reasoning cont. Inference in propositional logic.
Lecture overview Knowledge-based systems in Bioinformatics, 1MB602 Logical reasoning Inference rules Example proofs Natural deduction SLD Resolution Lecture 7: Logical inference Reasoning The property
More informationComputed answer based on fuzzy knowledgebase a model for handling uncertain information
Computed answer based on fuzzy knowledgebase a model for handling uncertain information Ágnes Achs Departement of Computer Science University of Pécs, Faculty of Engineering Pécs, Boszorkány u. 2, Hungary
More informationProlog and Logic Programming. CS152 Chris Pollett Dec. 3, 2008.
Prolog and Logic Programming CS152 Chris Pollett Dec. 3, 2008. Outline Logic and Logic Programs Horn Clauses Resolution and Unification Prolog Introduction So far this semester we have considered three
More informationFuzzy Datalog with background knowledge
3/2 (2005), 257 281 Fuzzy Datalog with background knowledge Ágnes Achs Abstract. In this paper we give a possible model for handling uncertain information. The concept of fuzzy knowledge-base will be defined
More informationResolution (14A) Young W. Lim 8/15/14
Resolution (14A) Young W. Lim Copyright (c) 2013-2014 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version
More informationLogical Inference 2 rule based reasoning
Logical Inference 2 rule based reasoning Chapter 9 Some material adopted from notes by Andreas Geyer-Schulz,, Chuck Dyer, and Mary Getoor Automated inference for FOL Automated inference for FOL is harder
More informationFirst-Order Theorem Proving and Vampire. Laura Kovács (Chalmers University of Technology) Andrei Voronkov (The University of Manchester)
First-Order Theorem Proving and Vampire Laura Kovács (Chalmers University of Technology) Andrei Voronkov (The University of Manchester) Outline Introduction First-Order Logic and TPTP Inference Systems
More informationIntelligent Agents. First Order Logic. Ute Schmid. Cognitive Systems, Applied Computer Science, Bamberg University. last change: 19.
Intelligent Agents First Order Logic Ute Schmid Cognitive Systems, Applied Computer Science, Bamberg University last change: 19. Mai 2015 U. Schmid (CogSys) Intelligent Agents last change: 19. Mai 2015
More informationBrief Introduction to Prolog
Brief to Prolog Joana Côrte-Real jcr@dcc.fc.up.pt CRACS & INESC TEC Faculty of Sciences University of Porto University of Aizu 5th December 2014 1 / 27 Overview 1 to Prolog Prolog Syntax Tutorial 1 2 Lists
More informationComputational Logic Automated Deduction Fundamentals
Computational Logic Automated Deduction Fundamentals 1 Elements of First-Order Predicate Logic First Order Language: An alphabet consists of the following classes of symbols: 1. variables denoted by X,
More informationBachelor/Master Exam Version V3B
Prof aadr Jürgen Giesl Cornelius Aschermann, Jera Hensel Bachelor/Master Exam Version V3B First Name: Last Name: Immatriculation Number: Course of Studies (please mark exactly one): Informatik Bachelor
More informationCogSysI Lecture 8: Automated Theorem Proving
CogSysI Lecture 8: Automated Theorem Proving Intelligent Agents WS 2004/2005 Part II: Inference and Learning Automated Theorem Proving CogSysI Lecture 8: Automated Theorem Proving p. 200 Remember......
More informationAdvanced DB CHAPTER 5 DATALOG
Advanced DB CHAPTER 5 DATALOG Datalog Basic Structure Syntax of Datalog Rules Semantics of Nonrecursive Datalog Safety Relational Operations in Datalog Recursion in Datalog The Power of Recursion A More
More informationFirst-Order Logic. Resolution
First-Order Logic Resolution 1 Resolution for predicate logic Gilmore s algorithm is correct and complete, but useless in practice. We upgrade resolution to make it work for predicate logic. 2 Recall:
More informationFormal Logic: Quantifiers, Predicates, and Validity. CS 130 Discrete Structures
Formal Logic: Quantifiers, Predicates, and Validity CS 130 Discrete Structures Variables and Statements Variables: A variable is a symbol that stands for an individual in a collection or set. For example,
More information