Artificial Intelligence Knowledge Representation Lecture 05
Artificial Intelligence Knowledge Representation Lecture 05
Knowledge Representation
& Reasoning(Continue…)
T T T T T T
T F F T F F
F T F T T F
F F F F T T
Limitations of
Propositional Logic
• Can only represent knowledge as complete
sentences, e.g. a = the ball’s color is blue.
• Cannot analyze the internal structure of the
sentence.
• No quantifiers e.g. For all, There exists
• Propositional logic provides no framework for
proving statements such as:
All humans are mortal
All women are humans
Therefore, all women are mortals
• This is a limitation in its representational power.
Predicate Calculus
• Extension of Propositional logic
• Allows structure of facts/sentences to be defined
With predicate logic, we can say
color( ball, blue)
• Has greater representation power as we will see shortly
• This allows the relationship of sub-sentence units to be
expressed, e.g. the relationship between color, ball and
blue in the above example.
• Due to its greater representational power, predicate
calculus provides a mechanism for proving statements
and can be used as a logic system for proving logical
theorems.
Quantifiers:
• Predicate calculus allows us to use quantifiers
for statements.
• Quantifiers allow us to say things about some or
all objects within some set.
• The logical quantifiers used in basic predicate
calculus are universal and existential quantifiers.
The Universal Quantifier
• Symbol
• It is read as “for every” or “for all”
• Used in formulae to assign the same truth value to all variables in the
domain
• e.g. Domain: numbers
– (x) ( x + x = 2x)
– In words: for every x (where x is a number), x + x = 2x is true
• e.g. Shapes
– (x) ( x = square x = polygon)
– In words: every square is a polygon.
– For every x (where x is a shape), if x is a square, then x is a polygon (it
implies that x is a polygon).
Existential Quantifier
• Symbol:
• Used in formulae to say that something is
true for at least one value in the domain
• “there exists”, “ for some” “for at least one”
“there is one”
• e.g.
– ( x) ( person (x) father (x,ahmed) )
– In words: there exists some person, x who
is Ahmed’s father.
First Order Predicate
Logic
• First Order Predicate logic is the simplest form.
• Uses symbols. These may be
– Constants: Used to name specific objects or properties.
e.g. Ali, Ayesha, blue, ball.
– Predicates: A fact or proposition is divided into two parts
• Predicate: the assertion of the proposition
• Argument: the object of the proposition
• e.g. Ali likes bananas becomes Likes (ali, bananas)
– Variables: Used to represent general class of
objects/properties. e.g. likes (X, Y). X and Y are variables
that assume the values X=Ali and Y=bananas
– Formulae: Use predicates and quantifiers
Predicate Logic Example
man(ahmed)
father(ahmed, belal)
brother(ahmed, chand) Predicates
owns(belal, car)
tall(belal)
hates(ahmed, chand)
family()
Y (sister(Y,ahmed))
Formulae
X,Y,Z(man(X) man(Y) man(Z) father(Z,Y)
father(Z,X) brother(X,Y))
X, Y and Z Variables