Logics for Data and Knowledge Representation - PowerPoint PPT Presentation

About This Presentation
Title:

Logics for Data and Knowledge Representation

Description:

Title: Logics for Data and Knowledge Representation Last modified by: admin Document presentation format: Custom Other titles: Gill Sans Arial Wingdings 3 ... – PowerPoint PPT presentation

Number of Views:58
Avg rating:3.0/5.0
Slides: 31
Provided by: unitn155
Category:

less

Transcript and Presenter's Notes

Title: Logics for Data and Knowledge Representation


1
Logics for Data and KnowledgeRepresentation
  • Exercises ClassL

Fausto Giunchiglia, Rui Zhang and Vincenzo Maltese
2
SYNTAX
3
Symbols in ClassL
  • Which of the following symbols are used in
    ClassL?
  • ? ? ? ? ? ? ? ? ? ? ?
  • Which of the following symbols are in well formed
    formulas?
  • ? ? ? ? ? ? ? ? ? ? ?

3
4
Symbols in ClassL (solution)
  • Which of the following symbols are used in
    ClassL?
  • ? ? ? ? ? ? ? ? ? ? ?
  • Which of the following symbols are in well formed
    formulas?
  • ? ? ? ? ? ? ? ? ? ? ?

4
5
Extended formation rules
  • The basic BNF grammar
  • ltAtomic Formulagt A B ... P Q ...
    ? ?
  • ltwffgt ltAtomic Formulagt ltwffgt ltwffgt ?
    ltwffgt ltwffgt ? ltwffgt
  • TBox
  • ltdefinitiongt ltAtomic Formulagt ltwffgt
  • ltspecializationgt ltAtomic Formulagt ? ltwffgt
  • ABox
  • ltindividualgt a b ...
  • ltassertiongt ltAtomic Formulagt (ltindividualgt)

5
6
Formation rules
  • Which of the following is not a wff in ClassL?
  • ? MonkeyLow ? BananaHigh
  • ? ? MonkeyLow ? BananaHigh ? ? GetBanana
  • MonkeyLow ? ? BananaHigh
  • MonkeyLow ? ? GetBanana
  • NUM 2, 3, 4 !

6
7
MODELING
8
Formalization of simple sentences
  • Propositional DL (ClassL) has pretty poor
    expressiveness. For instance, we cannot represent
    attributes and relations effectively.

The set of games which are not legal Game ? ?Legal
Lakes are locations Lake ? Location
Lakes are locations made of water Lake ? Location ? MadeofWater
Persons can be distinguished into male and female Male ? Person Female ? Person
Male and Female are disjoint Male ? ? Female
Persons have a birthplace Person ? hasBirthDate
The set of documents about programming in Java are a subset of the documents about programming languages and computer science JavaProgramming ? ProgrammingLanguage ? ComputerScience
8
9
Formalization of a problem in ClassL
  • Unicorns are mythical horses having a horn.
    Pegasus is a unicorn while Mike is not.
  • Unicorn ? mythical ? horse ? hasHorn
  • Unicorn(Pegasus), ?Unicorn(Mike)
  • There are two kinds of students master students
    and PhD students. All PhD students do research.
    Ronald is a master student that does research.
  • MasterStudent ? Student
  • PhDStudent ? Student ? doResearch
  • MasterStudent(Ronald)
  • doResearch(Ronald)

9
10
Formalization of a semantic network
  • T BodyOfWater ? Location, PopulatedPlace ?
    Location, Lake ? BodyOfWater, City ?
    PopulatedPlace, Country ? PopulatedPlace
  • A Person(GiorgioNapolitano), Lake(GardaLake),
    City(Trento), Country(Italy), Part(GardaLake,Trent
    o), Part(Trento, Italy), PresidentOf(GiorgioNapoli
    tano, Italy)

10
11
Defining the TBox and ABox the LDKR Class
  • Define a TBox and ABox for the following database

ABox Italian(Fausto), Italian(Enzo),
Chinese(Rui), Indian(Bisu), BlackHair(Enzo),
BlackHair(Rui), BlackHair(Bisu), WhiteHair(Fausto)
TBox Italian ? LDKR, Indian ?
LDKR, Chinese ? LDKR, BlackHair ?
LDKR, WhiteHair ? LDKR
LDKR
Name Nationality Hair
Fausto Italian White
Enzo Italian Black
Rui Chinese Black
Bisu Indian Black
NOTE ClassL is not expressive enough to
represent database constrains such as keys
involving two fields.
11
12
SEMANTICS
13
Proprieties of the ? and ? (I)
  • Suppose that A and B are satisfiable.
  • Is A ? B always satisfiable in PL?
  • We can observe that the fact that A and B are
    satisfiable (alone) does not necessarily imply
    that A ? B is also satisfiable. It is instead the
    case when they are satisfiable by the same model.
  • Think for instance to the case B ? A.

A B A?B
T T T
T F F
F T F
F F F
MODEL for A
MODEL for B
MODEL for A
MODEL for B
13
14
Proprieties of the ? and ? (II)
  • Suppose that A and B are satisfiable.
  • Is A ? B always satisfiable in ClassL?
  • We can easily observe that the fact that A and B
    are satisfiable does not imply that A ? B is also
    satisfiable. Think to the case in which their
    extensions are disjoint. Differently from PL,
    this might not be the case even when they are
    satisfiable by the same model.

A
A
B
B
A
B
14
15
TBOX REASONING
16
Satisfiability with respect to a TBox T
  • RECALL
  • Satisfiability in one model
  • A concept P is satisfiable w.r.t. a terminology
    T, if there exists an interpretation I with I ? ?
    for all ? ? T, and such that I ? P, namely I(P)
    is not empty
  • Satisfiability in all models (validity)
  • A concept P is satisfiable w.r.t. a terminology
    T, if for all interpretations I with I ? ? for
    all ? ? T, and such that I ? P, namely I(P) is
    not empty

16
17
Satisfiability with respect to a TBox (I)
  • Given the TBox TA?B, B?A, is ?(A?B)
    satisfiable in ClassL?
  • This corresponds to the problem T ? ?(A?B)

To prove satisfiability in one model it is enough
to find one model we can use Venn Diagrams.
To prove satisfiability in all models we need to
prove validity this can be proved with
DPLL DPLL(? (RewriteInPL(A?B) ?
RewriteInPL(B?A) ? RewriteInPL(?(A?B) ))) DPLL(?
((A ?B) ? (B ?A)) ? ?(A ? B))
17
18
Satisfiability with respect to a TBox (II)
  • Given the TBox TC?A, C?B is ?(A?B)
    satisfiable?
  • (in one model)

18
19
Satisfiability with respect to a TBox (III)
  • Suppose we model the Monkey-Banana problem as
    follows
  • If the monkey is low in position then it cannot
    get the banana. If the monkey gets the banana it
    survives.
  • TBox T
  • MonkeyLow ? ? GetBanana
  • GetBanana ? Survive
  • Is T satisfiable?

YES! Look at the Venn diagram
19
20
Satisfiability with respect to a TBox (IV)
  • Suppose we model the Monkey-Banana problem as
    follows
  • TBox T
  • MonkeyLow ? ? GetBanana
  • GetBanana ? Survive
  • Is it possible for a monkey to survive even if it
    does not get the banana?
  • We can restate the problem as follow
  • does T ? ? GetBanana ? Survive ?

YES! Look at the Venn diagram
20
21
Subsumption
  • Suppose we describe the students/attendees in a
    course
  • Are assistants undergraduates?
  • T ? Assistant ? Undergraduate
  • Assistant PhD ? Teach Master ? Research ?
    Teach
  • Student ? ? Undergraduate ? Research ? Teach
  • Assistants are actually students who are not
    undergraduate.

Undergraduate ? ? Teach Bachelor Student
? Undergraduate Master Student ? ?
Undergraduate PhD Master ?
Research Assistant PhD ? Teach
TBox T
22
Disjointness
  • Suppose we describe the students/attendees in a
    course
  • Are Bachelor and master disjoint?
  • T ? Bachelor ? Master ? ?
  • (Student ? Undergraduate) ? (Student ? ?
    Undergraduate)
  • Student ? (Undergraduate ? ? Undergraduate) ?

Undergraduate ? ? Teach Bachelor Student
? Undergraduate Master Student ? ?
Undergraduate PhD Master ?
Research Assistant PhD ? Teach
TBox T
23
Normalization of a TBox
  • Normalize the TBox below
  • MonkeyLow ? ? GetBanana
  • GetBanana Survive
  • Possible solution
  • MonkeyLow ? GetBanana ? ? ClimbBox
  • GetBanana Survive
  • Note that, with this theory, the monkey
    necessarily needs to get the banana to survive.

23
24
Expansion of a TBox
  • Expand the TBox below
  • MonkeyLow ? GetBanana ? ? ClimbBox
  • GetBanana Survive
  • T, expansion of T (The Venn diagram gives a
    possible model)
  • MonkeyLow ? Survive ? ? ClimbBox
  • GetBanana Survive

Notice that the fact that a monkey climbs the
box does not necessarily mean that it survives.
24
25
ABOX REASONING
26
ABox Consistency
  • Check the consistency of A w.r.t. T via
    expansion.

T MonkeyLow ? GetBanana ? ? ClimbBox GetBanana
Survive
A MonkeyLow(Cita) ?Survive(Cita)
  • Expansion of A is consistent
  • MonkeyLow(Cita)
  • ? GetBanana(Cita)
  • ClimbBox(Cita)
  • ? Survive(Cita)
  • ? GetBanana(Cita)

26
27
ABox Instance checking
  • Given T and A below
  • Is Cita an instance of MonkeyLow?
  • YES
  • Is Cita an instance of ClimbBox?
  • NO
  • Is Cita an instance of GetBanana?
  • NO

T MonkeyLow ? GetBanana ? ? ClimbBox GetBanana
Survive
A MonkeyLow(Cita) ?Survive(Cita)
  • Expansion of A
  • MonkeyLow(Cita)
  • ? GetBanana(Cita)
  • ClimbBox(Cita)
  • ? Survive(Cita)
  • ?GetBanana(Cita)

27
28
Instance Retrieval. Consider the following
expansion
T Undergraduate ? ? Teach Bachelor Student ?
Undergraduate Master Student ? ?
Undergraduate PhD Master ?
Research Assistant PhD ? Teach
A Master(Chen) PhD(Enzo) Assistant(Rui)
The expansion of A
  • Assistant(Rui)
  • PhD(Rui)
  • Teach(Rui)
  • Master(Rui)
  • Research(Rui)
  • Student(Rui)
  • Undergraduate(Rui)
  • Master(Chen)
  • Student(Chen)
  • Undergraduate(Chen)
  • PhD(Enzo)
  • Master(Enzo)
  • Research(Enzo)
  • Student(Enzo)
  • Undergraduate(Enzo)

28
29
Instance Retrieval. find the instances of
Master
T Undergraduate ? ? Teach Bachelor Student ?
Undergraduate Master Student ? ?
Undergraduate PhD Master ?
Research Assistant PhD ? Teach
A Master(Chen) PhD(Enzo) Assistant(Rui)
The expansion of A
  • Assistant(Rui)
  • PhD(Rui)
  • Teach(Rui)
  • Master(Rui)
  • Research(Rui)
  • Student(Rui)
  • Undergraduate(Rui)
  • Master(Chen)
  • Student(Chen)
  • Undergraduate(Chen)
  • PhD(Enzo)
  • Master(Enzo)
  • Research(Enzo)
  • Student(Enzo)
  • Undergraduate(Enzo)

29
30
ABox Concept realization
  • Find the most specific concept C such that A ?
    C(Cita)
  • Notice that MonkeyLow directly uses GetBanana
    and ClimbBox, and it uses Survive. The most
    specific concept is therefore MonkeyLow.

T MonkeyLow ? GetBanana ? ? ClimbBox GetBanana
Survive
A MonkeyLow(Cita) ?Survive(Cita)
30
Write a Comment
User Comments (0)
About PowerShow.com