

























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


























-^
-^
-^
-^
-^
-^
-^
Universal Elimination (UE):Universal Elimination (UE):
[τ
must be a ground term (i.e., no variables).] Example
Imagine Universe of Discourse is
{Rodrigo, Sharon, David, Jonathan}
x At (x, UIUC)
OK(x)
At(Rodrigo, UIUC)
OK(Rodrigo)
substitution list^ substitution list
∃ν α Subst({
ν/k},
α
where
k
is a
new (Skolem) constant.
Example
From
∃x Teaches(x, CS348)
we can infer that
Teaches(PorkyPig, CS348)
if the symbol
PorkyPig
has
not
appeared before.
Operators are inference rules.
-^
States are sets of sentences.
-^
Goal test checks state to see if itcontains query sentence..
-^
Problem: branching factor huge, esp. for UE.
-^
AI, UE, MP is a common inference pattern.
-^
Idea:
find a substitution that makes the rule premise match
some known facts.
A single, more powerful inference rule.
A substitution
σ
unifies
atomic sentences p and q if
Subst
(σ
, p)=
Subst
(σ
, q)
(also denoted
p
σ
=q
σ
Knows(John,x)
Knows(John, Jane)
Knows(John,x)
Knows(y, Amy)
Knows(John,x)
Knows(y, Mother(y))
{ x/Jane }{ y/John, x/Amy }{ y/John, x/Mother(John) }
Idea:
Unify rule premises with known facts, apply unifier to conclusion. E.g., if we know both
q
and
Knows(John,x)
⇒
Likes(John,x)
then we conclude:
Likes(John,Jane)Likes(John,Amy)Likes(John,Mother(John))
A substitution
σ
is more general than
τ
iff there is a substitution
δ^
such that
σδ
τ.
σ
= { z/ F(w) } is more general than
τ
= { z/F(C) } since
δ^
= { w/C }
A most general unifier
ρ
of
φ
and
ψ
is such that, for any unifier
κ^
of
φ
and
ψ
, there exists a substitution
φκ
ψκ
φρ
)κ
Informally, the most general unifier (MGU) imposes the fewestconstraints on the terms (contains the most variables).
-^
MGU’s are unique up to variable reordering and changes ofnaming of variables in terms.
-^
The unification procedure on p. 278 gives the MGU.
p
’, p 1
’,…, p 2
’, (pn
p
pn
q)
where
p
’σσσσi
= p
σσσσi
q
σ
for all
i
For example, let
p
’ = Faster (Bob, Pat) 1 p
’ = Faster (Pat, Steve) 2 Faster (x, y)
Faster (y, z)
Faster (x, z)
Unify
p
and
p
with the premise
σ
= { x/Bob, y/Pat, z/Steve }
Apply substitution to the conclusion
q
σ
= Faster(Bob, Steve)
p
andi
q
atomic sentences
Universally quantified variables
-^
White: Facts added in turn
-^
Yellow:
The result of implication of rules.
∧
Pig(y)
⇒
Faster(x, y)
∧
Slug(z)
⇒
Faster(y, z)
∧
Faster(y, z)
⇒
Faster(x, z)
[ Unifies with 1-a ]
[ Unifies with 1-b, GMP Fires ][ Unifies with 2-a ]
[ Unifies with 3-a, 3-b ]
[ Unifies with 2-b, GMP Fires ]
[ Unifies with 3-b and with 6,GMP Fires ]
Slug(z)
Faster (y, z)
Creeps(a)
Slug(a)
An inference procedure is sound if the conclusion is true in allcases where the premises are true.
-^
Easy to show the
Generalized ModusGeneralized Modus
PonensPonens
(GMP) is sound.(GMP) is sound.
Completeness:
If KB entails
α
, can GMP be used to infer
α
PhD(x)
HighlyQualified(x)
PhD(x)
EarlyEarnings(x)
HighlyQualified(x)
Rich(x)
EarlyEarnings(x)
Rich(x)
Should be able to infer
Rich(Me)
[or
Rich(Kiki)
for that matter],
but can’t since
PhD(x)
EarlyEarnings(x)
is not a Horn
sentence.
Therefore,
GMP is NOT complete!GMP is NOT complete!
Idea:
If
β
is true or
α
is true
and
β
is false or
γ
is true
then
α
or
γ
must be true
Basic resolution rule from propositional logic:
α ∨ β,
¬β ∨ γ
α ∨ γ
Can be expressed in terms of implications
¬α ⇒ β
β ⇒ γ
¬α ⇒ γ
Note that Resolution rule is a generalization of Modus Ponens
β,
β ⇒ γ
is equivalent to
⇒ β
,^ β ⇒ γ
γ^
⇒ γ
Generalized resolution rule for first order logic (with variables)If
p
can be unified withj
¬
qk
, then we can apply the resolution rule: p^1
∨ …
∨
p
∨j …
∨
p
m
q^1
∨ …
∨
q
∨k …
∨
q
n
Subst(
θ, (p
∨ 1 …
∨
p
j-
∨ p
j+
∨ …
∨
p
m^
∨q
∨ 1 …
∨
q
k-
∨ q
k+
∨ …
∨
q
))n
where
θ
= Unify (
pj
,^ ¬
qk
)
Example:^ KB:
¬
Rich(x)
∨
Unhappy(x)
Rich(Me)
Substitution:
θ^
= {
x/Me
}
Conclusion:
Unhappy(Me)