1 / 90

Matrices, connections, matings and reasoning: The connection method

Matrices, connections, matings and reasoning: The connection method. Fred Freitas Centro de Informática, UFPE, Brazil KR & KM Group, Universität Mannheim, Germany Seminar presented at the KI Colloquium, Mannheim, in Jan.22.2010. Summary. Matrices and Normal Forms in ATP Proofs in Matrices

afya
Download Presentation

Matrices, connections, matings and reasoning: The connection method

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Matrices, connections, matings and reasoning: The connection method Fred Freitas Centro de Informática, UFPE, Brazil KR & KM Group, Universität Mannheim, Germany Seminar presented at the KI Colloquium, Mannheim, in Jan.22.2010

  2. Summary • Matrices and Normal Forms in ATP • Proofs in Matrices • The Connection Method • Extension Procedure, General Extension Procedure • Comparison with Other Methods • Tableaux, Consolution, Resolution, Model Elimination • Quick view on Improvements & Variants • Conclusions & Future Work

  3. Summary • Matrices and Normal Forms in ATP • Proofs in Matrices • The Connection Method • Extension Procedure, General Extension Procedure • Comparison with Other Methods • Tableaux, Consolution, Resolution, Model Elimination • Quick view on Improvements & Variants • Conclusions & Future Work

  4. Matrices and ATP • Prawitz [1960, 1970] proposed the use of matrices to express logical formulae • Proving is path verification • Example in DNF: F: (¬P ^ Q ^ R) v (¬Q ^ ¬R) v (P ^ Q)

  5. Matrices and ATP • Prawitz [1960, 1970] proposed the use of matrices to express logical formulae • Proving is path verification • Example in DNF: F: (¬P ^ Q ^ R) v (¬Q ^ ¬R) v (P ^ Q) • Same formula negated, in CNF, to be used in refutation proofs: ¬F: (P v ¬Q v ¬R) ^ (Q v R) ^ (¬P v ¬Q)

  6. Matrices and ATP • Prawitz [1960, 1970] proposed the use of matrices to express logical formulae • Proving is path verification • Example in DNF: F: (¬P ^ Q ^ R) v (¬Q ^ ¬R) v (P ^ Q) • Same formula negated, in CNF, to be used in refutation proofs: ¬F: (P v ¬Q v ¬R) ^ (Q v R) ^ (¬P v ¬Q) ¬P ¬Q P P ¬Q ¬R FDNF: Q ¬R Q ¬ FCNF : Q R R ¬P ¬Q

  7. Example of Horn Formula • FDNF : P v (¬P ^ Q) v (¬Q ^ R) v ¬R • FDNF : P ¬P ¬Q ¬R Q R • ¬FCNF : ¬P P ¬Q Q ¬R R

  8. Changing the Perspective… • FDNF : P v (¬P ^ Q) v (¬Q ^ R) v ¬R • Vertically : P ¬P ¬Q ¬R Q R • And horizontally?

  9. Changing the Perspective… • FDNF : P v (¬P ^ Q) v (¬Q ^ R) v ¬R • Vertically : P ¬P ¬Q ¬R Q R • And horizontally? • Paths! • {P, ¬P, ¬Q, ¬R} • {P, ¬P, R, ¬R} • {P, Q, ¬Q, ¬R} • {P, Q, R, ¬R} • What do they mean w.r.t. to the original DNF formula?

  10. The Set of Paths are • The set of paths is the formula in CNF! See: • FDNF : P v (¬P ^ Q) v (¬Q ^ R) v ¬R • {P, ¬P, ¬Q, ¬R} • {P, ¬P, R, ¬R} P ¬P ¬Q ¬R • {P, Q, ¬Q, ¬R} Q R • {P, Q, R, ¬R}

  11. The Set of Paths are • The set of paths is the formula in CNF! See: • FDNF : P v (¬P ^ Q) v (¬Q ^ R) v ¬R • {P, ¬P, ¬Q, ¬R} • {P, ¬P, R, ¬R} P ¬P ¬Q ¬R • {P, Q, ¬Q, ¬R} Q R • {P, Q, R, ¬R} • FCNF(not negated!) : • (P v ¬P v ¬Q v ¬R) ^ • (P v ¬P v R v ¬R) ^ • (P v Q v ¬Q v ¬R) ^ • (P v Q v R v ¬R)

  12. The Set of Paths are • The set of paths is the formula in CNF! See: • FDNF : P v (¬P ^ Q) v (¬Q ^ R) v ¬R • {P, ¬P, ¬Q, ¬R} • {P, ¬P, R, ¬R} P ¬P ¬Q ¬R • {P, Q, ¬Q, ¬R} Q R • {P, Q, R, ¬R} • FCNF(not negated!) : • (P v ¬P v ¬Q v ¬R) ^ • (P v ¬P v R v ¬R) ^ • (P v Q v ¬Q v ¬R) ^ • (P v Q v R v ¬R) How to prove it valid then?

  13. Summary • Matrices and Normal Forms in ATP • Proofs in Matrices • The Connection Method • Extension Procedure, General Extension Procedure • Comparison with Other Methods • Tableaux, Consolution, Resolution, Model Elimination • Quick view on Improvements & Variants • Conclusions & Future Work

  14. Validity in DNF Matrices • ╞ P ¬P ¬Q ¬R ? Q R • In other words, a formula in DNF is valid • when every path is valid (true)! • When is a path true?

  15. Validity in DNF Matrices • ╞ P ¬P ¬Q ¬R ? Q R • In other words, a formula in DNF is valid • when every path is valid (true)! • When is a path true? • When it contains a complimentary pair of literals (P v ¬P, or unifiable predicates, for FOL), a connection: • {P, ¬P, ¬Q, ¬R} • {P, ¬P, R, ¬R} • {P, Q, ¬Q, ¬R} • {P, Q, R, ¬R}

  16. Concepts • Connection: subset of paths formed by complimentary literals ( {P, ¬P} ) • Mating: set of connections • A Matrix (or formula) is spanning or complimentary when every path contains at least one connection • A Matrix (or formula) is valid iff it has a spanning mating

  17. Summary • Matrices and Normal Forms in ATP • Proofs in Matrices • The Connection Method • Extension Procedure, General Extension Procedure • Comparison with Other Methods • Tableaux, Consolution, Resolution, Model Elimination • Quick view on Improvements & Variants • Conclusions & Future Work

  18. The Connection Calculus P ¬P ¬Q ¬R Q Q R R Extension Procedure

  19. The Connection Calculus P ¬P ¬Q ¬R Q Q R R Extension Procedure .

  20. The Connection Calculus P ¬P ¬Q ¬R Q Q R R Extension Procedure .

  21. The Connection Calculus P ¬P ¬Q ¬R Q Q R R Extension Procedure . .

  22. The Connection Calculus P ¬P ¬Q ¬R Q Q R R Extension Procedure . . .

  23. The Connection Calculus P ¬P ¬Q ¬R Q Q R R Extension Procedure . . .

  24. The Connection Calculus P ¬P ¬Q ¬R Q Q R R Extension Procedure . .

  25. The Connection Calculus P ¬P ¬Q ¬R Q Q R R Extension Procedure . . .

  26. The Connection Calculus P ¬P ¬Q ¬R Q Q R R The Extension Procedure is sound For Horn clauses, complete and linear [Bibel 87] . .

  27. Active Paths P ¬P ¬Q ¬R Q Q R ¬Q R Extension Procedure . . .

  28. Active Paths P ¬P ¬Q ¬R Q Q R ¬Q R Extension Procedure with active paths . . . .

  29. Separation Step P ¬P ¬Q Q Q ¬P ¬R R R X . .

  30. Separation Step P ¬P ¬Q Q Q ¬P ¬R R R X Even if X was replaced by ¬Q… . .

  31. Separation Step P ¬P ¬Q Q Q ¬P ¬R R R X Even if X was replaced by ¬Q… . .

  32. Separation Step P ¬P ¬Q Q Q ¬P ¬R R R X This type of matrices can only be complimentary iff the remaining matrices are complimentary and subsume all active paths from the original matrices . .

  33. Separation Step P ¬P ¬Q Q Q ¬P ¬R R R X The algorithm then should exchange the current clause – not difficult to implement. By doing so it can find the complimentary submatrix implicitly. . .

  34. Separation Step P ¬P ¬Q Q Q ¬P ¬R R R X General Extension Procedure = Extension Procedure + Active paths + Separation • Sound and Complete for Propositional Logic . . . . . . . .

  35. Implementation • For enabling a fast search of complimentary literals either • Clauses are stored ordering literals or • An extra copy of the matrix is needed as an index to store the clauses where each literal occurs • Different selection of literals in each step may drastically change the number of steps for a proof • Therefore, they are not easy to predict • Many improvements are available for this

  36. CM without Matrices n(N(n)^S(n,t)R(n,t))^n(N(n)^R(n,t)O(n))^N(c)^O(c)S(c,t)

  37. CM without Matrices n(N(n)^S(n,t)R(n,t))^n(N(n)^R(n,t)O(n))^N(c)^O(c)S(c,t) (S(c,t)R(c,t))^(R(c,t)O(n))^O(c)S(c,t)

  38. CM without Matrices n(N(n)^S(n,t)R(n,t))^n(N(n)^R(n,t)O(n))^N(c)^O(c)S(c,t) (S(c,t)O(n))^O(c)S(c,t)

  39. CM without Matrices n(N(n)^S(n,t)R(n,t))^n(N(n)^R(n,t)O(n))^N(c)^O(c)S(c,t)

  40. CM without Matrices n(N(n)^S(n,t)R(n,t))^n(N(n)^R(n,t)O(n))^N(c)^O(c)S(c,t) (S(c,t)O(n))^O(c)S(c,t) Contraposition: if S(c,t)  O(c) then ¬O(c)  ¬S(c,t)

  41. Summary • Matrices and Normal Forms in ATP • Proofs in Matrices • The Connection Method • Extension Procedure, General Extension Procedure • Comparison with Other Methods • Tableaux, Consolution, Resolution, Model Elimination • Quick view on Improvements & Variants • Conclusions & Future Work

  42. CM vs Tableaux ¬ F: (¬P v ¬Q) ^ (P v ¬Q v ¬R) ^ (Q v ¬R) ^ R R P ¬P ¬Q ¬R Q Q R Q ¬R R ■ P ¬Q ¬ R ■ ■ ¬P ¬Q ■ ■ . . .

  43. Connection Method: Proofs are only clear in the CM version without matrices The version without matrices require no normal form, but this is not common Direct formulae Less Memory: CM requires only a matrix and a data structure linked to it Search is much more efficient, due to the in situ path search Tableaux: Tableaux proofs are clearer, both logically and procedurally Tableaux do not require normal form Negated formulae Memory for the generated paths Usually requires more (redundant) paths due to the spreading of formulae CM vs Tableaux [Smullyan 71]

  44. Model Elimination [Loveland 69] (¬P v ¬Q) (Pv¬Qv ¬R) (Q v ¬R) R

  45. Model Elimination [Loveland 69] P (¬P v ¬Q) (Pv¬Qv ¬R) (Q v ¬R) R

  46. Model Elimination [Loveland 69] P (¬P v ¬Q) 0  Decision (Pv¬Qv ¬R) (Q v ¬R) R

  47. Model Elimination [Loveland 69] P (¬P v ¬Q) 0  Decision (Pv¬Qv ¬R) (Q v¬R) Q R 0  Decision (Q ^ ¬R) Conflict! Implication Graph R

  48. Model Elimination [Loveland 69] P (¬P v ¬Q) 0  Decision (Pv¬Qv ¬R) (Q v ¬R) Q R 0  Decision  Backtrack (Q ^ ¬R) Conflict! Implication Graph R

  49. Model Elimination [Loveland 69] P (¬P v ¬Q) 0 (Pv¬Q v¬R) (Q v¬R) Q R  Forced Decision 0 1 (P^¬Q ^ ¬R)) Conflict! Implication Graph R

  50. Model Elimination [Loveland 69] P (¬P v ¬Q) 0  Forced Decision 1 (Pv¬Q v¬R) (Q v ¬R) Q Q R 0 1

More Related