Session 11

Inference in Predicate Logic


Artificial Intelligence

today's slides in PDF

A Refresher Exercise, Part 1

Write predicate logic sentences for each of these facts:

Let's build a possible solution. What objects do we need? I figure at least Joe, Sally, Bill, Ellen, ElmStBridgeClub, and JoesHouse. These are the objects in the world that we need to represent if we are to represent the facts given. In logic terms, the symbols that refer to objects are often called atoms.

Okay, what predicates do we need? I found these:

These are the relationships in the world that we need to represent if we are to represent the facts given. In logic terms, the predicates are often called relations, which recognizes that they define relationships.

I also decided to use a new kind of object, one computed by a function. If I represent JoesHouse as an atom, then I may have to create many, many atoms for peoples' houses. Given that each person typically has one house, at least one primary residence, I can imagine have a function named houseOf(x) that gives me the house of x. houseOf( Joe ) is different from the relation house( Joe, JoesHouse ) in at least two ways: (1) in the latter, I still need a symbol for Joe's house, and (2), because houseOf( Joe ) is an object, I can use it as a part of other predicates.

Now, I think I am ready to write my sentences:

  1. memberOf( Joe, ElmStBridgeClub )
    memberOf( Sally, ElmStBridgeClub )
    memberOf( Bill, ElmStBridgeClub )
    memberOf( Ellen, ElmStBridgeClub )

  2. married( Sally, Joe )

  3. brother( Ellen, Bill )

  4. forall m, s [ married( s, m ) and memberOf( m, ElmStBridgeClub ) ] implies ( s, ElmStBridgeClub )

  5. lastMeetingAt( ElmStBridgeClub, houseOf(Joe) )

A Refresher Exercise, Part 2

Given the facts above, derive the following statements:

Feel free to define any commonsense axioms that you need in order to do your derivations.

Okay, what commonsense knowledge do we need? I found the following:

There are, of course, many other facts that we could write down about married couples and homes and siblings and ..., but these are the ones that came to mind as I tried to solve the problem.

Now, I think I am ready to do my derivations:

  1. ...

  2. ...

Where Are We?

We are exploring predicate logic with modus ponens as an inference rule.

Using an inference rule to derive facts is a lot like using an operator to generate possible future states from some state of the world.

In such a formulation, states are sets of sentences that describe a world, and an inference rule is an operator that allows you to generate possible future states consisting of one more fact each.

So, we can evaluate an inference rule in much the same way as we would a search strategy.

Modus ponens is:

Another interesting feature of logic is soundness. A sound inference rule derives only sentences that follow from the facts in the database. That is, if all sentences in a knowledge base are true, then it generates only true sentences.

Modus ponens is sound.

Wrap Up

Eugene Wallingford ==== ==== October 9, 2001