Upcoming SlideShare
×

# OpenHPI 4.6 - Canonical Form

806 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
806
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
63
0
Likes
0
Embeds 0
No embeds

No notes for slide

### OpenHPI 4.6 - Canonical Form

1. 1. Semantic Web TechnologiesLecture 4: Knowledge Representations I 06: Canonical Form 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 06 Canonical FormOpen HPI - Course: Semantic Web Technologies - Lecture Potsdam Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität 4: Knowledge Representations I
4. 4. Logical Equivalences ■ For every formula there exist inﬁnitely many logically304 equivalent formulas. F∧G≡G∧F F∨G≡G∨F F → G ≡ ¬F ∨ G F ↔ G ≡ (F → G) ∧ (G → F) ¬(F ∧ G) ≡ ¬F ∨ ¬G ¬(F ∨ G) ≡ ¬F ∧ ¬G ¬¬F ≡ F F ∨ (G ∧ H) ≡ (F ∨ G) ∧ (F ∨ H) F ∧ (G ∨ H) ≡ (F ∧ G) ∨ (F ∧ H) ¬(∀X) F ≡ (∃X) ¬F ¬(∃X) F ≡ (∀X) ¬F (∀X)(∀Y) F ≡ (∀Y)(∀X) F (∃X)(∃Y) F ≡ (∃Y)(∃X) F (∀X) (F ∧ G) ≡ (∀X) F ∧ (∀X) G (∃X) (F ∨ G) ≡ (∃X) F ∨ (∃X) G Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
5. 5. Logical Equivalences305 F∧G≡G∧F ¬(∀X) F ≡ (∃X) ¬F F∨G≡G∨F ¬(∃X) F ≡ (∀X) ¬F F → G ≡ ¬F ∨ G (∀X)(∀Y) F ≡ (∀Y)(∀X) F F ↔ G ≡ (F → G) ∧ (G → F) (∃X)(∃Y) F ≡ (∃Y)(∃X) F ¬(F ∧ G) ≡ ¬F ∨ ¬G (∀X) (F ∧ G) ≡ (∀X) F ∧ (∀X) G ¬(F ∨ G) ≡ ¬F ∧ ¬G (∃X) (F ∨ G) ≡ (∃X) F ∨ (∃X) G ¬¬F ≡ F F∧t≡F F∧f≡f F ∧ ¬F = f F ∨ ¬F = t F∨t≡t F∨f≡F F ∨ (G ∧ H) ≡ (F ∨ G) ∧ (F ∨ H) F ∧ (G ∨ H) ≡ (F ∧ G) ∨ (F ∧ H) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
6. 6. Logical Equivalences305 F∧G≡G∧F ¬(∀X) F ≡ (∃X) ¬F F∨G≡G∨F ¬(∃X) F ≡ (∀X) ¬F F → G ≡ ¬F ∨ G (∀X)(∀Y) F ≡ (∀Y)(∀X) F F ↔ G ≡ (F → G) ∧ (G → F) (∃X)(∃Y) F ≡ (∃Y)(∃X) F ¬(F ∧ G) ≡ ¬F ∨ ¬G (∀X) (F ∧ G) ≡ (∀X) F ∧ (∀X) G ¬(F ∨ G) ≡ ¬F ∧ ¬G (∃X) (F ∨ G) ≡ (∃X) F ∨ (∃X) G ¬¬F ≡ F F∧t≡F F∧f≡f F ∧ ¬F = f F ∨ ¬F = t F∨t≡t F∨f≡F F ∨ (G ∧ H) ≡ (F ∨ G) ∧ (F ∨ H) F ∧ (G ∨ H) ≡ (F ∧ G) ∨ (F ∧ H) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
7. 7. Logical Equivalences305 F∧G≡G∧F ¬(∀X) F ≡ (∃X) ¬F F∨G≡G∨F ¬(∃X) F ≡ (∀X) ¬F F → G ≡ ¬F ∨ G (∀X)(∀Y) F ≡ (∀Y)(∀X) F F ↔ G ≡ (F → G) ∧ (G → F) (∃X)(∃Y) F ≡ (∃Y)(∃X) F ¬(F ∧ G) ≡ ¬F ∨ ¬G (∀X) (F ∧ G) ≡ (∀X) F ∧ (∀X) G ¬(F ∨ G) ≡ ¬F ∧ ¬G (∃X) (F ∨ G) ≡ (∃X) F ∨ (∃X) G ¬¬F ≡ F F∧t≡F F∧f≡f F ∧ ¬F = f F ∨ ¬F = t F∨t≡t F∨f≡F F ∨ (G ∧ H) ≡ (F ∨ G) ∧ (F ∨ H) F ∧ (G ∨ H) ≡ (F ∧ G) ∨ (F ∧ H) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
8. 8. Logical Equivalences305 F∧G≡G∧F ¬(∀X) F ≡ (∃X) ¬F F∨G≡G∨F ¬(∃X) F ≡ (∀X) ¬F F → G ≡ ¬F ∨ G (∀X)(∀Y) F ≡ (∀Y)(∀X) F Augustus De Morgan (∃X)(∃Y) F ≡ (∃Y)(∃X) F (1806-1871) F ↔ G ≡ (F → G) ∧ (G → F) ¬(F ∧ G) ≡ ¬F ∨ ¬G (∀X) (F ∧ G) ≡ (∀X) F ∧ (∀X) G ¬(F ∨ G) ≡ ¬F ∧ ¬G (∃X) (F ∨ G) ≡ (∃X) F ∨ (∃X) G ¬¬F ≡ F F∧t≡F F∧f≡f F ∧ ¬F = f F ∨ ¬F = t F∨t≡t F∨f≡F F ∨ (G ∧ H) ≡ (F ∨ G) ∧ (F ∨ H) F ∧ (G ∨ H) ≡ (F ∧ G) ∨ (F ∧ H) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
9. 9. Logical Equivalences305 F∧G≡G∧F ¬(∀X) F ≡ (∃X) ¬F F∨G≡G∨F ¬(∃X) F ≡ (∀X) ¬F F → G ≡ ¬F ∨ G (∀X)(∀Y) F ≡ (∀Y)(∀X) F Augustus De Morgan (∃X)(∃Y) F ≡ (∃Y)(∃X) F (1806-1871) F ↔ G ≡ (F → G) ∧ (G → F) ¬(F ∧ G) ≡ ¬F ∨ ¬G (∀X) (F ∧ G) ≡ (∀X) F ∧ (∀X) G ¬(F ∨ G) ≡ ¬F ∧ ¬G (∃X) (F ∨ G) ≡ (∃X) F ∨ (∃X) G ¬¬F ≡ F F∧t≡F F∧f≡f F ∧ ¬F = f F ∨ ¬F = t F∨t≡t F∨f≡F F ∨ (G ∧ H) ≡ (F ∨ G) ∧ (F ∨ H) F ∧ (G ∨ H) ≡ (F ∧ G) ∨ (F ∧ H) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
10. 10. Logical Equivalences305 F∧G≡G∧F ¬(∀X) F ≡ (∃X) ¬F F∨G≡G∨F ¬(∃X) F ≡ (∀X) ¬F F → G ≡ ¬F ∨ G (∀X)(∀Y) F ≡ (∀Y)(∀X) F Augustus De Morgan (∃X)(∃Y) F ≡ (∃Y)(∃X) F (1806-1871) F ↔ G ≡ (F → G) ∧ (G → F) ¬(F ∧ G) ≡ ¬F ∨ ¬G (∀X) (F ∧ G) ≡ (∀X) F ∧ (∀X) G ¬(F ∨ G) ≡ ¬F ∧ ¬G (∃X) (F ∨ G) ≡ (∃X) F ∨ (∃X) G ¬¬F ≡ F F∧t≡F F∧f≡f F ∧ ¬F = f F ∨ ¬F = t F∨t≡t F∨f≡F F ∨ (G ∧ H) ≡ (F ∨ G) ∧ (F ∨ H) F ∧ (G ∨ H) ≡ (F ∧ G) ∨ (F ∧ H) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
11. 11. Logical Equivalences305 F∧G≡G∧F ¬(∀X) F ≡ (∃X) ¬F F∨G≡G∨F ¬(∃X) F ≡ (∀X) ¬F F → G ≡ ¬F ∨ G (∀X)(∀Y) F ≡ (∀Y)(∀X) F Augustus De Morgan (∃X)(∃Y) F ≡ (∃Y)(∃X) F (1806-1871) F ↔ G ≡ (F → G) ∧ (G → F) ¬(F ∧ G) ≡ ¬F ∨ ¬G (∀X) (F ∧ G) ≡ (∀X) F ∧ (∀X) G ¬(F ∨ G) ≡ ¬F ∧ ¬G (∃X) (F ∨ G) ≡ (∃X) F ∨ (∃X) G ¬¬F ≡ F F∧t≡F F∧f≡f F ∧ ¬F = f F ∨ ¬F = t F∨t≡t F∨f≡F F ∨ (G ∧ H) ≡ (F ∨ G) ∧ (F ∨ H) F ∧ (G ∨ H) ≡ (F ∧ G) ∨ (F ∧ H) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
12. 12. Logical Equivalences305 F∧G≡G∧F ¬(∀X) F ≡ (∃X) ¬F F∨G≡G∨F ¬(∃X) F ≡ (∀X) ¬F F → G ≡ ¬F ∨ G (∀X)(∀Y) F ≡ (∀Y)(∀X) F Augustus De Morgan (∃X)(∃Y) F ≡ (∃Y)(∃X) F (1806-1871) F ↔ G ≡ (F → G) ∧ (G → F) ¬(F ∧ G) ≡ ¬F ∨ ¬G (∀X) (F ∧ G) ≡ (∀X) F ∧ (∀X) G ¬(F ∨ G) ≡ ¬F ∧ ¬G (∃X) (F ∨ G) ≡ (∃X) F ∨ (∃X) G ¬¬F ≡ F F∧t≡F F∧f≡f F ∧ ¬F = f F ∨ ¬F = t F∨t≡t F∨f≡F F ∨ (G ∧ H) ≡ (F ∨ G) ∧ (F ∨ H) F ∧ (G ∨ H) ≡ (F ∧ G) ∨ (F ∧ H) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
13. 13. Logical Equivalences305 F∧G≡G∧F ¬(∀X) F ≡ (∃X) ¬F F∨G≡G∨F ¬(∃X) F ≡ (∀X) ¬F F → G ≡ ¬F ∨ G (∀X)(∀Y) F ≡ (∀Y)(∀X) F Augustus De Morgan (∃X)(∃Y) F ≡ (∃Y)(∃X) F (1806-1871) F ↔ G ≡ (F → G) ∧ (G → F) ¬(F ∧ G) ≡ ¬F ∨ ¬G (∀X) (F ∧ G) ≡ (∀X) F ∧ (∀X) G ¬(F ∨ G) ≡ ¬F ∧ ¬G (∃X) (F ∨ G) ≡ (∃X) F ∨ (∃X) G ¬¬F ≡ F F∧t≡F F∧f≡f F ∧ ¬F = f F ∨ ¬F = t F∨t≡t F∨f≡F F ∨ (G ∧ H) ≡ (F ∨ G) ∧ (F ∨ H) F ∧ (G ∨ H) ≡ (F ∧ G) ∨ (F ∧ H) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
14. 14. Logical Equivalences305 F∧G≡G∧F ¬(∀X) F ≡ (∃X) ¬F F∨G≡G∨F ¬(∃X) F ≡ (∀X) ¬F F → G ≡ ¬F ∨ G (∀X)(∀Y) F ≡ (∀Y)(∀X) F Augustus De Morgan (∃X)(∃Y) F ≡ (∃Y)(∃X) F (1806-1871) F ↔ G ≡ (F → G) ∧ (G → F) ¬(F ∧ G) ≡ ¬F ∨ ¬G (∀X) (F ∧ G) ≡ (∀X) F ∧ (∀X) G ¬(F ∨ G) ≡ ¬F ∧ ¬G (∃X) (F ∨ G) ≡ (∃X) F ∨ (∃X) G ¬¬F ≡ F F∧t≡F F∧f≡f F ∧ ¬F = f F ∨ ¬F = t F∨t≡t F∨f≡F F ∨ (G ∧ H) ≡ (F ∨ G) ∧ (F ∨ H) F ∧ (G ∨ H) ≡ (F ∧ G) ∨ (F ∧ H) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
15. 15. Logical Equivalences305 F∧G≡G∧F ¬(∀X) F ≡ (∃X) ¬F F∨G≡G∨F ¬(∃X) F ≡ (∀X) ¬F F → G ≡ ¬F ∨ G (∀X)(∀Y) F ≡ (∀Y)(∀X) F Augustus De Morgan (∃X)(∃Y) F ≡ (∃Y)(∃X) F (1806-1871) F ↔ G ≡ (F → G) ∧ (G → F) ¬(F ∧ G) ≡ ¬F ∨ ¬G (∀X) (F ∧ G) ≡ (∀X) F ∧ (∀X) G ¬(F ∨ G) ≡ ¬F ∧ ¬G (∃X) (F ∨ G) ≡ (∃X) F ∨ (∃X) G ¬¬F ≡ F F∧t≡F F∧f≡f F ∧ ¬F = f F ∨ ¬F = t F∨t≡t F∨f≡F F ∨ (G ∧ H) ≡ (F ∨ G) ∧ (F ∨ H) F ∧ (G ∨ H) ≡ (F ∧ G) ∨ (F ∧ H) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
16. 16. Commutativity and Quantiﬁers306 ■ Quantiﬁers (of the same sort) are commutative (∀X)(∀Y) F ≡ (∀Y)(∀X) F (∃X)(∃Y) F ≡ (∃Y)(∃X) F ■ But (∃X)(∀Y) F ≢ (∀Y)(∃X) F ■ Example: ■ (∃x)(∀y): loves(x,y) „There exists somebody, who loves everybody.“ ■ (∀y)(∃x): loves(x,y) „Everybody is loved by somebody.“ Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
17. 17. Canonical Form (Normal Form)307 F∧G≡G∧F F∨G≡G∨F ¬(∀X) F ≡ (∃X) ¬F F → G ≡ ¬F ∨ G ¬(∃X) F ≡ (∀X) ¬F F ↔ G ≡ (F → G) ∧ (G → F) (∀X)(∀Y) F ≡ (∀Y)(∀X) F ¬(F ∧ G) ≡ ¬F ∨ ¬G (∃X)(∃Y) F ≡ (∃Y)(∃X) F ¬(F ∨ G) ≡ ¬F ∧ ¬G (∀X) (F ∧ G) ≡ (∀X) F ∧ (∀X) G ¬¬F ≡ F (∃X) (F ∨ G) ≡ (∃X) F ∨ (∃X) G F ∨ (G ∧ H) ≡ (F ∨ G) ∧ (F ∨ H) F ∧ (G ∨ H) ≡ (F ∧ G) ∨ (F ∧ H) ■ For all of these Equivalence Classes one designates a most simple and unique representative. ■ These representatives are called Canonical Forms or Normal Forms. ■ Simple example: □ we write ¬F instead of ¬¬¬¬¬F Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
18. 18. Canonical Form (Normal Forms)30 ■ Goal: Transformation of formulas into Clausal Form.8 ■ (a∧(b∨¬c)∧(a∨d)) {a,{b,¬c},{a,d}} (Conjunctive Normal Form) (Clausal Form) ■ A Clause is a ﬁnite disjunction of literals ■ b1∨b2∨...∨bn ■ a simple clause can also written as {b1,b2,...,bn} ■ A Conjunctive Normal Form (CNF) is a conjunction of clauses ■ A Clausal Normal Form corresponds to a Conjunctive Normal Form ■ {{b1,b2,...,bn},...,{c1,c2,...,cm}} Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
19. 19. Canonical Form (Normal Forms)30 ■ Goal: Transformation of formulas into Clausal Form.9 ■ (a∧(b∨¬c)∧(a∨d)) {a,{b,¬c},{a,d}} (Conjunctive Normal Form) (Clausal Form) ■ Required Steps: 1. Negation Normal Form □ move all negations inwards 2. Prenex Normal Form □ move all quantiﬁers in front 3. Skolem Normal Form □ remove existential quantiﬁers 4. Conjunctive Normal Form (CNF) = Clausal Form □ Representation as Conjunction of Disjunctions Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
20. 20. 1. Negation Normal Form3010 ■ All negations are moved inwards via the following logical equivalences: F G ≡ (F → G)∧(G → F) ¬(F ∧ G) ≡ ¬F ∨ ¬G F → G ≡ ¬F ∨ G ¬(F ∨ G) ≡ ¬F ∧ ¬G ¬(∀X) F ≡ (∃X) ¬F ¬¬F ≡ F ¬(∃X) F ≡ (∀X) ¬F ■ Result: □ implications and equivalences are removed □ multiple negations are removed □ all negations are placed directly in front of atoms Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
21. 21. 1. Negation Normal Form3011 ■ Example ( (∀X)( penguin(X) → blackandwhite(X) ) ∧ (∃X)( oldTVshow(X) ∧ blackandwhite(X) ) ) → (∃X)( penguin(X) ∧ oldTVshow(X) ) is transformed into Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
22. 22. 1. Negation Normal Form3011 ■ Example ( (∀X)( penguin(X) → blackandwhite(X) ) ∧ (∃X)( oldTVshow(X) ∧ blackandwhite(X) ) ) → (∃X)( penguin(X) ∧ oldTVshow(X) ) is transformed into ¬( (∀X)( ¬penguin(X) ∨ blackandwhite(X) ) ∧ (∃X)( oldTVshow(X) ∧ blackandwhite(X) ) ) ∨ (∃X)( penguin(X) ∧ oldTVshow(X) ) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
23. 23. 1. Negation Normal Form3011 ■ Example ( (∀X)( penguin(X) → blackandwhite(X) ) ∧ (∃X)( oldTVshow(X) ∧ blackandwhite(X) ) ) → (∃X)( penguin(X) ∧ oldTVshow(X) ) is transformed into ¬( (∀X)( ¬penguin(X) ∨ blackandwhite(X) ) ∧ (∃X)( oldTVshow(X) ∧ blackandwhite(X) ) ) ∨ (∃X)( penguin(X) ∧ oldTVshow(X) ) is transformed into ( (∃X)( penguin(X) ∧ ¬blackandwhite(X) ) ∨ (∀X)(¬oldTVshow(X) ∨ ¬blackandwhite(X) ) ) ∨ (∃X)( penguin(X) ∧ oldTVshow(X) ) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
24. 24. 2. Prenex Normal Form3012 ■ Clean up formulas (Quantiﬁers are bound to different variables). ( (∃X)( penguin(X) ∧ ¬blackandwhite(X) ) ∨ (∀X)( ¬oldTVshow(X) ∨ ¬blackandwhite(X) ) ) ∨ (∃X)( penguin(X) ∧ oldTVshow(X) ) is transformed into ( (∃X)( penguin(X) ∧ ¬blackandwhite(X) ) ∨ (∀Y)( ¬oldTVshow(Y) ∨ ¬blackandwhite(Y) ) ) ∨ (∃Z)( penguin(Z) ∧ oldTVshow(Z) ) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
25. 25. 2. Prenex Normal Form3013 ■ Then put all Quantiﬁers from Negation Normal Form in front ( (∃X)( penguin(X) ∧ ¬blackandwhite(X) ) ∨ (∀Y)( ¬oldTVshow(Y) ∨ ¬blackandwhite(Y) ) ) ∨ (∃Z)( penguin(Z) ∧ oldTVshow(Z) ) is transformed into (∃X)(∀Y)(∃Z)( ( penguin(X) ∧ ¬blackandwhite(X) ) ∨ ( ¬oldTVshow(Y) ∨ ¬blackandwhite(Y) ) ) ∨ ( penguin(Z) ∧ oldTVshow(Z) ) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
26. 26. 3. Skolem Normal Form3014 ■ remove existential quantiﬁers (∃X) (∀Y) (∃Z) ( ( penguin(X) ∧ ¬blackandwhite(X) ) ∨ ( ¬oldTVshow(Y) ∨ ¬blackandwhite(Y) ) ) ∨ ( penguin(Z) ∧ oldTVshow(Z) ) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
27. 27. 3. Skolem Normal Form3014 ■ remove existential quantiﬁers (∃X) (∀Y) (∃Z) ( ( penguin(X) ∧ ¬blackandwhite(X) ) ∨ ( ¬oldTVshow(Y) ∨ ¬blackandwhite(Y) ) ) ∨ ( penguin(Z) ∧ oldTVshow(Z) ) is transformed into (∀Y)( ( penguin(a) ∧ ¬blackandwhite(a) ) ∨ ( ¬oldTVshow(Y) ∨ ¬blackandwhite(Y) ) ) ∨ ( penguin( f(Y) ) ∧ oldTVshow( f(Y) ) ) ■ where a and f are new symbols (so called Skolem Constant or Skolem Function). Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
28. 28. 3. Skolem Normal Form3015 ■ How To: 1. Remove Existential Quantiﬁers from left to right. 2. If there is no Universal Quantiﬁer left of the existential quantiﬁer to be removed, then the according variable is substituted by a new Constant Symbol. 3. If there are n Universal Quantiﬁers left of the existential quantiﬁer to be removed, then the according variable is substituted with a new Function Symbol with arity n, whose arguments are exactely the Variables of the n Universal Quantiﬁers. Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
29. 29. 3. Skolem Normal Form3016 ■ remove existential quantiﬁers (∃X) (∀Y) (∃Z) ( ( penguin(X) ∧ ¬blackandwhite(X) ) ∨ ( ¬oldTVshow(Y) ∨ ¬blackandwhite(Y) ) ) ∨ ( penguin(Z) ∧ oldTVshow(Z) ) is transformed into (∀Y)( ( penguin(a) ∧ ¬blackandwhite(a) ) ∨ ( ¬oldTVshow(Y) ∨ ¬blackandwhite(Y) ) ) ∨ ( penguin( f(Y) ) ∧ oldTVshow( f(Y) ) ) ■ where a and f are new symbols (so called Skolem Constant or Skolem Function). Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
30. 30. 4. Conjunctive Normal Form (Clausal Form)3017 ■ There are only Universal Quantiﬁers, therefore we can remove them: ( penguin(a) ∧ ¬blackandwhite(a) ) ∨ ( ¬oldTVshow(Y) ∨ ¬blackandwhite(Y) ) ) ∨ ( penguin(f(Y)) ∧ oldTVshow(f(Y)) ■ With the help of logical equivalences the formula is now transfomed into a Conjunction of Disjunctions. F ∨ (G ∧ H) ≡ (F ∨ G) ∧ (F ∨ H) F ∧ (G ∨ H) ≡ (F ∧ G) ∨ (F ∧ H) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
31. 31. 4. Conjunctive Normal Form (Clausal Form)3018 ( (penguin(a) ∧ ¬blackandwhite(a) ) ∨ ( ¬oldTVshow(Y) ∨ ¬blackandwhite(Y) ) ∨ ( penguin(f(Y)) ∧ oldTVshow(f(Y)) is transformed into ( penguin(a)∨¬oldTVshow(Y)∨¬blackandwhite(Y)∨penguin(f(Y)) ) ∧ ( penguin(a)∨¬oldTVshow(Y)∨¬blackandwhite(Y)∨oldTVshow(f(Y)) ) ∧ ( ¬blackandwhite(a)∨¬oldTVshow(Y)∨¬blackandwhite(Y)∨penguin(f(Y)) ) ∧ ( ¬blackandwhite(a)∨¬oldTVshow(Y)∨¬blackandwhite(Y)∨oldTVshow(f(Y)) ) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
32. 32. 4. Conjunctive Normal Form (Clausal Form)3018 ( (penguin(a) ∧ ¬blackandwhite(a) ) ∨ ( ¬oldTVshow(Y) ∨ ¬blackandwhite(Y) ) ∨ ( penguin(f(Y)) ∧ oldTVshow(f(Y)) is transformed into ( penguin(a)∨¬oldTVshow(Y)∨¬blackandwhite(Y)∨penguin(f(Y)) ) ∧ ( penguin(a)∨¬oldTVshow(Y)∨¬blackandwhite(Y)∨oldTVshow(f(Y)) ) ∧ ( ¬blackandwhite(a)∨¬oldTVshow(Y)∨¬blackandwhite(Y)∨penguin(f(Y)) ) ∧ ( ¬blackandwhite(a)∨¬oldTVshow(Y)∨¬blackandwhite(Y)∨oldTVshow(f(Y)) ) is transformed into { {penguin(a),¬oldTVshow(Y),¬blackandwhite(Y),penguin(f(Y))}, {penguin(a),¬oldTVshow(Y),¬blackandwhite(Y),oldTVshow(f(Y))}, { ¬blackandwhite(a),¬oldTVshow(Y),¬blackandwhite(Y),penguin(f(Y))}, {¬blackandwhite(a),¬oldTVshow(Y),¬blackandwhite(Y),oldTVshow(f(Y))} } Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
33. 33. Properties of Canonical Forms3019 ■ Let F be a formula, ■ G is the Prenex Normal Form of F, ■ H is the Skolem Normal Form of G, ■ K is the Clausal Form of H. ■ Then F ≡ G and H ≡ K but usually F ≢ K. ■ Nevertheless it holds, that □ F is not satisﬁable (a contradiction), if K is a contradiction. (Foundation of the Resolution) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
34. 34. 20 07 ResolutionOpen HPI - Course: Semantic Web Technologies - Lecture Potsdam Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität 4: Knowledge Representations I