Download presentation
Presentation is loading. Please wait.
Published byMorgan Caldwell Modified over 9 years ago
1
1 Example: The following knowledge is given :The following knowledge is given : 1. Marcus was a man. 2. Marcus was a Pompeian. 3. All Pompeians were Romans. 4. Caesar was a ruler. 5. All Romans were either loyal to Caesar or hated him. 6. Everyone is loyal to someone. 7. People only try to assassinate rulers to whom they are not loyal. 8. Marcus tried to assassinate Caesar. Can we automatically answer the following questions?Can we automatically answer the following questions? Was Marcus loyal to Caesar? Was Marcus loyal to Caesar? Did Marcus hate Caesar? Did Marcus hate Caesar?
2
2 Conversion to the First Order Logic: Representation of facts:Representation of facts: 1. Marcus was a man. man(Marcus) 2. Marcus was a Pompeian. Pompeian(Marcus) 4. Caesar was a ruler. ruler(Caesar) 8. Marcus tried to assassinate Caesar. try_assassinate(Marcus, Caesar)
3
3 5. All Romans were either loyal to Caesar or hated him. Conversion to the First Order Logic (2): General representation (representation of rules):General representation (representation of rules): 3. All Pompeians were Romans. x Pompeian(x) Roman(x) 6. Everyone is loyal to someone. x y loyal_to(x,y) 7. People only try to assassinate rulers to whom they are not loyal. x y person(x) ruler(y) try_assassinate(x,y) ~loyal_to(x,y) ( ) ( ) ~(loyal_to(x,Caesar) hates(x,Caesar)) XOR x Roman(x) loyal_to(x,Caesar) hates(x,Caesar)
4
4 Prove that he did: The “theorem” ? Was Marcus loyal to Caesar? Did Marcus hate Caesar? hates(Marcus,Caesar) Try, for example, to prove that he was not : ~loyal_to(Marcus,Caesar)
5
5 A proof using backward-reasoning problem- reduction: ~loyal_to(Marcus,Caesar) x y person(x) ruler(y) try_assassinate(x,y) ~loyal_to(x,y) + substitution: x/Marcus y/Caesar y/Caesar person(Marcus) ruler(Caesar) try_assassi- nate(Marcus,Caesar) ~loyal_to(Marcus,Caesar) + Modus ponens person(Marcus) ruler(Cesar) AND try_assassinate(Marcus, Caesar) Done! 4. Done! 8. Extra rule: x man(x) person(x) person(x) man(Marcus) Done!1.
6
6 Marcus example: RESOLUTION x y ~(man(x) ruler(y) try_assassinate(x,y)) ~loyal_to(x,y) x y ~man(x) ~ruler(y) ~try_assassinate(x,y) ~loyal_to(x,y) false man(x) ruler(y) try_assassinate(x,y) loyal_to(x,y) x loyal_to(x,f(x)) loyal_to(x,f(x)) Facts 1., 2., 4. and 8. were already o.k.:Facts 1., 2., 4. and 8. were already o.k.: – ex.: ruler(Caesar) 3. x Pompeian(x) Roman(x) : o.k. !3. x Pompeian(x) Roman(x) : o.k. ! 6. x y loyal_to(x,y)6. x y loyal_to(x,y) 7. x y man(x) ruler(y) try_assassinate(x,y) ~loyal_to(x,y)7. x y man(x) ruler(y) try_assassinate(x,y) ~loyal_to(x,y)
7
7 Axioms in Normal form: 1. man(Marcus) 2. Pompeian(Marcus) 3. Roman(x) Pompeian(x) 4. ruler(Caesar) 5. loyal_to(x,Caesar) hates(x,Caesar) Roman(x) 6. loyal_to(x,f(x)) 7. false man(x) ruler(y) try_assassinate(x,y) loyal_to(x,y) 8. try_assassinate(Marcus,Caesar) To show: hates(Marcus,Caesar) Negation: ~hates(Marcus,Caesar) Normal Form: false hates(Marcus,Caesar)
8
8 Resolution proof (1): false hates(Marcus,Caesar) loyal_to(x,Caesar) hates(x,Caesar) Roman(x) loyal_to(Marcus,Caesar) Roman(Marcus) {x/Marcus}5. Roman(x) Pompeian(x) loyal_to(Marcus,Caesar) Pompeian(Marcus) {x/Marcus}3. Pompeian(Marcus) loyal_to(Marcus,Caesar) {}2.
9
9 Resolution proof (2) loyal_to(Marcus,Caesar) false man(x) ruler(y) try_assassinate(x,y) loyal_to(x,y) false man(Marcus) ruler(Caesar) try_assassinate(Marcus,Caesar) 7.{x/Marcus,y/Caesar} man(Marcus) false ruler(Caesar) try_assassinate(Marcus,Caesar) 1. {} ruler(Caesar) false try_assassinate(Marcus,Caesar) 4.{} try_assassinate(Marcus,Caesar) false 8.{}
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.