Logic in Computer Science Transparency No. 3.3-1 Chapter 3 Propositional Logic 3.6. Propositional Resolution.

Slides:



Advertisements
Similar presentations
Completeness and Expressiveness
Advertisements

Resolution Proof System for First Order Logic
Inference Rules Universal Instantiation Existential Generalization
Introduction to Theorem Proving
Standard Logical Equivalences
Automated Reasoning Systems For first order Predicate Logic.
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.
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.
We have seen that we can use Generalized Modus Ponens (GMP) combined with search to see if a fact is entailed from a Knowledge Base. Unfortunately, there.
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.
Logic Use mathematical deduction to derive new knowledge.
13 Automated Reasoning 13.0 Introduction to Weak Methods in Theorem Proving 13.1 The General Problem Solver and Difference Tables 13.2 Resolution.
Methods of Proof Chapter 7, Part II. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound) generation.
Propositional Logic Russell and Norvig: Chapter 6 Chapter 7, Sections 7.1—7.4 Slides adapted from: robotics.stanford.edu/~latombe/cs121/2003/home.htm.
Deduction In addition to being able to represent facts, or real- world statements, as formulas, we want to be able to manipulate facts, e.g., derive new.
Logic CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Logic.
Resolution in Propositional and First-Order Logic.
Logic Concepts Lecture Module 11.
Artificial Intelligence Chapter 14. Resolution in the Propositional Calculus Artificial Intelligence Chapter 14. Resolution in the Propositional Calculus.
CS128 – Discrete Mathematics for Computer Science
Outline Recap Knowledge Representation I Textbook: Chapters 6, 7, 9 and 10.
Computability and Complexity 9-1 Computability and Complexity Andrei Bulatov Logic Reminder (Cnt’d)
Formal Logic Proof Methods Direct Proof / Natural Deduction Conditional Proof (Implication Introduction) Reductio ad Absurdum Resolution Refutation.
Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The.
Inference and Resolution for Problem Solving
Logic in Computer Science Transparency No Chapter 3 Propositional Logic 3.6. Propositional Resolution 3.7. Natural Deduction.
Methods of Proof Chapter 7, second half.
Knoweldge Representation & Reasoning
Chapter 3 Propositional Logic
Prop logic First order predicate logic (FOPC) Prob. Prop. logic Objects, relations Degree of belief First order Prob. logic Objects, relations.
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.
Artificial Intelligence Chapter 14 Resolution in the Propositional Calculus Artificial Intelligence Chapter 14 Resolution in the Propositional Calculus.
CS1502 Formal Methods in Computer Science Lecture Notes 10 Resolution and Horn Sentences.
Propositional Logic Reasoning correctly computationally Chapter 7 or 8.
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.
Propositional Resolution Computational LogicLecture 4 Michael Genesereth Spring 2005.
Propositional Proofs 2.
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
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
S P Vimal, Department of CSIS, BITS, Pilani
Unification Algorithm Input: a finite set Σ of simple expressions Output: a mgu for Σ (if Σ is unifiable) 1. Set k = 0 and  0 = . 2. If Σ  k is a singleton,
CS Introduction to AI Tutorial 8 Resolution Tutorial 8 Resolution.
Logical Agents Chapter 7. Knowledge bases Knowledge base (KB): set of sentences in a formal language Inference: deriving new sentences from the KB. E.g.:
Propositional calculus
Automated Reasoning Early AI explored how to automated several reasoning tasks – these were solved by what we might call weak problem solving methods as.
1 Logical Inference Algorithms CS 171/271 (Chapter 7, continued) Some text and images in these slides were drawn from Russel & Norvig’s published material.
CS6133 Software Specification and Verification
© Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic.
Dr. Shazzad Hosain Department of EECS North South Universtiy Lecture 04 – Part B Propositional Logic.
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
Foundations of Discrete Mathematics Chapter 1 By Dr. Dalia M. Gil, Ph.D.
1 Propositional Proofs 1. Problem 2 Deduction In deduction, the conclusion is true whenever the premises are true.  Premise: p Conclusion: (p ∨ q) 
March 3, 2016Introduction to Artificial Intelligence Lecture 12: Knowledge Representation & Reasoning I 1 Back to “Serious” Topics… Knowledge Representation.
Chapter 1 Logic and proofs
Knowledge Representation and Reasoning
Resolution in the Propositional Calculus
Logical Inference: Through Proof to Truth
Elementary Metamathematics
Information Technology Department
Propositional Resolution
Biointelligence Lab School of Computer Sci. & Eng.
CS 416 Artificial Intelligence
Back to “Serious” Topics…
Biointelligence Lab School of Computer Sci. & Eng.
Presentation transcript:

Logic in Computer Science Transparency No Chapter 3 Propositional Logic 3.6. Propositional Resolution

Logic in Computer Science Ch 3. Propositional Logic Transparency No Propositional Resolution (another Propositinal calculus)  a single rule of inference: P => Q, Q => R P => R  Using propositional resolution alone (without axiom schemata or other rules of inference), it is possible to build a theorem prover that is sound and complete for All propositional Calculus.  The search space using propositional resolution is much smaller than for standard propositional calculus (like H).  works only on expressions in clausal form.  General procedure to convert wffs into clausal forms introduced before.

Logic in Computer Science Ch 3. Propositional Logic Transparency No Clausal Form revisited  A literal is either an atomic sentence or a negation of an atomic sentence. p ~p  A clause is either a literal or a disjunction of literals. p ~p p \/ q \/ r  Clauses are usually written as sets of literals. { p}, { ~p}, { p,q,r }  A database in clausal form is a set of clauses. {{~p,q},{r,~q}}

Logic in Computer Science Ch 3. Propositional Logic Transparency No Empty Sets  The empty clause {} is unsatisfiable. Why: It is equivalent to an empty disjunction.  The empty database {} is valid. Why: It is equivalent to an empty conjunction.  What about a database consisting of an empty clause {{}}?

Logic in Computer Science Ch 3. Propositional Logic Transparency No Conversion to Clausal Form  Implications out: P1 -> P2 ---> ~P1 \/ P2 P1 P2 ---> (~P1 \/ P2) /\ (P1 \/ ~P2)  Negations in: ~~P ---> P ~(P1 /\ P2) ---> ~P1 \/ ~P2 ~(P1 \/ P2) ---> ~P1 /\ ~P2  Disjunctions in: P1 \/ (P2 /\ P3) ---> (P1 \/ P2) /\ (P1\/ P3)  Operators out: P1 \/ P2 ---> {P1,P2} P1 /\ P2 ---> {P1}, {P2}

Logic in Computer Science Ch 3. Propositional Logic Transparency No Examples  Example 1: (g & (r -> f)) I (g & (~r | f)) N D O { g}, {~r,f}  Example 2: ~(g & (r -> f)) I ~(g & (~r | f)) N (~g | ~(~r | f)) (~g | (~~r & ~f)) (~g | (r & ~f)) D (~g | r) & (~g | ~f) O {~g, r}, {~g, ~f}

Logic in Computer Science Ch 3. Propositional Logic Transparency No Propositional Resolution  General form: {p1,..., r,...,pm} {q1,...,~r,...,qn} {p1,...,pm,q1,...,qn}  Example: {Office, Home} {~Home,Sick} {Office,Sick}

Logic in Computer Science Ch 3. Propositional Logic Transparency No Issues  Collapse: {~p,q} {p,q} {q}  Multiple Conclusions: {p,q} {~p,~q} {p,~p} {q,~q} Single Application Only: {p,q} {~p,~q} {} NO!

Logic in Computer Science Ch 3. Propositional Logic Transparency No  Modus Ponens: p => q {~p,q} p {p} q {q}  Modus Tollens: p => q {~p,q} ~q {~q} ~p {~p} Special Cases of Propositional Resolution Chaining: p => q {-p,q} q => r {-q,r} p => r {-p,r}

Logic in Computer Science Ch 3. Propositional Logic Transparency No Unsatisfiability  Example: 1. {p,q} premise 2. {~p,q} premise 3. {p,~q} premise 4. {~p,~q} premise 5. {q} 1,2 6. {~q} 3,4 7. {} 5,6

Logic in Computer Science Ch 3. Propositional Logic Transparency No True or False Questions  Theorem: T |= A iff T U {~A} is unsatisfiable.  Application: To determine whether a set T of sentences logically implies a sentence A, rewrite T U {~s} in clausal form and try to derive the empty clause.

Logic in Computer Science Ch 3. Propositional Logic Transparency No True or False Example  {p -> q, q -> r} |= p -> r ? p -> q ==> {~p,q} q -> r ==> {~q,r} ~(p -> r) ==> {p}, {~r} 1. {~p,q} premise 2. {~q,r} premise 3. {p} negated goal 4. {~r} negated goal 5. {q} 1,3 6. {r} 2,5 7. {} 4,6

Logic in Computer Science Ch 3. Propositional Logic Transparency No True or False Example  {p -> q,m -> p \/ q} |= m -> q? p -> q ==> {~p,q} m -> p \/ q ==> {~m,p,q} ~ (m -> q) ==> {m}, {~q} 1. {~p,q} premise 2. {~m,p,q} premise 3. {m} negated goal 4. {~q} negated goal 5. {p,q} 2,3 6. {q} 1,5 7. {} 4,6

Logic in Computer Science Ch 3. Propositional Logic Transparency No Incompleteness?  Theorem: Propositional Resolution is not generatively complete. I.e., the statement: “If T |= A then there is a proof of A from T using Propositional Resolution only.” is not true. Pf: Show that {} |= p => (q => p) using propositional resolution. Note since there are no premises, there are no conclusions that can be generated. QED  However it can be show that Propositional Resolution is refutation complete. Namely, if T is unsatisfiable, then there is a resolution proof of {} (contradiction) from T. Hence  T |= A iff T U {~A} is unsatisfiable iff there is a resolution proof of {} from T U {~A}.

Logic in Computer Science Ch 3. Propositional Logic Transparency No Resolution proof of {} |= p->(q->p) I ~(p -> (q -> p)) : ~A N ~(~p \/ (~q \/ p)) (~~p /\ ~(~q \/ p)) (~~p /\ (~~q /\ ~p)) (p /\ (q /\ ~p)) D O {p}, {q}, {~p} 1. {p} negated goal 2. {q} negated goal 3. {~p} negated goal 4. {} 1,3

Logic in Computer Science Ch 3. Propositional Logic Transparency No Resolution Provability Definition: A sentence A is provable from a set of sentences T by propositional resolution (written T |- r A) iff there is a derivation of the empty clause from the clausal form of T U {~A} using resolution rule only.  Soundness and Completeness of Resolution:  Soundness Theorem: Proposition resolution is sound. T |- r A => T |= A  Completeness Theorem: Our proof system is complete. T |= A => T |- r A

Logic in Computer Science Ch 3. Propositional Logic Transparency No Termination  Two finger method: 1. {P,Q} Premise 2. {~P,Q} Premise 3. {P,~Q} Premise 4. {~P,~Q} Premise 5. {Q} 1,2 6. {P} 1,3 7. {Q,~Q} 1,4; 2,3 8. {P,~P} 1,4; 2,3 9. {~P} 2,4 10. {~Q} 3,4 11. {} 6,9 Theorem: There is a resolution derivation of a conclusion from a set of premises if and only if there is a derivation using the two finger method. Theorem: Propositional resolution using the two-finger method always terminates. Proof: There are only finitely many clauses that can be constructed from a finite set of logical constants.

Logic in Computer Science Ch 3. Propositional Logic Transparency No Soundness of |- r.  Let T |- rr A means there is a resolution proof of A with all premises from T.  Lemma: T |- rr A implies T |= A.  pf: Let D1,D2,…Dn be a resolution proof of A. Then  either A \in T and hence T |= A, or  A is obtained by resolution, i.e.,  there is Di = {L, L1,…,Ls}, Dj = {~L, M1,…,Mt} with  A = {L1,…Ls,M1,…Mt}.  By Ind. Hyp. T|= Di and T|= Dj, from which  T|= A by soundness of resolution.  Soundness of |-r.  pf: T |- r A iff T, ~A |- rr {} => T,~A |= [] => T U{~A} is unsatisfiable => T|= ~A.

Logic in Computer Science Ch 3. Propositional Logic Transparency No The algorithm  input: T, A; output T |- r A ?  Let DB = the set of all clausal forms obtained from T U {~A}.  Let List = [].add( DB.removeFirst());  While(! DB.isEmpty()){  Clause C = DB.removeFirst();  ForEach( D in List ) {  let Result = AllResolvents(C,D);  for each E in Result {  if E = [] return true;  if( E not in List U DB ) DB.add( E);  }}  List.add(C).  }  return false;

Logic in Computer Science Ch 3. Propositional Logic Transparency No Termination  The algorithm must terminates. pf: Since List and DB contains only distinct clauses and there are at most 2^ ( 2 x #atoms ) clauses that can be generated by resolutions, where #atoms is the number of distinct atoms in T U {~A}.

Logic in Computer Science Ch 3. Propositional Logic Transparency No Completeness  Let T be a finite set of clauses. if T is unsatifiable, then there is a resolution deduction of {} from T.  Pf: if T contains {}, then we are done.  Otherwise, the proof is by induction on the number of excess literals e = S { #literals(C) – 1 | C in T}.  if e = 0, then T is unsat iff theare two complementary unit clause {L} {~L} in C, => T |-r {}.  if e > 0 => there is a clause C = L \/ C’.  Let T1 = T – {C} U {C’}; T2 = T-{C} U {{L}}.  Since T is unsat, bothe T1 and T2 must be unsat.  => by ind hyp. There is a resolution proof R1 (R2) of {} from T1 (T2).  If R1 does not use C’, then R1 id also a proof of {} from T, and we are done. Other we can construct a proof of L from R1 by replacing every occurrence of C’ in R1 by C. now by joining such proof to occurrence of  L in R2,we obtains a prrof of {} from T.