Existential Graphs and Davis-Putnam April 3, 2002 Bram van Heuveln Department of Cognitive Science.

Slides:



Advertisements
Similar presentations
Completeness and Expressiveness
Advertisements

Inference Rules Universal Instantiation Existential Generalization
UIUC CS 497: Section EA Lecture #2 Reasoning in Artificial Intelligence Professor: Eyal Amir Spring Semester 2004.
Propositional and First Order Reasoning. Terminology Propositional variable: boolean variable (p) Literal: propositional variable or its negation p 
1 Logic Logic in general is a subfield of philosophy and its development is credited to ancient Greeks. Symbolic or mathematical logic is used in AI. In.
First Order Logic Resolution
Inference and Reasoning. Basic Idea Given a set of statements, does a new statement logically follow from this. For example If an animal has wings and.
Methods of Proof Chapter 7, second half.. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound)
For Friday No reading Homework: –Chapter 9, exercise 4 (This is VERY short – do it while you’re running your tests) Make sure you keep variables and constants.
Methods of Proof Chapter 7, Part II. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound) generation.
Resolution Theorem Proving
Logic CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Logic.
CPSC 422, Lecture 21Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 21 Mar, 4, 2015 Slide credit: some slides adapted from Stuart.
Logic Concepts Lecture Module 11.
Truth Trees Intermediate Logic.
Formal Logic Proof Methods Direct Proof / Natural Deduction Conditional Proof (Implication Introduction) Reductio ad Absurdum Resolution Refutation.
Proof methods Proof methods divide into (roughly) two kinds: –Application of inference rules Legitimate (sound) generation of new sentences from old Proof.
Automated Proof Generation for EG Bram van Heuveln Spring 2003 AI & Reasoning Lab, RPI.
Using Existential Graphs for Automated Theorem Proving
Formalizing Alpha: Soundness and Completeness Bram van Heuveln Dept. of Cognitive Science RPI.
Logic in Computer Science Transparency No Chapter 3 Propositional Logic 3.6. Propositional Resolution.
Methods of Proof Chapter 7, second half.
Knoweldge Representation & Reasoning
Alpha: Symbolization and Inference Bram van Heuveln Minds and Machines Lab RPI.
Chapter 3 Propositional Logic
Artificial Intelligence
Proof by Deduction. Deductions and Formal Proofs A deduction is a sequence of logic statements, each of which is known or assumed to be true A formal.
Discrete Mathematics and its Applications
CS1502 Formal Methods in Computer Science Lecture Notes 10 Resolution and Horn Sentences.
Proof Systems KB |- Q iff there is a sequence of wffs D1,..., Dn such that Dn is Q and for each Di in the sequence: a) either Di is in KB or b) Di can.
Logics for Data and Knowledge Representation Propositional Logic: Reasoning Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto.
CS 4100 Artificial Intelligence Prof. C. Hafner Class Notes Jan 19, 2012.
CHAPTERS 7, 8 Oliver Schulte Logical Inference: Through Proof to Truth.
Advanced Topics in Propositional Logic Chapter 17 Language, Proof and Logic.
Logical Agents Logic Propositional Logic Summary
1 Knowledge Representation. 2 Definitions Knowledge Base Knowledge Base A set of representations of facts about the world. A set of representations of.
Propositional Logic Dr. Rogelio Dávila Pérez Profesor-Investigador División de Posgrado Universidad Autónoma Guadalajara
Existential Graphs Intermediate Logic. Existential Graphs A graphical logic system developed by C.S. Peirce almost 100 years ago. Peirce studied semiotics:
Chapter Three Truth Tables 1. Computing Truth-Values We can use truth tables to determine the truth-value of any compound sentence containing one of.
Propositional Calculus – Methods of Proof Predicate Calculus Math Foundations of Computer Science.
Automated Theorem Proving: Resolution and Davis-Putnam Intermediate Logic.
CS Introduction to AI Tutorial 8 Resolution Tutorial 8 Resolution.
LDK R Logics for Data and Knowledge Representation Propositional Logic: Reasoning First version by Alessandro Agostini and Fausto Giunchiglia Second version.
Automated Reasoning Early AI explored how to automated several reasoning tasks – these were solved by what we might call weak problem solving methods as.
Extra slides for Chapter 3: Propositional Calculus & Normal Forms Based on Prof. Lila Kari’s slides For CS2209A, 2009 By Dr. Charles Ling;
First-Order Logic and Inductive Logic Programming.
Automated reasoning with propositional and predicate logics Spring 2007, Juris Vīksna.
CPSC 422, Lecture 21Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 21 Oct, 30, 2015 Slide credit: some slides adapted from Stuart.
© Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic.
Dr. Shazzad Hosain Department of EECS North South Universtiy Lecture 04 – Part B Propositional Logic.
1 Propositional Logic Limits The expressive power of propositional logic is limited. The assumption is that everything can be expressed by simple facts.
Solving the Logic Satisfiability problem Solving the Logic Satisfiability problem Jesus De Loera.
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
Proof Methods for Propositional Logic CIS 391 – Intro to Artificial Intelligence.
The Existential Graphs Project Rensselaer Reasoning Group September 12, 2001.
1 Propositional Proofs 1. Problem 2 Deduction In deduction, the conclusion is true whenever the premises are true.  Premise: p Conclusion: (p ∨ q) 
Knowledge Repn. & Reasoning Lecture #9: Propositional Logic UIUC CS 498: Section EA Professor: Eyal Amir Fall Semester 2005.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
EA C461 Artificial Intelligence
Knowledge Representation and Reasoning
Logics for Data and Knowledge Representation
First-Order Logic and Inductive Logic Programming
Logical Inference: Through Proof to Truth
Logics for Data and Knowledge Representation
Elementary Metamathematics
Automated Proof Generation for EG
Artificial Intelligence: Agents and Propositional Logic.
Methods of Proof Chapter 7, second half.
Presentation transcript:

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

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.

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.

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

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  C 1 L’  C 2 C NEW = C 1 /L  C 2 /L’

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

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} {P} {} {P,  Q}  

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.

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

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.

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

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.

Subsumption Elimination A clause C 1 subsumes a clause C 2 if and only if every literal contained in C 1 is contained in C 1, i.e. C 1  C 2. Obviously, if C 1 subsumes C 2, then any truth- value assignment that satisfies C 1 will satisfy C 2. 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.

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.

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.

Unit Literal Deletion and Splitting For any clause set S, S L 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 S L 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 S L is satisfiable or S L’ is satisfiable. The last observation suggests a splitting strategy that forms the basis of Davis-Putnam.

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(S L ) || Satisfiable(S L’ ); end

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(S L ) –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.

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

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

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.

Example Unit Rule DEAE DA With G = G E’ =

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

Satisfiability Example A DE E CD BC AB D CD BC B A DCD) = Sat( Sat( ) = Sat() = Sat(D) = Sat(B BC ) = FalseD

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.

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

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.

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.

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.

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