1 / 31

Existential Graphs and Davis-Putnam

Existential Graphs and Davis-Putnam. April 3, 2002 Bram van Heuveln Department of Cognitive Science. Overview. Automated Theorem Proving Resolution Strategies Davis-Putnam Existential Graphs Representation and Rules Applying Davis-Putnam to EG: EGDP Advantages of EGDP over DP.

latona
Télécharger la présentation

Existential Graphs and Davis-Putnam

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. Existential Graphs and Davis-Putnam April 3, 2002 Bram van Heuveln Department of Cognitive Science

  2. Overview • Automated Theorem Proving • Resolution • Strategies • Davis-Putnam • Existential Graphs • Representation and Rules • Applying Davis-Putnam to EG: EGDP • Advantages of EGDP over DP

  3. Automated Theorem Proving • In ATP, one tries to come up with procedures that check whether some statement  (the conclusion, or theorem) logically follows from (is logically entailed by; is a logical consequence of) a set of statements  = {1 , , n} (the premises, or axioms). • In this definition, ‘logically’ means ‘according to some system of logic’. Here, we will restrict ourselves to the system of truth-functional logic.

  4. Logical Entailment and Logical Consistency • Logical Entailment: • A statement  is a logical consequence of a set of statements  = {1, …, n} if and only if it is impossible for  to be false while each i is true. We write this as  |=  • Logical Consistency: • A set of statements  = {1, …, n} is logically consistent if and only if it is possible for each i to be true. • So, a statement  is logically entailed by a set of statements {1, …, n} if and only if the set {1, …, n, } is logically inconsistent. • Therefore, a decision procedure for logical entailment can be used as a decision procedure for logical consistency, and vice versa. For this reason, we’ll concentrate on procedures that test for logical consistency.

  5. Decision Procedures • A procedure P that checks for logical consistency is called a decision procedure if and only if for any set of statements : • (P is a positive test) P declares that  is logically consistent if and only if  is indeed logically consistent. • (P is a negative test) P declares that  is not logically consistent if and only if  is indeed not logically consistent • these two properties are crucially different, since not declaring that something is the case is not the same as declaring that something is not the case. E.g. consider P going into an infinite loop

  6. Resolution • Resolution is a popular method to check for the logical consistency of a set of statements. • Resolution requires all sentences to be put into Conjunctive Normal Form (CNF). • A set of sentences in CNF is then made into a clause set: a set of clauses, where a clause is a set of literals. • Clauses are resolved using the resolution rule, and the resulting clause (the resolvent) is added to the clause set: L  C1 L’  C2 CNEW = C1/L  C2/L’

  7. Putting into CNF  (Equiv) (P  Q) ((P  Q)  (Q  P))  (Impl) ((P  Q)  (Q  P))  (DeM) (P  Q)  (Q  P)  (DeM, DN) (P  Q)  (Q  P)  (Dist) ((P  Q)  Q)  ((P  Q)  P)  (Dist) (P  Q)  (Q  Q) (P  P) (Q  P)

  8. Resolution Graph (P  Q) (Q  R) (P  R)    (P  Q)  (P  Q) (Q  R)  (Q  R) (P  R)  (P  R)    {P, Q} {P, Q} {Q, R} {Q, R} {P, R} {P, R} {P, R} {P, Q} {P} {P} {}

  9. Soundness and Completeness of Resolution • A clause is satisfied by a truth-value assignment if and only if that assignment makes at least one literal in that clause true. • A clause set is satisfiable if and only if there is a truth-value assignment that satisfies all clauses in that clause set. • A set of sentences is inconsistent if and only if the corresponding clause set is unsatisfiable. • It can be shown that a clause set is unsatisfiable if and only if the empty clause (which is a generalized disjunction of 0 disjuncts, which is a contradiction) can be resolved from that clause set.

  10. Resolutions as Derivations 1. {A, B} A  (B  C)  (A  B)  (A  C)  {A, C} 2. {A, D, E} 3. (A  B)  (D  E) (A  D  E)  (B  D  E)  {B, D, E} 4.   E  {E} 5. (A  B)  (D  E)  (A B)  (D  E) A  {A} 6. (C  D)  C  D  {C, D} 7. {B} 1,6 8. {C} 2,6 9. {D, E} 4,8 10. {D} 5,10 11. {D} 7,9 12. {} 11,12 13.

  11. Resolutions as Decision Procedures • While resolution is complete (I.e. the empty clause can always be resolved from an unsatisfiable clause set), we don’t have a decision procedure yet, since we don’t have an algorithm that tells us which clauses to resolve at any point. • Now, resolution can be made into a decision procedure by systematically exhausting all possible resolvents (of which there are finitely many). • This will not be very efficient unless we add some resolution strategies.

  12. Resolution Strategies • Clause Elimination Strategies • Tautology Elimination • Subsumption Elimination • Pure Literal Elimination • Resolving Strategies • Unit Preference Resolution • Etc.

  13. Tautology Elimination • A tautologous clause is a clause that contains an atomic statement as well as the negation of that atomic statement. • Obviously, for any tautologous clause C, any truth-value assignment is going to satisfy C. • Hence, with S any clause set, and with S’ the clause set S with all tautologous clauses removed: S is satisfiable if and only if S’ is satisfiable.

  14. Subsumption Elimination • A clause C1subsumes a clause C2 if and only if every literal contained in C1 is contained in C1, i.e. C1 C2. • Obviously, if C1 subsumes C2 , then any truth-value assignment that satisfies C1 will satisfy C2. • Hence, with S any clause set, and S’ the clause set S with all subsumed clauses removed: S is satisfiable if and only if S’ is satisfiable.

  15. Pure Literal Elimination • The complement L’ of any literal L is the literal that is the negation of L (e.g. P and ~P are each other’s complement) • A literal L is pure with regard to a clause set S if and only if L is contained in at least one clause in S, but its complement L’ is not. • A clause is pure with regard to a clause set S if and only if it contains a pure literal. • Obviously, with S any clause set, and with S’ the clause set S with all pure clauses removed: S is satisfiable if and only if S’ is satisfiable.

  16. Unit Preference Resolution • A unit clause is a clause that contains one literal (e.g. C = {P} is unit clause) • Unit preference resolution tries to resolve using unit clauses first.

  17. Unit Literal Deletion and Splitting • For any clause set S, SL is the clause set that is generated from S as follows: • Remove all clauses from S that contain L. • Remove all instances of L’ from all other clauses • Obviously, with C = {L}  S, S is satisfiable if and only if SL is satisfiable. • It is also easy to see that for any clause set S, and any literal L: S is satisfiable if and only if SL is satisfiable or SL’ is satisfiable. • The last observation suggests a splitting strategy that forms the basis of Davis-Putnam.

  18. Davis-Putnam • Where S is clause set, recursive routine Satisfiable(S) returns true iff S is satisfiable: boolean Satisfiable(S) begin if S = {} return true; if S = {{}} return false; select L  lit(S); return Satisfiable(SL) || Satisfiable(SL’); end

  19. Making Davis-Putnam Efficient: Adding Bells and Whistles • The base DP routine on the previous slide is a decision procedure, but not very efficient. However, we can easily make it more efficient: • return false as soon as {}S • add the unit rule: if {L}S return Satisfiable(SL) • strategically add deletion strategies • strategically choose the literal on which to split • As far as I have gathered from the ATP literature, such efficient Davis-Putnam routines are credited to do well in comparison to other ATP routines.

  20. Symbolization in EG Symbolization in EG Expression in PL P P  ~         

  21. Inference Rules in EG       Double Cut            (De)Iteration   Erasure    2k 1 2k 1     Insertion  2k+1 1 2k+1 1

  22. Unit Rule for EG • Where L is a literal graph, and  any graph, the procedure Unit(L, ), returns the graph  with all occurrences of L removed, and with all complements of L replaced with the empty cut. Again, we’ll write this as L.

  23. Example Unit Rule A E D E With G = GE’ = A D

  24. Satisfiability Decision Procedure for EG boolean Satisfiable(G) begin if G = return true; if G = return false; if G =   return Satisfiable(   ); if G =    return Satisfiable(   ); L  return Satisfiable(L); if G = return if G = 1 2  Satisfiable( 1  2  ); ) || Satisfiable( end

  25. Satisfiability Example E A C D A B C C D ) = Sat( ) = B C Sat( A B D E B D B C Sat( C D B D ) = Sat( D D ) = Sat( ) = False

  26. Adding Bells and Whistles • Again, this procedure can be made a lot more efficient by dealing with empty cuts, double cuts, and duplicates more efficiently, by various other tautology, subsumption, and pure literal deletion strategies, and by strategically picking the subgraph on which to split.

  27. Tautology Elimination in EG • Any subgraph of the following form is a tautology, and can therefore be eliminated: 

  28. Subsumption Elimination in EG   If a graph of the form: exists at a nested level with regard to:  then the first graph is said to be subsumed by the second (subsuming) graph, and can therefore be removed.

  29. Pure-Literal Elimination in EG • A literal that exists at even levels only is said to be a pure literal, and can be eliminated for satisfiability purposes. • A literal that exists at odd levels only is also a pure literal, and can be replaced with the empty cut for satisfiability purposes.

  30. Advantage of EGDP over DP • The advantages of EGDP over DP is that there is no need to put statements into clauses. This not only improves efficiency in that this preliminary step can eliminated, but by avoiding clauses, the algorithm actually becomes inherently more efficient in that 1) it leaves statements compact, and 2) it eliminates literals at any level.

  31. Example: Gaining Efficiency by Avoiding Clauses A B B Clausifying DE (2x!) DC (2x!) A B C C A C No Clausifying! DE DC A B C A B C B C So, by keeping statements compact, less steps need to be taken!

More Related