Formal Aspects of Computer Science - Week 5 Logic and Reasoning Lee McCluskey, room 2/07

Slides:



Advertisements
Similar presentations
Artificial Intelligence
Advertisements

Standard Logical Equivalences
UIUC CS 497: Section EA Lecture #2 Reasoning in Artificial Intelligence Professor: Eyal Amir Spring Semester 2004.
F22H1 Logic and Proof Week 7 Clausal Form and Resolution.
Knowledge Representation Methods
AI - Week 13 Knowledge Representation, Logic, Semantic Web Lee McCluskey, room 2/07
Outline Recap Knowledge Representation I Textbook: Chapters 6, 7, 9 and 10.
Resolution Refutation Formal Aspects of Computer Science - Week 10 An Automated Theorem Prover Lee McCluskey, room 2/07
The Semantic Web – WEEK 7: Logic, Reasoning and Proof The “Layer Cake” Model – [From Rector & Horrocks Semantic Web cuurse] You are here!
AI - Week 16 Logic and Reasoning in AI: Resolution Refutation Lee McCluskey, room 2/07
AI - Week 15 Logic and Reasoning in AI Lee McCluskey, room 2/07
Resolution Refutation Formal Aspects of Computer Science - Week 9 Resolution Refutation, Relation with Prolog Lee McCluskey, room 2/07
1 Chapter 7 Propositional and Predicate Logic. 2 Chapter 7 Contents (1) l What is Logic? l Logical Operators l Translating between English and Logic l.
Modelling Conceptual Knowledge using Logic - Week 6 Lee McCluskey Department of Computing and Mathematical Sciences University of Huddersfield.
CSE 311 Foundations of Computing I Lecture 6 Predicate Logic Autumn 2011 CSE 3111.
1 Math 306 Foundations of Mathematics I Math 306 Foundations of Mathematics I Goals of this class Introduction to important mathematical concepts Development.
Knoweldge Representation & Reasoning
The Semantic Web Week 12 Term 1 Recap Lee McCluskey, room 2/07 Department of Computing And Mathematical Sciences Module Website:
Chapter 3 Propositional Logic
The Semantic Web – WEEK 10: Introduction to Description Logics The “Layer Cake” Model – [From Rector & Horrocks Semantic Web cuurse] We are back down to.
Formal Aspects of Computer Science – Week 12 RECAP Lee McCluskey, room 2/07
The Semantic Web – WEEK 8: Proof in FOL continued The “Layer Cake” Model – [From Rector & Horrocks Semantic Web cuurse] You are here!
The Semantic Web – WEEK 8: An automatic Proof technique.. The “Layer Cake” Model – [From Rector & Horrocks Semantic Web cuurse] You are here!
Logical and Rule-Based Reasoning Part I. Logical Models and Reasoning Big Question: Do people think logically?
CIA2326 Week4: Predicate Logic : introduction Lee McCluskey, room 2/07
Resolution Refutation Formal Aspects of Computer Science - Week 8 The Law of Resolution and the Resolution Procedure Lee McCluskey, room 2/07
Predicates and Quantifiers
CSE 311 Foundations of Computing I Lecture 6 Predicate Logic, Logical Inference Spring
Propositional Logic Reasoning correctly computationally Chapter 7 or 8.
I NTRO TO L OGIC Dr Shlomo Hershkop March
Proof Systems KB |- Q iff there is a sequence of wffs D1,..., Dn such that Dn is Q and for each Di in the sequence: a) either Di is in KB or b) Di can.
(CSC 102) Lecture 7 Discrete Structures. Previous Lectures Summary Predicates Set Notation Universal and Existential Statement Translating between formal.
Knowledge Representation Use of logic. Artificial agents need Knowledge and reasoning power Can combine GK with current percepts Build up KB incrementally.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
Pattern-directed inference systems
Logical Agents Logic Propositional Logic Summary
1 Knowledge Representation. 2 Definitions Knowledge Base Knowledge Base A set of representations of facts about the world. A set of representations of.
Propositional Logic Dr. Rogelio Dávila Pérez Profesor-Investigador División de Posgrado Universidad Autónoma Guadalajara
1 Introduction to Computational Linguistics Eleni Miltsakaki AUTH Spring 2006-Lecture 8.
CSE 311 Foundations of Computing I Lecture 7 Logical Inference Autumn 2012 CSE
Chapter 3: Introduction to Logic. Logic Main goal: use logic to analyze arguments (claims) to see if they are valid or invalid. This is useful for math.
(CSC 102) Lecture 8 Discrete Structures. Previous Lectures Summary Predicates Set Notation Universal and Existential Statement Translating between formal.
CS6133 Software Specification and Verification
Artificial Intelligence 7. Making Deductive Inferences Course V231 Department of Computing Imperial College, London Jeremy Gow.
Artificial Intelligence Chapter 15 The Predicate Calculus Artificial Intelligence Chapter 15 The Predicate Calculus Biointelligence Lab School of Computer.
The Law of Resolution Formal Aspects of Computer Science - Week 7 The Law of Resolution Lee McCluskey, room 2/07
Propositional Logic Predicate Logic
LDK R Logics for Data and Knowledge Representation First Order Logics (FOL) Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto.
Reasoning with Propositional Logic automated processing of a simple knowledge base CD.
Chapter 7. Propositional and Predicate Logic Fall 2013 Comp3710 Artificial Intelligence Computing Science Thompson Rivers University.
1 Propositional Logic Limits The expressive power of propositional logic is limited. The assumption is that everything can be expressed by simple facts.
First-Order Logic Semantics Reading: Chapter 8, , FOL Syntax and Semantics read: FOL Knowledge Engineering read: FOL.
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
1 Outline Quantifiers and predicates Translation of English sentences Predicate formulas with single variable Predicate formulas involving multiple variables.
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View Basic Concepts and Background.
1 Chapter 2.1 Chapter 2.2 Chapter 2.3 Chapter 2.4 All images are copyrighted to their respective copyright holders and reproduced here for academic purposes.
Proof Methods for Propositional Logic CIS 391 – Intro to Artificial Intelligence.
CT214 – Logical Foundations of Computing Darren Doherty Rm. 311 Dept. of Information Technology NUI Galway
1 Section 7.1 First-Order Predicate Calculus Predicate calculus studies the internal structure of sentences where subjects are applied to predicates existentially.
Propositional Logic. Assignment Write any five rules each from two games which you like by using propositional logic notations.
March 3, 2016Introduction to Artificial Intelligence Lecture 12: Knowledge Representation & Reasoning I 1 Back to “Serious” Topics… Knowledge Representation.
Chapter 1 Logic and proofs
Chapter 7. Propositional and Predicate Logic
Knowledge Representation and Reasoning
CSE 311 Foundations of Computing I
Back to “Serious” Topics…
Chapter 7. Propositional and Predicate Logic
Predicates and Quantifiers
Logics for Data and Knowledge Representation
Introduction to Computational Linguistics
Presentation transcript:

Formal Aspects of Computer Science - Week 5 Logic and Reasoning Lee McCluskey, room 2/07

Logic and Reasoning in AI Recap Fundamental to logic languages is the idea of INTERPRETATIONS - mapping predicates and constants to some conceptualization of the world. A well formed sentence in Logic is called a Wff. Wff2 LOGICALLY FOLLOWS from Wff1 if and only if every interpretation that makes Wff1 true also makes Wff2 true. Wff2 is LOGICALLY EQUIVALENT to Wff1 if and only if every interpretation that makes Wff1 true also makes Wff2 true AND vice- versa.

Logic and Reasoning in AI Meaning of Quantifiers Consider a Universe with individuals a,b,c,… Ax P(x) = P(a) & P(b) & P(c) & …. Ex P(x) = P(a) V P(b) V P(c) V …. Ax Ay R(x,y) = R(a,a) & R(a,b) & R(a,c) &… & R(b,a) & R(b,b) & R(b,c) & … Ax Ey R(y,x) = Ey R(y,a) & Ey R(y,b) & Ey R(y,c) &… =(R(a,a) V R(b,a) V R(c,a) V …) & (R(a,b) V R(b,b) V R(c,b) V …) & (R(a,c) V R(b,c) V R(c,c) V …) & ….

Logic and Reasoning in AI Meaning of Connectives The Connectives &, V, ~, ->,,, , <= ETC) Get their meaning via propositional truth tables – PQP V Q ETC TTT TFT FFF FTT

Logic and Reasoning in AI “Laws” These are some well known equivalent FORMS in FOL called laws ( De Morgans laws etc) ¬ ( P & Q ) = ¬P V ¬Q ¬ ( P V Q ) = ¬P & ¬Q P=>Q = ¬P V Q ¬ ¬ P = P P  Q=(P=>Q)&(Q=>P) etc

Logic and Reasoning in AI Quantifiers + Negation LAWS 1. ¬ Ax P(x) = Ex ¬ P(x) 2. ¬ Ex P(x) = Ax ¬ P(x) Similary (and abstractly) ¬ A E = E A ¬

Logic and Reasoning in AI Interpretations revisited Ax Ey R(y,x) Mother_of persons “Given any person there is Someone who is their mother” Greater_than numbers “Given any number there Is some number greater than it” NB Ax Ey … =/= Ey Ax These 2 Interpretations SATISFY this WFF WFF =

Logic and Reasoning in AI Example “Every student is an academic. Everybody who teaches an academic is an academic. Jeff teaches Fred who is a student.” What can we say about the statement “Jeff is an academic” Translate to FOL: S = student, D = academic, T = teaches Ax S(x)=>D(x) Ax (Ey T(x,y) & D(y)) => D(x) S(Fred) T(Jeff,Fred) Goal: D(Jeff) How can we get agents to automatically deduce such facts??

Logic and Reasoning in AI Another Example Imagine Deep Space 1 travels to Mars and observes many things about the Martians, including the fact that some seem very hostile towards humans. Concrete observations are as follows: (a) All green Martians have antennae. (b) A Martian is friendly to humans if all of its children have antennae. (c) A Martian is green if at least one of its parents is green. On its way back from Mars the robot is hotly pursued by a spacecraft containing green Martians only. Should the robot suspect it is being attacked? Or can the robot reason with its observations to answer the question: `Are all green Martians friendly?'' and hence avert an inter-planetary conflict.

Logic and Reasoning in AI Deduction We deduce using sound inference rules A Rule (Law) of Inference is a method for producing a new wff from parents is SOUND if it only ever produces wffs that also logically follow from the parents.

Logic and Reasoning in AI Natural Deduction The most famous Laws of Inference is known by its Latin name “Modus Ponens” From wffs OF THE FORM… P(a) Ax P(x)=>Q(x) We can deduce the following Wff Q(a) Example: Socrates is a Man, All Men are Mortal Deduce: Socrates is Mortal

Logic and Reasoning in AI Natural Deduction Another is called “Modus Tollens” From wffs OF THE FORM… ¬Q(a) Ax P(x)=>Q(x) We can deduce the following Wff ¬P(a) Example: If a thing is smoking then it is on fire. I am not on fire. Deduce: I am not smoking

Logic and Reasoning in AI Unsound Deduction Example: If a person is the murderer then that person must have bloody hands. The Butler has bloody hands. Deduce: The Butler is the murderer This is UNSOUND!!! BH(butler) Ax M(x)=>BH(x) We can’t deduce anything from this!!

Logic and Reasoning in AI One “Inference Rule” to Rule them all... A COMPLETE proof procedure is one that, given a wff w does follow from wff W, it will always generate a proof. There is a single inference rule which can be used to create a complete proof procedure. “You will need no other..! It is called.... “The Law of Resolution” (wow)

Logic and Reasoning in AI Automated Deduction Automating deduction using RESOLUTION requires Wffs to be translated to a “clausal form”. Prolog statements are in a type of clausal form. The most common clausal form is when a Wff is expressed as a set of clauses, where each clause in the set is a disjunction of literals, and where any variables are universally quantified. EG {BH(butler), ~M(x) V BH(x) }

Logic and Reasoning in AI Summary FOL is equipped with a form of reasoning called deduction that can be automated Next lecture I will cover resolution refutation, a very efficient way to automate deduction.