Session 20 - Wednesday, October 3rd
Consider
- hoosier(Schafer)
-
"x
hoosier(x) -> likes (x,Basketball)
-
"x,y
childOf(x,y) AND likes (y, Basketball) -> likes (x,Basketball)
-
"y
likes(y,Basketball) -> likes(y,March)
-
daughterOf(Margaret,Schafer)
-
"x,y
daughterOf( x, y )-> childOf( x, y )
hoosier(Wallingford)
hoosier(Letterman)
daughterOf(Sarah,Wallingford)
Universal Instantiation (UI) states that we can infer any sentence obtained
by substituting a ground term for the variable
- (S1) SUBST({x/Schafer),2) yields
hoosier(Schafer) -> likes(Schafer,Basketball)
- (S2) SUBST({y/Schafer, x/Margaret),3) yields
childOf(Margaret,Schafer) AND likes(Schafer,Basketball -> likes (Margaret,Basketball)
- (S3) SUBST({y/Schafer},4) yields
likes(Schafer,Basketball -> likes (Schafer,March)
- (S4) SUBST({y/Schafer, x/Margaret),5) yields
daughterOf(Margaret,Schafer) -> childOf(Margaret,Schafer)
-
likes( Schafer, Basketball ) [mp
1,S1]
-
childOf( Margaret, Schafer ) [mp
5,S4]
-
likes( Margaret, Basketball )
[mp 8,7,S2]
-
likes( Margaret, March ) [mp
9,S4]
What is the problem with UI? Well, if there are too many
ground terms, you end up with too much information...
- SUBST({x/Wallingford),2) yields hoosier(Wallingford) ->
likes(Wallingford,Basketball)
- SUBST({x/Margaret),2) yields
hoosier(Margaret) -> likes(Margaret,Basketball)
- SUBST({x/March),2) yields
hoosier(March) -> likes(March,Basketball)
- SUBST({x/Basketball),2) yields
hoosier(Basketball) -> likes(Fienup,Basketball)
-
- SUBST({y/Wallingford, x/Margaret),3) yields
childOf(Margaret,Wallingford) AND likes(Wallingford,Basketball -> likes (Margaret,Basketball)
- SUBST({y/Wallingford, x/Walingford),3) yields childOf(Wallingford,Wallingford) AND likes(Wallingford,Basketball -> likes (Wallingford,Basketball)
The fact is, with the 7 ground terms we have above (Schafer, Margaret, Wallingford,
Sarah, Letterman, March, Basketball), 2
unary universal rules, and 2 binary universal rules, we end up with
2x7 + 2x72 = 112 derived rules
An Exercise in Using Logic to Reason
Using Forward Chaining
The forward chaining of this is fairly straightforward and is
not reproduced here.
An Exercise in Using Logic to Reason
Using Backward Chaining
Conclude
likes(Margaret,March)
In 4, bind "y=Margaret"
This is valid if we can prove that likes(Margaret,Basketball) is true.
We could arrive at this by either showing
- hoosier(Margaret) (rule #2) or
- finding some z where childOf(Margaret,z) AND likes (z, Basketball) (rule
#3, remember, variable names are arbitrary.
We are unable to use any rule/fact to show the first part.
We can arrive at childOf(Margaret,z) if we can show
DaugherOf(Margaret,z) (rule #7).
We can arrive at likes(z,Basketball) if we can show hoosier(z) (rule #2)
Rule #1 allows us to bind (z=Schafer).
Rule #5 allows us to bind (z=Schafer).
Thus, we can conclude likes(Schafer,Basketball) and childOf(Margaret,Schafer).
Thus, we can conclude likes(Margaret,Basketball).
Thus, we can conclude likes(Margaret,March).
