Top Banner
Propositional Calculus Knowledge based agent Knowledge is contained in agents in the form of sentences in a knowledge representation language stored in a Knowledge base Very simple language consisting of propositional symbols and logical connectives, but still illustrates all the basic concepts of logic Just facts (true/false/unknown) Reasonably effective, but Limited expressive power to deal concisely with time, space and universal patterns of relationships among objects In order to more fully represent we need First order logic for more expressive power.
25

Propositional Calculus

Mar 19, 2016

Download

Documents

bary

Propositional Calculus. Knowledge based agent Knowledge is contained in agents in the form of sentences in a knowledge representation language stored in a Knowledge base - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Propositional Calculus

Propositional Calculus• Knowledge based agent

• Knowledge is contained in agents in the form of sentences in a knowledge representation language stored in a Knowledge base

• Very simple language consisting of propositional symbols and logical connectives, but still illustrates all the basic concepts of logic

• Just facts (true/false/unknown)

• Reasonably effective, but Limited expressive power to deal concisely with time, space and universal patterns of relationships among objects

• In order to more fully represent we need First order logic for more expressive power.

Page 2: Propositional Calculus

COMP-4640: Intelligent & Interactive SystemsThe Predicate Calculus

First Order Logic

• FOL or FOPC (true/false/unknown)• More than just facts, objects & relations• We notice that the world is blessed with

many objects, some of which are related to other objects, and we endeavor to reason about them

Page 3: Propositional Calculus

COMP-4640: Intelligent & Interactive SystemsThe Predicate Calculus

Page 4: Propositional Calculus

COMP-4640: Intelligent & Interactive SystemsThe Predicate Calculus

Page 5: Propositional Calculus

COMP-4640: Intelligent & Interactive SystemsThe Predicate Calculus

Language and Syntax

The predicate calculus is composed of the following components:

-Object Constants ( A, 112, SmallBlock, etc.)

-Function Constants (queen_of1, height_of1, mltpy2, etc.)

-Relation Constants (K253, Married_to2, etc.)

-Logical Connectives and Delimiters (, , , , , , , )

Page 6: Propositional Calculus

COMP-4640: Intelligent & Interactive SystemsThe Predicate Calculus

Terms

Any object constant or function constant (with N terms in parentheses where N is the arity of the function) is a term. Ex: queen_of(England), mltpy(5,4).

All Predicates have an “arity”, i.e., a fixed number of arguments.

Page 7: Propositional Calculus

COMP-4640: Intelligent & Interactive SystemsThe Predicate Calculus

Sentences (well formed formulas)

Atoms are relational constants (with the appropriate number of arguments in parentheses) Ex. Married(Gerry,Jacqui). plus(two, three). likes(George, Kate). likes(George, X). likes(George, Suzie). helps(richard, bill). friends(bill, george). brothers(bill, john).

-If w1 and w2 are sentences then so are:w1 w2 (disjunction) w1 w2 (conjunction) w1 w2 (implication)

w1 (negation)Logical combinations

Ex. Married(Gerry,Jacqui) Loves(Gerry,Jacqui)Brothers(bill, john)

brothers(x,y) = brothers(y,x) ¬brothers(Pat, Sue)

Page 8: Propositional Calculus

COMP-4640: Intelligent & Interactive SystemsThe Predicate Calculus

Semantics

•A world can be composed of an infinite number of objects (individuals)

•An interpretation of an expression is a mapping between object, function, and relation constants in predicate calculus to objects, functions, and relations in the real world.

•A particular mapping or assignment of an interpretation is called a denotation.

Page 9: Propositional Calculus

COMP-4640: Intelligent & Interactive SystemsThe Predicate Calculus

Models

An interpretation satisfies a set of sentences if each of the sentences evaluates to true given the interpretation. A model is an interpretation that satisfies a set of sentences.

Valid sentences are true under all interpretations.Any sentence that does not have a model is said to be inconsistent or unstatisfiable.

If a sentence, s, is true under all interpretations for which each sentence in is true then s (logical entailment).⊨

Page 10: Propositional Calculus

COMP-4640: Intelligent & Interactive SystemsThe Predicate Calculus

Knowledge

Sentences written in FOPL can be used to represent knowledge (in the form of facts and rules) about the world.

•“Socrates is a man”

•“Richard is the brother of John”

•“Dave is married to Julie

•Richards father is married to John’s mother

Page 11: Propositional Calculus

COMP-4640: Intelligent & Interactive SystemsThe Predicate Calculus

Knowledge

Sentences written in FOPL can be used to represent knowledge (in the form of facts and rules) about the world.

•“Socrates is a man”man(socrates).

•“Richard is the brother of John” brother(richard, john)

•“Dave is married to Julie Married (dave, julie)

•Richards father is married to John’s mother Married (father(richard), mother(john)

Page 12: Propositional Calculus

COMP-4640: Intelligent & Interactive SystemsThe Predicate Calculus

QuantificationIt is only natural to want to express properties of entire collections of objects, instead of enumerating the objects by name. We need them to help with

interpretation.

There are two types of quantification in FOPL:1. Universal (“For all x”)

x (Kid(x) likes(x,Candy))

2. Existential (“There exists an x”)x (Kid(x) likes(x,Broccoli))

Page 13: Propositional Calculus
Page 14: Propositional Calculus
Page 15: Propositional Calculus
Page 16: Propositional Calculus
Page 17: Propositional Calculus

COMP-4640: Intelligent & Interactive SystemsThe Predicate Calculus

Quantification (cont.)

Some useful equivalences (based on DeMorgan’s Law) are:

1. z (w(z)) z (w(z))

2. y (q(y)) y (q(y))

Page 18: Propositional Calculus
Page 19: Propositional Calculus

COMP-4640: Intelligent & Interactive SystemsThe Predicate Calculus

Some Practice Problems:

1. “Everybody loves someone.”

2. “There is someone who is loved by everybody.”

3. “There is someone who loves everybody.”

4. “Everybody has someone who loves them.”

Page 20: Propositional Calculus

COMP-4640: Intelligent & Interactive SystemsThe Predicate Calculus

Some Practice Problems:1. “Everybody loves someone.”

means that for every person, there is someone that person lovesx y Loves (x,y)

2. “There is someone who is loved by everybody.” means there is some person, who is loved by everyonex y Loved_by(x,y)

3. “There is someone who loves everybody.”means there is some person x, who loves everyone x y Loves(x,y)

4. “Everybody has someone who loves them.”means that everyone loves someone,

x y Loves (x,y) don’t forget the part about who loves them

who (y) loves (x) We must also include that somebody y loves them x

x y Loves (x, (loves(y,x))

Page 21: Propositional Calculus

COMP-4640: Intelligent & Interactive SystemsThe Predicate Calculus

Some Practice Problems (cont.)

5. “Not all students take both History and Biology.”

6. “Every person who dislikes all vegetarians is smart.”

Page 22: Propositional Calculus

COMP-4640: Intelligent & Interactive SystemsThe Predicate Calculus

Some Practice Problems (cont’d):

5. “Not all students take both History and Biology.” z (take (z, (History Λ Biology))) z take (z, (History Λ Biology))

z (take (z, History) Λ take (z, Biology)) z ((take(z,History) Λ take(z,Biology))) z ( take(z,History V take(z,Biology))

6. “Every person who dislikes all vegetarians is smart.” x y (likes(x,y) => Smart(x)) x y (dislikes(x,y) => Smart(x))

Page 23: Propositional Calculus

COMP-4640: Intelligent & Interactive SystemsThe Predicate Calculus

Before we can apply resolution refutation to the predicate calculus we must first:

1. introduce the concept of unification and2. provide a procedure for converting arbitrary sentences in FOPL into CNF.

Unification

The objective of unification is to find a substitution that will allow two sentences to look the same. Once we make two sentences look the same, it is possible to apply resolution. Consider this example found on page 271 of your textbook.Knows(John, Jane)Knows(y, Leonid)Knows(y, mother(y))Knows(x, Elizabeth)

Now we can unify Knows(John,w) with 1 using the substitution {w/Jane}We can unify Knows(John,w) with 2, 3, and 4.

Page 24: Propositional Calculus
Page 25: Propositional Calculus