Professional Documents
Culture Documents
On = {<B,A>,<A,floor>,<C,Floor>}
Clear = {<C>,<B>}
Quantification
Universal and existential quantifiers allow expressing general
rules with variables
Universal quantification
All cats are mammals
x Cat ( x) Mammal ( x)
It is equivalent to the conjunction of all the sentences obtained by
substitution the name of an object for the variable x.
Syntax: if w is a wff then (forall x) w is a wff.
Cat ( Spot ) Mammal( Spot )
Cat ( Rebbeka) Mammal( Rebbeka)
Cat ( Felix ) Mammal( Felix )
,,,,
Quantification: Existential
Existential quantification : an existentially quantified sentence
is true in case one of the disjunct is true
xSister ( x, spot ) Cat ( x )
Equivalent to disjunction:
Sister(Spo t , Spot) Cat(Spot)
Sister(Reb ecca,Spot) Cat(Rebecca)
Sister(Fel ix,Spot) Cat(Felix)
Sister(Ric hard,Spot) Cat(Richar d)...
We can mix existential and universal quantification.
Useful Equivalences
De Morgan laws
Inference rules:
Universal instantiation: foall x f(x) |-- f(alpha)
Existential generalization: from f(alpha) |-- exist x f(x)
Modeling a domain; Conceptualization
The kinship domain:
object are people
Properties include gender and they are related by relations such as
parenthood, brotherhood,marriage
predicates: Male, Female (unary) Parent,Sibling,Daughter,Son...
Function:Mother Father
Resolution in the predicate calculus
Unification
Algorithm unify
Using unification in predicate calculus resolution
Completeness and soundness
Converting a wff to clause form
The mechanics of resolution
Answer extraction
Inference Rules in FOL
All the inference rules for propositional logic applies and additional
three rules that use substitution; assigning constants to variables
Subst(x/constant)
Subst({x/Sam,y/Pam},Likes(x,y)) = Likes(Sam,Pam)
Universal elimination
From fromall x Likes(x,IceCream) we can substitute {x/Ben} and infer
Likes(Ben,IceCream)
Existential Elimination
For any sentence and for any symbol k that does not appear elsewhere in
the knowledge-base
exists x Kill(x,Victim) we can infer Kill(Murderer,victim)
As long as Murdered soes not appear anywhere
Existential introduction
From Likes(Jerry,IceCream) we can infer exists x Likes(x,IceCream)
Predicate calculus resolution
Suppose the 1 and 2 are two clauses represented as set of
literals. If there is an atom in 1 and a literal ~ in 2 such
as and have a common unifier
Then these two clauses have a resolvent row. It is obtained by
applying the substitution to 1 2 leaving out
complementary literals
Wehair
has can represent forward chaining with rules as a network:
is a mammal
eats meat
is a carnivore
black stripes
has a tail
Inference using Backward Chaining
Establish a hypothesis
e.g., Tony is a tiger
a hypothesis is as assertion whose truth we wish to test
i.e., assert the hypothesis
see if that is consistent with other data
has hair
is a mammal
eats meat
black stripes
Backward Chaining Procedure
While (unsupported hypotheses exist or goal is not reached)
for each hypothesis H
for each rule R whose conclusion matches with H
try to support each rule’s premises by
1. matching assertions in WM
2. recursively applying backward chaining
if rule’s premises are supported
conclude that H is true
end
end
continue
Forward Chaining or Backward
Chaining:
which is better?
Which direction is better depends on the circumstances
DATA
ORGANISM-1:
GRAM = (GRAMNEG 1.0)
MORP = (ROD .8) (COCCUS .2)
AIR = (AEROBIC .6)(FACUL .4)
The XCON Application
Inference occurs by
forward or backward chaining