Upcoming SlideShare
×

# OpenHPI 4.8 - Resolution (FOL)

791 views
701 views

Published on

Published in: Education
0 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

• Be the first to like this

Views
Total views
791
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
51
0
Likes
0
Embeds 0
No embeds

No notes for slide

### OpenHPI 4.8 - Resolution (FOL)

1. 1. Semantic Web TechnologiesLecture 4: Knowledge Representations I 08: Resolution (FOL) Dr. Harald Sack Hasso Plattner Institute for IT Systems Engineering University of Potsdam Spring 2013 This ﬁle is licensed under the Creative Commons Attribution-NonCommercial 3.0 (CC BY-NC 3.0)
2. 2. 2 Lecture 4: Knowledge Representations I Open HPI - Course: Semantic Web Technologies Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
3. 3. 3 08 Resolution (FOL)Open HPI - Course: Semantic Web Technologies - Lecture Potsdam Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität 4: Knowledge Representations I
4. 4. Resolution (First Order Logic)304 ■ For resolution in First Order Logic additional variable bindings have to be considered with the help of Substitutions ■ e.g. (p(X,f(Y)) ∨ q( f(X),Y)) (¬p(a,Z) ∨ r(Z) ) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
5. 5. Resolution (First Order Logic)304 ■ For resolution in First Order Logic additional variable bindings have to be considered with the help of Substitutions ■ e.g. (p(X,f(Y)) ∨ q( f(X),Y)) (¬p(a,Z) ∨ r(Z) ) Resolution with [X/a, Z/f(Y)] results in (q( f(a),Y) ∨ r(f(Y))). Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
6. 6. Resolution (First Order Logic)304 ■ For resolution in First Order Logic additional variable bindings have to be considered with the help of Substitutions ■ e.g. (p(X,f(Y)) ∨ q( f(X),Y)) (¬p(a,Z) ∨ r(Z) ) Resolution with [X/a, Z/f(Y)] results in (q( f(a),Y) ∨ r(f(Y))). Substitutions Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
7. 7. Resolution (First Order Logic)305 ■ Uniﬁcation of Terms ■ Given: Literals L1, L2 ■ Wanted: Variable substitution σ applied on L1 and L2 results in: L1σ = L2σ ■ If there is such a variable substiution σ, then σ is called Uniﬁer of L1 und L2. Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
8. 8. Resolution (First Order Logic)306 Uniﬁcation Algorithm ■ Given: Literals L1, L2 ■ Wanted: Uniﬁer σ of L1 and L2. 1. L1 and L2 are Constants: only uniﬁable, if L1 = L2 . 2. L1 is Variable and L2 arbitrary Term: uniﬁable, if for Variable L1 the Term L2 can be substituted and Variable L1 does not occur in L2. 3. L1 and L2 are Predicates or Functions PL1(s1,...,sm) and PL2(t1,...,tn): uniﬁable, if 1. PL1 = PL2 or 2. n=m and all terms si are uniﬁable with a term ti Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
9. 9. Resolution (First Order Logic)307 Examples for Uniﬁcation L1 L2 σ p(X,X) p(a,a) [X/a] p(X,X) p(a,b) n.a. p(X,Y) p(a,b) [X/a, Y/b] p(X,Y) p(a,a) [X/a, Y/a] p(f(X),b) p(f(c),Z) [X/c, Z/b] p(X,f(X)) p(Y,Z) [X/Y, Z/f(Y)] p(X,f(X)) p(Y,Y) n.a. Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
10. 10. Resolution (First Order Logic)308 ■ For resolution in First Order Logic additional variable bindings have to be considered with the help of Substitutions ■ e.g. (p(X,f(Y)) ∨ q( f(X),Y)) (¬p(a,Z) ∨ r(Z) ) Resolution with [X/a, Z/f(Y)] results in (q( f(a),Y) ∨ r(f(Y))). Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
11. 11. Resolution (First Order Logic)309 Example for FOL Resolution: ■ Terminological Knowledge (TBox): (∀X) ( human(X) → (∃Y) parent_of(Y,X) ) (∀X) ( orphan(X) (human(X) ∧ ¬(∃Y) (parent_of(Y,X) ∧ alive(Y))) ■ Assertional Knowledge (ABox): orphan(harrypotter) parent_of(jamespotter,harrypotter) ■ Can we deduce: ¬alive(jamespotter)? Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
12. 12. Resolution (First Order Logic)3010 Example for FOL Resolution: We have to proof that: ((∀X) ( human(X) → (∃Y) parent_of(Y,X) ) ∧ (∀X) (orphan(X) (human(X) ∧ ¬(∃Y) (parent_of(Y,X) ∧ alive(Y))) ∧ orphan(harrypotter) ∧ parent_of(jamespotter,harrypotter)) → ¬alive(jamespotter)) is a tautology. Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
13. 13. Resolution (First Order Logic)3011 Example for FOL Resolution: We have to proof that: ¬((∀X) ( human(X) → (∃Y) parent_of(Y,X) ) ∧ (∀X) (orphan(X) (human(X) ∧ ¬(∃Y) (parent_of(Y,X) ∧ alive(Y))) ∧ orphan(harrypotter) ∧ parent_of(jamespotter,harrypotter)) → ¬alive(jamespotter)) ist a contradiction. Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
14. 14. Resolution (First Order Logic)3012 Example for FOL Resolution: ■ Prenex Normal Form: (∀X)(∃Y)(∀X1)(∀Y1)(∀X2)(∃Y2) (( ¬human(X) ∨ parent_of(Y,X) ) ∧ (¬orphan(X1)∨ (human(X1) ∧ (¬parent_of(Y1,X1) ∨ ¬alive(Y1))) ∧ (orphan(X2) ∨ (¬human(X2) ∨ (parent_of(Y2,X2) ∧ alive(Y2))) ∧ orphan(harrypotter) ∧ parent_of(jamespotter,harrypotter)) ∧ alive(jamespotter)) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
15. 15. Resolution (First Order Logic)3013 Example for FOL Resolution: ■ Clausal Form (CNF): ( ¬human(X) ∨ parent_of(f(X),X) ) ∧ (¬orphan(X1) ∨ human(X1)) ∧ (¬orphan(X1) ∨ ¬parent_of(Y1,X1) ∨ ¬alive(Y1)) ∧ (orphan(X2) ∨ ¬human(X2) ∨ parent_of(g(X,X1,Y1,X2),X2)) ∧ (orphan(X2) ∨ ¬human(X2) ∨ alive(g(X,X1,Y1,X2))) ∧ orphan(harrypotter) ∧ parent_of(jamespotter,harrypotter)) ∧ alive(jamespotter) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
16. 16. Resolution (First Order Logic)3014 Example for FOL Resolution: ■ Clausal Form (CNF): { {¬human(X), parent_of(f(X),X)}, {¬orphan(X1), human(X1)}, {¬orphan(X1),¬parent_of(Y1,X1),¬alive(Y1)}, {orphan(X2),¬human(X2),parent_of(g(X,X1,Y1,X2),X2)}, {orphan(X2) ,¬human(X2),alive(g(X,X1,Y1,X2))}, {orphan(harrypotter)}, {parent_of(jamespotter,harrypotter)}, {alive(jamespotter)} } Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
17. 17. Resolution (First Order Logic)3015 Example for FOL Resolution: Knowledge Base: 1. {¬human(X), parent_of(f(X),X)} 2. {(¬orphan(X1), human(X1)} 3. {¬orphan(X1), ¬parent_of(Y1,X1),¬alive(Y1))} 4. {(orphan(X2), ¬human(X2), parent_of(g(X,X1,Y1,X2),X2)} 5. {orphan(X2), ¬human(X2), alive(g(X,X1,Y1,X2))} 6. {orphan(harrypotter)} 7. {parent_of(jamespotter,harrypotter)} 8. {alive(jamespotter)} Entailed Clauses: 9. {¬orphan(harrypotter), ¬alive(jamespotter)} (3,7) [X1/harrypotter, Y1/jamespotter] Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
18. 18. Resolution (First Order Logic)3016 Example for FOL Resolution: Knowledge Base: 1. {¬human(X), parent_of(f(X),X)} 2. {(¬orphan(X1), human(X1)} 3. {¬orphan(X1), ¬parent_of(Y1,X1),¬alive(Y1))} 4. {(orphan(X2), ¬human(X2), parent_of(g(X,X1,Y1,X2),X2)} 5. {orphan(X2), ¬human(X2), alive(g(X,X1,Y1,X2))} 6. {orphan(harrypotter)} 7. {parent_of(jamespotter,harrypotter)} 8. {alive(jamespotter)} Entailed Clauses: 9. {¬orphan(harrypotter), ¬alive(jamespotter)} (3,7) 10. {¬orphan(harrypotter)} (8,9) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
19. 19. Resolution (First Order Logic)3017 Example for FOL Resolution: Knowledge Base: 1. {¬human(X), parent_of(f(X),X)} 2. {(¬orphan(X1), human(X1)} 3. {¬orphan(X1), ¬parent_of(Y1,X1),¬alive(Y1))} 4. {(orphan(X2), ¬human(X2), parent_of(g(X,X1,Y1,X2),X2)} 5. {orphan(X2), ¬human(X2), alive(g(X,X1,Y1,X2))} 6. {orphan(harrypotter)} 7. {parent_of(jamespotter,harrypotter)} 8. {alive(jamespotter)} Entailed Clauses: 9. {¬orphan(harrypotter), ¬alive(jamespotter)} (3,7) 10. {¬orphan(harrypotter)} (8,9) 11. ⊥ (6,10) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
20. 20. Resolution (First Order Logic)3018 Properties of FOL Resolution ■ Completeness of Refutation □ If resolution is applied to a contradictory set of clauses, then there exists a ﬁnite number of resolution steps to detect the contradiction. □ The number n of necessary steps can be very large (not efﬁcient) □ Resolution in FOL is undecidable □ If the set of clauses is not contradictory, then the termination of the resolution is not guaranteed. Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
21. 21. 19 09 Tableaux AlgorithmOpen HPI - Course: Semantic Web Technologies - Lecture Potsdam Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität 4: Knowledge Representations I