The ancestor problem - PowerPoint PPT Presentation

About This Presentation
Title:

The ancestor problem

Description:

Sam is a penguin. Wounded birds are birds. Wounded birds are weakly exceptional. ... Note: et may or may not be a penguin we do not know. et is a bird. fly(X) ... – PowerPoint PPT presentation

Number of Views:63
Avg rating:3.0/5.0
Slides: 19
Provided by: CSE48
Category:

less

Transcript and Presenter's Notes

Title: The ancestor problem


1
The ancestor problem
  • For the ancestor problem we have the following
    rules in AnsProlog
  • anc(X,Y)
  • anc(X,Y)
  • par(a,b).
  • par(b,c).
  • par(d,c).
  • These rules work for the Closed World Assumption.

2
Ancestor problem (contd.)
  • Now if our domain consists of the following
  • par(a,b).
  • par(b,c).
  • par(a,c).
  • par(b,a).
  • then the previous rules work well to find the
    answers for those that are ancestors.
  • Now consider the problem where we would like to
    find the set of people who are not ancestors then
    we have to modify the rules so that we find the
    set which are not ancestors. We are removing the
    Closed World Assumption now.

3
Ancestor problem (contd.)
  • Doing so may involve finding the set of people
    who may be parents or may not be parents which
    can be given by
  • m_par(X,Y)
  • which means that X may or may not be a parent of
    Y.
  • This rule can be further modified as
  • m_par(X,Y)
  • In this case, the classical negation helps us
    find those Xs who are not parent of Ys and then
    the default negation will help us find those Xs
    who are possibly parent of Ys.

4
Ancestor problem (contd.)
  • So, finally we can get the rule for not ancestors
    as
  • m_anc(X,Y)
  • m_anc(X,Y)
  • This program is mathematically correct for
    finding the anc(X,Y).

5
Correctness of a translation of a program
  • Program ?
  • anc(X,Y)
  • anc(XY)
  • Let us call this ? and let ? be based on facts D.
  • For example if,
  • ? par(a,b).
  • par(b,c).
  • Translation of Program ?
  • m_par(X,Y)
  • m_anc(X,Y)
  • Let us call this tr(?) which means a translation
    of program ? and it is based on D/ where
  • D/ ? ext(D)
  • ?/ par(a,b).
  • par(b,c).
  • par(b,d).
  • And keep adding to ?/ as long as it remains
    consistent

6
Correctness of a translation of a program
  • The complete extension of D would be all the
    things that are not known to be true or false.
  • If D/ ? c_ext(D) (c_ext(D) means a complete
    extension of D) then tr(?) U D
    for any D/ ? c_ext(D)
  • If the conditions are explicitly defined in ?
    then they should all be reflected to tr(?).
  • Automatic translation can be done

7
Examples
  • 1. Rules
  • Birds normally fly.
  • Tweety is a bird.
  • Sam is a bird.
  • If now we add more rules to it we get
  • Program
  • fly(X)
  • bird(tweety).
  • bird(sam).

8
Examples (contd.)
  • Program
  • fly(X)
  • bird(tweety).
  • bird(sam). (we can strike this out now)
  • bird(X)
  • ab(X)
  • penguin(sam).
  • 1. Rules
  • Birds normally fly.
  • Tweety is a bird.
  • Sam is a bird.
  • Penguins are birds.
  • Penguins are exceptional with respect to flying.
  • Sam is a penguin.
  • Now if we wish to find about things that do not
    fly, we can do that by adding to this program

9
Examples (contd.)
  • Program now stands
  • fly(X)
  • bird(tweety).
  • bird(X)
  • ab(X)
  • penguin(sam).
  • fly(X)
  • bird(X)
  • ab(X)
  • penguin(X)
  • The last four rules will help us find the objects
    that do not fly.

10
Examples (contd.)
  • We further add to our rules
  • Wounded birds are birds.
  • Wounded birds are weakly exceptional.
  • John is a wounded bird.
  • Note wounded bird is weakly exceptional, that
    means that it may or may not fly.
  • The program now adds the following rules
  • bird(X)
  • wounded_bird(john).
  • ab(X)
  • fly(X)
  • And removes the rule
  • fly(X)

11
Examples (contd.)
  • The program now stands to
  • fly(X)
  • bird(X)
  • bird(X)
  • ab(X)
  • ab(X)
  • bird(X)
  • ab(X)
  • penguin(X)
  • fly(X)
  • bird(tweety).
  • penguin(sam).
  • wounded_bird(john).

12
Examples (contd.)
  • Adding to the Knowledge base
  • bird(sylvester).
  • will now help us make the decision that sylvester
    does not fly by using the rules listed below.
  • fly(X)
  • fly(X)
  • Sylvester is not a bird and it is not known to be
    an abnormal bird will make fly(sylvester) false
    by (1).
  • Again as we have no information about sylvester
    being wounded and as fly(sylvester) is false by
    (1) we will infer that sylvester does not fly by
    (2).

13
Examples (contd.)
  • Now if we add a constant to the KB
  • et.
  • And we do not know whether et is a bird or not
    then if we replace the rule
  • fly(X)
  • fly(X)
  • Then we reach the conclusion that et does not
    fly.
  • Also bird(X)would lead us to interesting conclusions as we
    do not know whether et is a bird or not this rule
    will give us that et is not a bird as it is not a
    penguin nor is it a wounded_bird. Thus et does
    not fly.

14
Examples (contd.)
  • Thus we have to take care of two important
    things
  • When information are incomplete we have to do
    certain things
  • What kind of observations are we allowed to make.
  • So, replacing the bird(X) rule by
  • bird(X)bird(X).
  • Will in fact give us the correct solution for et.
    It will give neither et can fly nor et can not
    fly which is the information that we wish to
    infer from the KB.

15
Kinds of Predicates
  • There are two kinds of predicates
  • 1. Base Predicates penguin(X), wounded_bird(X)
    are base predicates
  • 2. Derived Predicates These are predicates
    defined by base predicates. For example, fly(X),
    bird(X), ab(X) etc.
  • With incomplete information, what we may want to
    add to our Knowledge Base may make our derived
    predicates inconsistent.

16
Things to remember
  • When facts are about the base predicates only
    then adding to KB is straightforward.
  • If we have classical negation of base predicates
    then things are fairly simple.
  • If we allow observation about derived predicates
    then more advanced techniques are required.

17
How to handle missing data
  • Normally birds fly.
  • Tweety is a bird.
  • Sam is a bird.
  • Sam is a penguin.
  • Wounded birds are birds.
  • Wounded birds are weakly exceptional. i.e., they
    may fly or may not fly.
  • John is a wounded bird.
  • et.
  • Note et may or may not be a penguin we do not
    know. et is a bird.
  • fly(X)
  • bird(tweety).
  • bird(et).
  • bird(X)
  • bird(X)
  • ab(X)
  • penguin(sam).
  • penguin(tweety).
  • wounded_bird(john).
  • Then in order to deal with missing data we modify
    the ab(X) rule as
  • ab(X)

18
Summary
  • We have to start with normative statements.
  • Then handle weak exceptions that is those that
    are neither known to be true or false.
  • a) Keeping Close World Assumption in mind
    like if we know par(X) then the others are not
    par(X).
  • b) We have to be careful when Close World
    Assumption is removed.
  • For new observation, we have to consider what
    kind of observations can be added so that they do
    not make the program inconsistent. We have to
    keep the program consistent.
  • We have to consider how to assimilate new
    observation to the Knowledge Base.
Write a Comment
User Comments (0)
About PowerShow.com