CSC411Artificial intelligence 1 Chapter 2 The Predicate Calculus Contents The Propositional Calculus The Predicate Calculus Using Inference Rules to Produce.

Slides:



Advertisements
Similar presentations
The Predicate Calculus
Advertisements

Biointelligence Lab School of Computer Sci. & Eng.
1 A formula in predicate logic An atom is a formula. If F is a formula then (~F) is a formula. If F and G are Formulae then (F /\ G), (F \/ G), (F → G),
Standard Logical Equivalences
First Order Logic Resolution
Inference and Reasoning. Basic Idea Given a set of statements, does a new statement logically follow from this. For example If an animal has wings and.
For Friday No reading Homework: –Chapter 9, exercise 4 (This is VERY short – do it while you’re running your tests) Make sure you keep variables and constants.
13 Automated Reasoning 13.0 Introduction to Weak Methods in Theorem Proving 13.1 The General Problem Solver and Difference Tables 13.2 Resolution.
Chapter 1: The Foundations: Logic and Proofs 1.1 Propositional Logic 1.2 Propositional Equivalences 1.3 Predicates and Quantifiers 1.4 Nested Quantifiers.
F22H1 Logic and Proof Week 7 Clausal Form and Resolution.
Predicate Calculus Russell and Norvig: Chapter 8,9.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
CS128 – Discrete Mathematics for Computer Science
1 FOL CS 331/531 Dr M M Awais Unification “It is an algorithm for determining the substitutions needed to make two predicate calculus expressions match”
The Predicate Calculus
Artificial Intelligence
NEWELL & SIMON All sciences characterize the essential nature of the systems they study. These characteristics are invariably qualitative in nature, for.
1 Automated Reasoning Introduction to Weak Methods in Theorem Proving 13.1The General Problem Solver and Difference Tables 13.2Resolution Theorem.
Inference and Resolution for Problem Solving
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.
The Predicate Calculus
The Predicate Calculus
Artificial Intelligence
CSE (c) S. Tanimoto, 2007 Unification 1 Unification Predicate calculus rules are sometimes so general that we need to create specializations of.
Introduction to Logic for Artificial Intelligence Lecture 2 Erik Sandewall 2010.
1 CS 385 Fall 2006 Part 2 Artificial Intelligence as Representation and Search.
The Predicate Calculus
Propositional Calculus Composed of symbols –P – some true statement P might represent something like “It is Monday” or “the car is red” And sentences –a.
1 Chapter 8 Inference and Resolution for Problem Solving.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
CS 415 – A.I. Slide Set 4. Yamauchi Paper Exploration via data about frontier space – How to detect frontier space – How to use it to choose navigation.
ARTIFICIAL INTELLIGENCE Lecture 3 Predicate Calculus.
1.  Provides the ability to access individual assertions. e.g. in Predicate calculus we may say: P denotes “It rained on Tuesday” but in predicate calculus.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
CSE S. Tanimoto Horn Clauses and Unification 1 Horn Clauses and Unification Propositional Logic Clauses Resolution Predicate Logic Horn Clauses.
Inference in FOL Compared to predicate logic, more abstract reasoning and specific conclusions.
Propositional Calculus – Methods of Proof Predicate Calculus Math Foundations of Computer Science.
CS Introduction to AI Tutorial 8 Resolution Tutorial 8 Resolution.
Unification We can represent any substitution by a set of ordered pairs: s = { t 1 /v 1, t 2 /v 2, …, t n /v n } where: t i /v i means that the term i.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
Automated Reasoning Early AI explored how to automated several reasoning tasks – these were solved by what we might call weak problem solving methods as.
1 Introduction to Abstract Mathematics Chapter 2: The Logic of Quantified Statements. Predicate Calculus Instructor: Hayk Melikya 2.3.
Reasoning using First-Order Logic
Propositional Logic Predicate Logic
第 1 6 章 谓词演算中的归结. 2 Outline Unification Predicate-Calculus Resolution Completeness and Soundness Converting Arbitrary wffs to Clause Form Using Resolution.
CSE (c) S. Tanimoto, 2008 Predicate Calculus II 1 Predicate Calculus 2 Outline: Unification: definitions, algorithm Formal interpretations and satisfiability.
ECE457 Applied Artificial Intelligence R. Khoury (2007)Page 1 Implication Truth Table If α is true, then β must be true for the implication to be true.
Artificial Intelligence Lecture 4 Faculty of Computer Science International Islamic University Islamabad. Pakistan.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
1 Section 7.1 First-Order Predicate Calculus Predicate calculus studies the internal structure of sentences where subjects are applied to predicates existentially.
1 Introduction to Artificial Intelligence LECTURE 9: Resolution in FOL Theorem Proving in First Order Logic Unification Resolution.
Chapter 3 Propositional calculus Predicate calculus Artificial Intelligence Dr.Hassan Al-Tarawneh.
Propositional Calculus
Introduction to Logic for Artificial Intelligence Lecture 2
CSE 341, S. Tanimoto Logic Programming -
The Hebrew University of Jerusalem
The function of knowledge representation scheme is
Proposition & Predicates
Horn Clauses and Unification
Horn Clauses and Unification
Horn Clauses and Unification
CSE (c) S. Tanimoto, 2004 Unification
CSE S. Tanimoto Unification
Horn Clauses and Unification
CSE (c) S. Tanimoto, 2002 Unification
Horn Clauses and Unification
Predicates and Quantifiers
Propositional Calculus
RESOLUTION.
An Application in Prolog
Presentation transcript:

CSC411Artificial intelligence 1 Chapter 2 The Predicate Calculus Contents The Propositional Calculus The Predicate Calculus Using Inference Rules to Produce Predicate Calculus Application: A Logic-Based Financial Advisor 1

CSC411Artificial intelligence 2 2

CSC411Artificial intelligence 3 3

CSC411Artificial intelligence 4 4

CSC411Artificial intelligence 5 For propositional expressions P, Q and R: 5 Proposition Equivalence

CSC411Artificial intelligence 6 Truth table for the operator . 6 Truth Table Truth table demonstrating the equivalence of P Æ Q and ÿ P ⁄ Q.

CSC411Artificial intelligence 7 7

CSC411Artificial intelligence 8 8

CSC411Artificial intelligence 9 9

CSC411Artificial intelligence 10

CSC411Artificial intelligence 11 verify_sentence algorithm 11

CSC411Artificial intelligence 12

CSC411Artificial intelligence 13

CSC411Artificial intelligence 14 Equivalence For predicates p and q, and variables X and Y –Xp(X)  Xp(X) –Xp(X)  Xp(X) –Xp(X)  Yp(Y) –Xp(X)  Yp(Y) –X(p(X)q(X))  Xp(X)Yq(Y)) –X(p(X)q(X))  Xp(X)Yq(Y) )

CSC411Artificial intelligence 15 Higher-order predicate calculi –Allows quantified predicates –E.g. (Likes) Likes(george, kate)

CSC411Artificial intelligence 16 A blocks world with its predicate calculate description. A rule for clear block:  X(  Y on(Y,X)  clear(X))

CSC411Artificial intelligence 17 Inference Logical inference – infer new correct expressions from a set of true assertions New expressions must be consistent with all previous expressions

CSC411Artificial intelligence 18

CSC411Artificial intelligence 19

CSC411Artificial intelligence 20

CSC411Artificial intelligence 21

CSC411Artificial intelligence 22 Unification Unification -- An algorithm (procedure) for determining the substitutions needed to make two predicate calculus expressions match Unifier -- a set of variable substitutions that make two expressions identical E.g, for expression foo(X, a, goo(Y)) ExpressionsSubstitutions  foo(fred, a goo(Z)){fred/X, Z/Y}  foo(W, a, goo(jack)){W/X, jack/Y}  foo(Z, a, goo(moo(Z))){Z/X, moo(Z)/Y}

CSC411Artificial intelligence 23 Unification Issues  can be simply removed  may be eliminated by replacing the variable with the constant. E.g. parent(X, tom)  parent(mary, tom) Skolem function may be used to replace a variable that depends on other variables e.g. XYparent(X,Y)  parent(X,f(X)) A variable may be replaced by any terms, but not the terms that contain it A constant cannot be replaced by any terms If a variable is bound to a constant, it my not be re-bound

CSC411Artificial intelligence 24 Composition of Unification Substitutions If S and S’ are two substitution sets, the the composition of S and S’, SS’, is obtained by applying S’ to the elements of S and adding the result to S E.g. Consider three sets of substitutions: {X/Y, W/Z}, {V/X},{a/V, f(b)/W} Compositing the third set with the second set: {a/X, a/V, f(b)/W} Composing this result with the first set: {a/Y, a/X, a/V, f(b)/Z, f(b)/W} Composition is associative but not commutative

CSC411Artificial intelligence 25 Most General Unifier (mgu) The mgu for a set of expressions is unique except for alphabetic variations E.g. Unifying p(X) and p(Y), –{fred/X, fred/Y} is an unifier, but not mgu –Both {Z/X, Z/Y} and {W/X, W/Y} are mgus.

CSC411Artificial intelligence 26 Unification Algorithm

CSC411Artificial intelligence 27 Unifying parents(X, father(X), mother(bill)) and parents(bill, father(bill), Y). Convert to List format first

CSC411Artificial intelligence 28 Final trace of the unification of (parents X (father X) (mother bill)) and (parents bill (father bill) Y).

CSC411Artificial intelligence 29 A Logic-Based Financial Advisor The advisor helps a user to decide whether to invest in a savings account, or the stock market What to invest depends on their income and the current amount they have saved Criteria: –Individuals with an inadequate savings account should always make increasing the amount saved their first priority, regardless of their income –Individuals with adequate savings account and an adequate income should consider a riskier but potentially more profitable investment in the stock market –Individuals with a lower income who already have an adequate savings account may want to consider splitting their surplus income between savings and stocks, to increase the cushion in savings while attempting to increase their income through stocks

CSC411Artificial intelligence Logic System

CSC411Artificial intelligence 31 Advisor System Inference minsavings(X)  500*X minincome(X)  (4000*X) Consider an user with three dependents, $ in savings, and steady income of $25000 –Add facts: 9.amount_saved(22000). 10.earnings(25000, steady). 11.dependents(3). –Conjunct 10 and 11, unify with 7 under the substitution {25000/X, 3/Y}, and use modus ponens 12.income(inadequate). –Conjunct 9 and 11, unify with 4 under the substitution {22000/X, 3/Y}, and use modus ponens 13.savings_account(adquate) –Conjuct 12 and 13, use modus ponens with 3 14.investment(combination)