l ogics for d ata and k nowledge r epresentation
DESCRIPTION
L ogics for D ata and K nowledge R epresentation. Exercise 2: PL, ClassL, Ground ClassL. Outline. Reasoning Truth Table Deduction Logics PL ClassL Ground ClassL. Summary of Logics Mentioned by Now (1). Language / Syntax Choose proper logics for the following symbols - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: L ogics for D ata and K nowledge R epresentation](https://reader035.vdocuments.net/reader035/viewer/2022081603/5681440a550346895db09ff4/html5/thumbnails/1.jpg)
LLogics for DData and KKnowledgeRRepresentation
Exercise 2: PL, ClassL, Ground ClassL
![Page 2: L ogics for D ata and K nowledge R epresentation](https://reader035.vdocuments.net/reader035/viewer/2022081603/5681440a550346895db09ff4/html5/thumbnails/2.jpg)
Outline Reasoning
Truth Table Deduction
Logics PL ClassL Ground ClassL
2
![Page 3: L ogics for D ata and K nowledge R epresentation](https://reader035.vdocuments.net/reader035/viewer/2022081603/5681440a550346895db09ff4/html5/thumbnails/3.jpg)
Summary of Logics Mentioned by Now (1) Language / Syntax
Choose proper logics for the following symbols
⊓ ⊤ ⊢ ∨ ≡ ⊔ ⊑ → ↔ ⊥ ∧ ⊨
3
PL ClassLGround ClassL
![Page 4: L ogics for D ata and K nowledge R epresentation](https://reader035.vdocuments.net/reader035/viewer/2022081603/5681440a550346895db09ff4/html5/thumbnails/4.jpg)
Summary of Logics Mentioned by Now (2) Semantics
PL pI={True, False}
ClassL pI={set1, …, setn}
Ground ClassL pI={set1, …, setn}, qI={element1, …, elementm}
4
![Page 5: L ogics for D ata and K nowledge R epresentation](https://reader035.vdocuments.net/reader035/viewer/2022081603/5681440a550346895db09ff4/html5/thumbnails/5.jpg)
Truth Table What is a Truth valuation?
Def. A truth valuation on a propositional language L is a mapping ν assigning to each formula P of L a truth value ν(P).
What is a Truth Table? A truth table is composed of one column for each input
variable and one final column for all of the possible results of the logical operation that the table is meant to represent. Each row of the truth table therefore contains one possible assignment of the input variables, and the result of the operation for those values.
5
![Page 6: L ogics for D ata and K nowledge R epresentation](https://reader035.vdocuments.net/reader035/viewer/2022081603/5681440a550346895db09ff4/html5/thumbnails/6.jpg)
Example Calculate the Truth Table of the following formulas
A∧B P∨Q X↔Y
What about this? (A∨B→C∨D∨E)∧(¬F↔A)∧(¬F∨G∧¬H∨F)∧(¬I→
¬(D∧J))∧(¬J∨¬D∨E)∧F
6
A B A∧B A∨B A↔B
T T T T T
T F F T F
F T F T F
F F F F T
![Page 7: L ogics for D ata and K nowledge R epresentation](https://reader035.vdocuments.net/reader035/viewer/2022081603/5681440a550346895db09ff4/html5/thumbnails/7.jpg)
Deduction Deduction
Double negative elimination P⊢P
Conjunction introduction / elimination {P, Q}⊢P∧Q; P∧Q⊢P, P∧Q⊢Q
Disjunction introduction / elimination P⊢P∨Q, Q⊢P∨Q; {P∨Q, P→R, Q→R}⊢R
Bi-conditional introduction / elimination (P→Q)∧(P←Q)⊢(P↔Q)
De Morgan (P∧Q)⊢P∨Q, (P∨Q)⊢P∧Q
7
![Page 8: L ogics for D ata and K nowledge R epresentation](https://reader035.vdocuments.net/reader035/viewer/2022081603/5681440a550346895db09ff4/html5/thumbnails/8.jpg)
Proofs of Deduction Rules
P Q ¬¬P P→Q Q→P ¬(P∧Q) ¬P∨¬Q ¬(P∨Q) ¬P∧¬Q
T T T T F F F F F
T F T F T T T F F
F T F T F T T F F
F F F T T T T T T
8
P Q P∧Q P∨Q P↔Q
T T T T T
T F F T F
F T F T F
F F F F T
![Page 9: L ogics for D ata and K nowledge R epresentation](https://reader035.vdocuments.net/reader035/viewer/2022081603/5681440a550346895db09ff4/html5/thumbnails/9.jpg)
Soundness and Completeness A deduction system is sound if any sentence P that
is derivable from a set Г of sentences is also a logical consequence of that set Г.
A deductive system is complete if every sentence P that is a semantic consequence of a set of sentences Γ can be derived in the deduction system from that set.
A soundness property provides the initial reason for counting a logical system as desirable. The completeness property means that every validity (truth) is provable.
9
![Page 10: L ogics for D ata and K nowledge R epresentation](https://reader035.vdocuments.net/reader035/viewer/2022081603/5681440a550346895db09ff4/html5/thumbnails/10.jpg)
Outline Reasoning
Truth Table Deduction
Logics PL ClassL Ground ClassL
10
![Page 11: L ogics for D ata and K nowledge R epresentation](https://reader035.vdocuments.net/reader035/viewer/2022081603/5681440a550346895db09ff4/html5/thumbnails/11.jpg)
Warming up List the number of models for the following formulas
1. (A∧B)∨(B∧C)
2. A∨B→D
3.¬A↔B↔C
4. (A↔¬B)∧(A ↔B)
5. Something has to be mentioned:
Suppose the formulas are represented by a PL with 4 propositions: A, B, C and D.
11
Wait!
![Page 12: L ogics for D ata and K nowledge R epresentation](https://reader035.vdocuments.net/reader035/viewer/2022081603/5681440a550346895db09ff4/html5/thumbnails/12.jpg)
PL Exercises 1 Let A, B, C be propositional sentences, if A⊨B∧C,
then A⊨B or A⊨C or both? What if A⊨B∨C?
The model of ‘B∧C’ is I={B=T, C=T}; If ‘A⊨B∧C’, I should be also a model of ‘A’; Because I assigns True to ‘B’, I is a model of ‘B’; Similarly, I is also a model of ‘C’; So, the proposition is true.
If ‘A⊨B∨C’, a model of ‘B∨C’ can be I’={B=T, C=F}; I’ is not a model of either ‘A⊨B ’ and ‘A⊨C ’.
12
![Page 13: L ogics for D ata and K nowledge R epresentation](https://reader035.vdocuments.net/reader035/viewer/2022081603/5681440a550346895db09ff4/html5/thumbnails/13.jpg)
PL Exercises 2 Given that P=(A∨B)∧(C∨D∨E), Q1=A∨B,
Q2=(A∨B∨C)∧(B∧C∧D→E), Q3=(A∨B)∧(D∨E), list i that P⊨Qi.
13
A B C D E P Q1 Q2 Q3
T T T T T T T T T
F T T T T …
T F T T T
T T F T T
T T T F T
… …
F F F F F …
![Page 14: L ogics for D ata and K nowledge R epresentation](https://reader035.vdocuments.net/reader035/viewer/2022081603/5681440a550346895db09ff4/html5/thumbnails/14.jpg)
PL Exercises 2 cont. Given that P=(A∨B)∧(C∨D∨E), Q1=A∨B,
Q2=(A∨B∨C)∧(B∧C∧D→E), Q3=(A∨B)∧(D∨E), list i that P⊨Qi.
Notice that let X= A∨B, Y= D∨E, then we rewrite P=X∧(¬C∨Y), Q1=X
Q2=(X∨C)∧(¬ B∨¬C∨Y),
Q3=X∧Y
So, P⊨Q1;
X ⊨X∨C, (¬C∨Y) ⊨(¬ B∨¬C∨Y) thus P ⊨ Q2,
Y ⊨(¬C∨Y) thus Q3 ⊨ P.
14
![Page 15: L ogics for D ata and K nowledge R epresentation](https://reader035.vdocuments.net/reader035/viewer/2022081603/5681440a550346895db09ff4/html5/thumbnails/15.jpg)
PL Exercises 3 Suppose p, q, r, s are four
propositional sentences, is the following sentence valid? (p→r) (q→s) (∧ ∧ r∨s)→(p∨q)
A=(p→r) (q→s) (∧ ∧ ¬r∨¬s)→(¬p∨¬q)
=¬((p→r) (q→s) (∧ ∧ ¬r∨¬s))∨ ¬p∨¬q
=(p∧¬r)∨(q∧¬s)∨(r∧s) ∨ ¬p∨¬q
=⊤15
p Q r s A
T T T T T
T T T F T
T T F T T
T T F F T
T F T T T
T F T F T
T F F T T
T F F F T
F T T T T
F T T F T
F T F T T
F T F F T
F F T T T
F F T F T
F F F T T
F F F F T
![Page 16: L ogics for D ata and K nowledge R epresentation](https://reader035.vdocuments.net/reader035/viewer/2022081603/5681440a550346895db09ff4/html5/thumbnails/16.jpg)
Are you ‘Sherlock Holmes’?
There was a robbery in which a lot of goods were stolen. The robber(s) left in a truck. It is known that : (1) Nobody else could have been involved other than A, B
and C.
(2) C never commits a crime without A's participation.
(3) B does not know how to drive. So, is A innocent or guilty?
A∨B∨C C→AB
16
A
![Page 17: L ogics for D ata and K nowledge R epresentation](https://reader035.vdocuments.net/reader035/viewer/2022081603/5681440a550346895db09ff4/html5/thumbnails/17.jpg)
Knights and Knaves A very special island is inhabited only by knights and
knaves. Knights always tell the truth, and knaves always lie.
You meet two inhabitants: Zoey and Mel.
Zoey tells you that Mel is a knave.
Mel says, ‘Neither Zoey nor I are knaves.’
Can you determine what are they? (who is a knight and who is a knave? )
Z: M M: Z∧M
proof: If M, then Z∧M, then Z, then M.
17
Contradictory!
![Page 18: L ogics for D ata and K nowledge R epresentation](https://reader035.vdocuments.net/reader035/viewer/2022081603/5681440a550346895db09ff4/html5/thumbnails/18.jpg)
ClassL Exercises 1 T={A⊑B, B⊑A}, is (A⊓B) satisfiable in ClassL?
18
ABA
B
![Page 19: L ogics for D ata and K nowledge R epresentation](https://reader035.vdocuments.net/reader035/viewer/2022081603/5681440a550346895db09ff4/html5/thumbnails/19.jpg)
ClassL Exercises 2 T={C⊑A, C⊑B} is (A⊓B) satisfiable in ClassL?
19
A BcA
BC
A
BC
AB
C
A B
C
![Page 20: L ogics for D ata and K nowledge R epresentation](https://reader035.vdocuments.net/reader035/viewer/2022081603/5681440a550346895db09ff4/html5/thumbnails/20.jpg)
ClassL Exercises 3 Suppose a ⊨A, ⊨B, is the following sentence A∧B
satisfiable in PL, what about A⊓B in ClassL?
20
A B A∧B
T T T
T F F
F T F
F F F
A B
AB
A B
![Page 21: L ogics for D ata and K nowledge R epresentation](https://reader035.vdocuments.net/reader035/viewer/2022081603/5681440a550346895db09ff4/html5/thumbnails/21.jpg)
PL vs. ClassLFor any PL sentence P, suppose a corresponding ClassL P’ is built by changing , ,→, into , , , ∧ ∨ ⊓ ⊔ ⊑(not wff’s are not considered). Then do we have that
⊨P iff ⊨P’?The transmission of truth VS. coverage.
For all wff’s P of PL, there exists a truth valuation ν that ν(P) = True iff there exists a class valuations σ, σ(P’) ≠ ∅ with P’ as the corresponding proposition in ClassL.
NOTE: although there are more possible assignments in ClassL for the ‘same’ formula, some of them may collapse into one case in PL.
21
![Page 22: L ogics for D ata and K nowledge R epresentation](https://reader035.vdocuments.net/reader035/viewer/2022081603/5681440a550346895db09ff4/html5/thumbnails/22.jpg)
Example Suppose a PL wff ¬A B and a corresponding ⋀
ClassL wff ¬A⊓B, the possible assignments (interpretations) are as the following:
More than one model in ClassL collapse into one model in PL. (All non-empty are mapped to T.)
22
A B ¬A B⋀
T T F
T F F
F T T
F F F
A B
BA
…
![Page 23: L ogics for D ata and K nowledge R epresentation](https://reader035.vdocuments.net/reader035/viewer/2022081603/5681440a550346895db09ff4/html5/thumbnails/23.jpg)
Ground ClassL What distincts Ground ClassL from ClassL?
The expressiveness to represent ‘instance’.
What for?
To capture the instance/individual in the world.
23
![Page 24: L ogics for D ata and K nowledge R epresentation](https://reader035.vdocuments.net/reader035/viewer/2022081603/5681440a550346895db09ff4/html5/thumbnails/24.jpg)
Black Hair
White Hair
Exercise: LDKR ClassID Name Nationality Hair
1 Fausto Italian White
2 Enzo Italian Black
3 Rui Chinese Black
4 Bisu Indian Black
… … … …
24
TBox={Italian⊑LDKR, BlackHair⊑LDKR, Indian ⊑LDKR}ABox={Italian(Fausto), Italian(Enzo), Chinese(Rui), Indian(Bisu), BlackHair(Enzo), BlackHair(Rui), BlackHair(Bisu), WhiteHair(Fausto)}
LDKR
Italian
Chinese
People
Indian
LDKRItalianChinese
Indian
White
H
air
Black Hair