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 Bookman Old Style Gill ... – PowerPoint PPT presentation

Number of Views:19
Avg rating:3.0/5.0
Slides: 20
Provided by: disiUnit6
Category:

less

Transcript and Presenter's Notes

Title: Logics for Data and Knowledge Representation


1
Logics for Data and Knowledge Representation
  • Exercises DL

2
DL family of languages
SYNTAX SEMANTICS TBOX REASONING ABOX
REASONING TABLEAU CALCULUS
  • AL
  • ltAtomicgt A B ... P Q ... ? ?
  • ltwffgt ltAtomicgt ltAtomicgt ltwffgt ? ltwffgt
    ?R.C ?R.?
  • ALU ltwffgt ? ltwffgt
  • ALE ?R.C
  • ALN nR nR
  • ALC ltwffgt
  • FL- is AL with the elimination of ?, ? and ?
  • FL0 is FL- with the elimination of ?R.?

3
DL family of languages
SYNTAX SEMANTICS TBOX REASONING ABOX
REASONING TABLEAU CALCULUS
  • Examples of formulas in each of the languages

Formula AL ALU ALE ALN ALC
?A ? ? ? ? ?
A?B ?
?R.C ?
2R ?
?(A?B) ? ?A??B ?
3
4
Formalization of a semantic network
SYNTAX SEMANTICS TBOX REASONING ABOX
REASONING TABLEAU CALCULUS
  • Person ? ?Drives.Car
  • Person ? ?HasHobby.SportCar
  • Person ? ?HasHobby.Opera
  • Student ? Person
  • SportCar ? Car
  • Student(Ralf)
  • Opera(DonCarlos)

5
Modeling a problem
SYNTAX SEMANTICS TBOX REASONING ABOX
REASONING TABLEAU CALCULUS
  • Formalize the following problem in DL
  • In a hospital patients, doctors and computers
    are equipped with proximity sensors able top
    detect whether doctors curated a patient or
    worked at their computer. The system detected
    that doctor Peter curated the patient Smith.
  • Doctor ? ?cure.Patient ? ?work.Computer
  • Doctor (Peter)
  • Patient (Smith)
  • cure(Peter, Smith)

6
Venn diagrams
SYNTAX SEMANTICS TBOX REASONING ABOX
REASONING TABLEAU CALCULUS
  • Provide the Venn diagram for A ? B ? C

7
Proofs in DL semantics
SYNTAX SEMANTICS TBOX REASONING ABOX
REASONING TABLEAU CALCULUS
  • Verify the following equivalences hold for all
    interpretations (?,I). Use definitions or Venn
    diagrams.
  • I((C ? D)) I(C ? D)
  • I((C ? D)) I(C ? D)
  • I(?R.C) I(?R.C)
  • I(?R.C) I(?R.C)
  • Let us prove the last one
  • I(?R.C) a ? ? not exists b s.t. (a,b) ?
    I(R), b ? I(C)
  • a ? ? not ?b. R(a,b) and C(b)
  • a ? ? ?b. not (R(a,b) and C(b))
  • a ? ? ?b. if R(a,b) then C(b)
  • I(?R.C)

7
8
Using DPLL for reasoning tasks
SYNTAX SEMANTICS TBOX REASONING ABOX
REASONING TABLEAU CALCULUS
  • DPLL solves the CNFSAT-problem by searching a
    truth-assignment that satisfies all clauses ?i in
    the input proposition P ?1 ? ? ?n
  • DL sentences must to be translated in PL (via
    TBox and ABox elimination)
  • Model checking Does ? satisfy P? (? ? P?)
  • Check if ?(P) true
  • Satisfiability Is there any ? such that ? ? P?
  • Check that DPLL(P) succeeds and returns a ?
  • Unsatisfiability Is it true that there are no ?
    satisfying P?
  • Check that DPLL(P) fails
  • Validity Is P a tautology? (true for all ?)
  • Check that DPLL(?P) fails

8
9
Modeling the problem
SYNTAX SEMANTICS TBOX REASONING ABOX
REASONING TABLEAU CALCULUS
  • Codify in DL the following problem
  • A federal agent can access top secret documents.
    An X file is a top secret document with no
    restricted access that can be read by policemen.
  • FederalAgent ? ?Access.TopSecretDocument
  • XFile ? TopSecretDocument ? ?Restricted ?
    ?Read-1.Policeman

10
Satisfiability of a TBox (a set of formulas)
SYNTAX SEMANTICS TBOX REASONING ABOX
REASONING TABLEAU CALCULUS
  • Say if the following TBox is satisfiable and
    provide a model in the case
  • FederalAgent ? ?Access.TopSecretDocument
  • XFile ? TopSecretDocument ? ?Restricted ?
    ?Read-1.Policeman
  • I(FederalAgent) A We have that I ? T
  • I(TopSecretDocument) D1, D2
  • I(Access) (A, D1), (A, D2)
  • I(XFile) D1
  • I(Restricted) D2
  • I(Read) (B, D1)
  • I(Policeman) B
  • Otherwise you can either draw a Venn diagram or
    apply the tableaux calculus and provide the ABox
    built

11
Satisfiability w.r.t. a TBox
SYNTAX SEMANTICS TBOX REASONING ABOX
REASONING TABLEAU CALCULUS
  • Consider the TBox T
  • FederalAgent ? ?Access.TopSecretDocument
  • XFile ? TopSecretDocument ? ?Restricted ?
    ?Read-1.Policeman
  • and the formula P TopSecretDocument ?
    Restricted
  • does T ? P ?
  • Yes, if fact these is an interpretation I (e.g.
    the one of the previous exercise) such that I ? T
    and I ? P
  • I(TopSecretDocument) D1, D2
  • I(Restricted) D1
  • Notice that T does not affect P at all (i.e. we
    cannot further expand P w.r.t. T)

12
Subsumption
SYNTAX SEMANTICS TBOX REASONING ABOX
REASONING TABLEAU CALCULUS
  • Consider the TBox T
  • FederalAgent ? ?Access.TopSecretDocument
  • XFile ? TopSecretDocument ? ?Restricted ?
    ?Read-1.Policeman
  • does T ? TopSecretDocument ? Restricted in all
    models?
  • By definition, it must be I(TopSecretDocument )
    ? I(Restricted ) for every model I of T. Even if
    this is true for the I of the previous exercise,
    this is not true in general. It is enough to
    provide a counterexample

I(XFile) D2 I(Restricted) D1 I(Read)
(B, D2) I(Policeman) B
I(FederalAgent) A I(TopSecretDocument)
D2 I(Access) (A, D1), (A, D2)
13
Reduce to PL reasoning
SYNTAX SEMANTICS TBOX REASONING ABOX
REASONING TABLEAU CALCULUS
  • Consider the TBox T A ? B ? C, C ? D ? E.
    Determine if A ? E by elimination of T.
  • T C (B ? C) ? X, C D ? E ? Y
  • A (B ? (D ? E ? Y)) ? X
  • E E
  • A (B ? (D ? E ? Y)) ? X
  • E E
  • P CNF(B ? (D ? E ? Y)) ? X ? E)
  • Call DPLL(P)

The steps T Normalize(T) A Expand(A,
T) E Expand(E, T) A RewriteInPL(A) E
RewriteInPL(E) return DPLL(CNF(A ? E))
14
Expansion of an ABox
SYNTAX SEMANTICS TBOX REASONING ABOX
REASONING TABLEAU CALCULUS
  • Provide the expansion of A w.r.t. T (without
    normalization), where
  • TBox T Student ? Faculty, Professor ?
    Faculty ? Teach
  • ABox A Professor(Bob), Faculty(Rui)
  • Professor(Bob), Faculty(Bob), Teach(Bob)
  • Faculty(Rui)

15
ABox Reasoning services Consistency
SYNTAX SEMANTICS TBOX REASONING ABOX
REASONING TABLEAU CALCULUS
  • An ABox A is consistent with respect to a TBox T
    if there is an interpretation I which is a model
    of both A and T.
  • T Parent?1hasChild
  • A hasChild(mary, bob), hasChild(mary, cate),
    Parent(mary)
  • A is consistent ALONE but is not consistent with
    respect T.
  • In fact, from A mary has two children while T
    imposes maximum one

15
16
Drawing consequences (I)
SYNTAX SEMANTICS TBOX REASONING ABOX
REASONING TABLEAU CALCULUS
  • Given the TBox and ABox below
  • T
  • Female?Human
  • Male?Human
  • Mother?Female
  • Father?Male
  • Child?has.Mother? ?has.Father
  • Male?Female??
  • A
  • Mother(Anna)
  • Father(Bob)
  • has(Cate,Anna)
  • has(Cate,Bob)
  • Prove
  • Human(Anna)
  • Female(Bob)
  • Child(Cate)

16
17
Drawing consequences (II)
SYNTAX SEMANTICS TBOX REASONING ABOX
REASONING TABLEAU CALCULUS
  • Expand A w.r.t. T
  • A
  • Mother(Anna) ? Female(Anna) ? Human(Anna)
  • Father(Bob) ? Male(Bob) ? Human(Bob) ,
    Female(Bob)
  • has(Cate,Anna) ? Child(Cate)
  • has(Cate,Bob) ? Child(Cate)

17
18
Reasoning using Tableau calculus (a)
SYNTAX SEMANTICS TBOX REASONING ABOX
REASONING TABLEAU CALCULUS
  • Given the ABox A hasParent(Speedy, Furia),
  • prove with Tableau algorithm the satisfiability
    of the following formula
  • ?Parent.Horse ? ? (Horse ? Mule)
  • Both ?Parent.Horse and ? (Horse ? Mule) have to
    be satisfied ?-rule
  • (i) ?hasParent.Horse ? A A ? Horse(Furia)
    ?-rule
  • (ii) ? (Horse ? Mule) ? ? Horse ? ? Mule ?
  • It is not consistent for A A ? ?
    Horse(Furia) ?-rule
  • (backtracking)
  • It is consistent for A A ? ? Mule(Furia)
    ?-rule

18
19
Reasoning using Tableau calculus (b)
SYNTAX SEMANTICS TBOX REASONING ABOX
REASONING TABLEAU CALCULUS
  • Using the tableau calculus, say whether the
    formula (?R.A ? ?R.A) ? ?R.(A ? B) is
    satisfiable given the TBox T A ? ?B. Motivate
    your response with a proof.
  • By ?-rule we split into (i) (?R.A ? ?R.A) (x)
    and (ii) ?R.(A ? B) (x).
  • We need one of the two to be satisfiable.
  • (i) By ?-rule we put into the ABox both ?R.A (x)
    and ?R.A (x)
  • (i.1) For ?R.A (x), by ?-rule we add into the
    ABox both R(x, y) and A(y)
  • (i.2) For ?R.A (x), by ?-rule we add into the
    ABox both R(x, y) and A(y)
  • i.1. and i.2 clearly contradict each other
  • (backtracking)
  • (ii) It is clearly in contradiction with the
    axiom in T. In fact A and B are disjoint
  • Since none of the two is satisfiable, then the
    formula is NOT satisfiable.
Write a Comment
User Comments (0)
About PowerShow.com