first order logic in knowledge representation

Post on 14-Jan-2017

196 Views

Category:

Technology

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

FIRST ORDER LOGIC IN KNOWLEDGE

REPRESENTATION Ishara AthukoralaEP 1310

05/01/23

1

Why First Order Logic

Propositional logic has limited expressive power.

• Propositional logic assumes that the world contains facts. • First-order logic assumes the world contains,

• Objects: people, houses, numbers, colors, baseball games, wars, …

• Relations: red, round, prime, brother of, bigger than, part of, comes between, …

• Functions: father of, best friend, one more than, …05/01/23

2

Syntax of First Order Logic

• Constants: john,apples• Predicates: likes(john, apples)• Functions: likes(john, fruit_of(apple_tree))• Variables: likes(X, apples) • Connectives:, , , , • Equality:=• Quantifiers: True for all objects (Universal)

Exists at least one object (Existential)05/01/23

3

Relations

• Some relations are properties: they state some fact about a single object: Round(ball), Prime(7).

• n-ary relations state facts about two or more objects: Married(John,Mary), LargerThan(3,2).

• Some relations are functions: their value is another object: Plus(2,3), Father(Dan).

05/01/23

4

Models for FOL: Graphical Example

05/01/23

5

Terms

• A logical expression that refers to an object.• Two types of terms,

1. Constant symbols2. Function symbols

05/01/23

6

Atomic Sentences

• Atomic sentences state facts using terms and predicate symbols

P(x,y) interpreted as “x is P of y”.Examples:• Brother_of(Mary,Pete) is false• Brother_of(Pete,Brother(Pete)) is True.

Binary relation Function

05/01/23

7

Complex Sentences

• Complex sentences with connectives ( ( ), ) ( ( ))Brother Lef tLeg Richard J ohn Democrat Bush

objects

connectives

Binary relation

function

properties

05/01/23

8

Universal Quantification

05/01/23

9

Existential Quantification

05/01/23

10

Some Examples…

• All purple mushrooms are poisonous.x (mushroom(x) purple(x)) poisonous(x)

• Every gardener likes the sun.x gardener(x) likes(x,Sun)

• Clinton is not tall.tall(Clinton)

05/01/23

11

Some Examples…

• “On Mondays and Wednesdays I go to John’s house for dinner”

X.((is_mon(X) V is_wed(X)) -> eat_meal(me,houseOf(John),X))

• “Every rose has a thorn” X(rose(X) -> EY.(has(X,Y) thorn(Y)))

05/01/23

12

References

• Benson Mates, Elementary Logic, OUP, New York 1972 (Library of Congress Catalog Card no.74-166004)• Elliot Mendelson, Introduction to Mathematical Logic, Van

Nostran Reinholds Company, New York 1964

05/01/23

13

THANK YOU

05/01/23

14

top related