Logical Inference: Through Proof to Truth

Slides:



Advertisements
Similar presentations
UIUC CS 497: Section EA Lecture #2 Reasoning in Artificial Intelligence Professor: Eyal Amir Spring Semester 2004.
Advertisements

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)
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 20
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.
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.
Outline Recap Knowledge Representation I Textbook: Chapters 6, 7, 9 and 10.
Proof methods Proof methods divide into (roughly) two kinds: –Application of inference rules Legitimate (sound) generation of new sentences from old Proof.
Logic in general Logics are formal languages for representing information such that conclusions can be drawn Syntax defines the sentences in the language.
Logical Agents Chapter 7.
Methods of Proof Chapter 7, second half.
Knoweldge Representation & Reasoning
Chapter 3 Propositional Logic
CS1502 Formal Methods in Computer Science Lecture Notes 10 Resolution and Horn Sentences.
Logical Agents. Knowledge bases Knowledge base = set of sentences in a formal language Declarative approach to building an agent (or other system): 
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 Logic: Methods of Proof (Part II)
CHAPTERS 7, 8 Oliver Schulte Logical Inference: Through Proof to Truth.
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.
Logical Agents Chapter 7. Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic Equivalence,
Logical Agents Chapter 7. Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic Equivalence,
Propositional Logic: Methods of Proof (Part II) This lecture topic: Propositional Logic (two lectures) Chapter (previous lecture, Part I) Chapter.
An Introduction to Artificial Intelligence – CE Chapter 7- Logical Agents Ramin Halavati
S P Vimal, Department of CSIS, BITS, Pilani
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.:
1 Logical Agents Chapter 7. 2 A simple knowledge-based agent The agent must be able to: –Represent states, actions, etc. –Incorporate new percepts –Update.
LECTURE LECTURE Propositional Logic Syntax 1 Source: MIT OpenCourseWare.
LDK R Logics for Data and Knowledge Representation Propositional Logic: Reasoning First version by Alessandro Agostini and Fausto Giunchiglia Second version.
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.
© Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic.
Reasoning with Propositional Logic automated processing of a simple knowledge base CD.
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.
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
Logical Agents Chapter 7. Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic Equivalence,
UBC Department of Computer Science Undergraduate Events More
Logical Agents Chapter 7 Part I. 2 Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic.
Proof Methods for Propositional Logic CIS 391 – Intro to Artificial Intelligence.
Knowledge Repn. & Reasoning Lecture #9: Propositional Logic UIUC CS 498: Section EA Professor: Eyal Amir Fall Semester 2005.
Logical Agents Chapter 7. Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic Equivalence,
CS666 AI P. T. Chung Logic Logical Agents Chapter 7.
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
Notes 7: Knowledge Representation, The Propositional Calculus
EA C461 Artificial Intelligence
2. The Logic of Compound Statements Summary
Propositional Logic: Methods of Proof (Part II)
EA C461 – Artificial Intelligence Logical Agent
The Propositional Calculus
Notes 7: Knowledge Representation, The Propositional Calculus
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 21
Logical Agents Chapter 7.
Artificial Intelligence Logical Agents
EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS
Logical Agents Chapter 7 Selected and slightly modified slides from
Logical Agents Reading: Russell’s Chapter 7
Propositional Logic: Methods of Proof (Part II)
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 20
Propositional Resolution
Logical Agents Chapter 7.
Logic Use mathematical deduction to derive new knowledge.
Artificial Intelligence: Agents and Propositional Logic.
CS 416 Artificial Intelligence
Logical Agents Chapter 7.
Methods of Proof Chapter 7, second half.
Propositional Logic: Methods of Proof (Part II)
Problems in AI Problem Formulation Uninformed Search Heuristic Search
Presentation transcript:

Logical Inference: Through Proof to Truth CMPT 310 CHAPTERS 7, 8 Oliver Schulte Propositional logic. 1st-order logic. Resolution. DPLL WalkSat. Title alludes to book by Peter Andrews.

Active Field: Automated Deductive Proof Call for Papers

The Satisfiability Problem

Satisfiability problems Consider a CNF sentence, e.g., (D  B  C)  (B  A  C)  (C  B  E)  (E  D  B)  (B  E  C) Satisfiability: Is there a model consistent with this sentence? The basic NP-hard problem (Cook’s theorem). Many practically important problems can be represented this way. SAT Competition page. By the CNF theorem, all formulas can be written as a CNF sentence. [A  B]  [¬B  ¬C]  [A  C]  [¬D]  [¬D  ¬A]

Exercise: Satisfiability Is the following sentence satisfiable? [A  B]  [¬B  ¬C]  [A  C]  [¬D]  [¬D  ¬A]

Proof Methods Overview generate new sentences from given sentences try to find a satisfying model most useful if we expect no solution to exist most useful if we expect a solution to exist Inference Rules Model Checking WalkSat Forward/Backward Chaining DPLL Resolution improved depth-first search heuristic probabilistic search Proof by Contradiction not covered

Resolution

Entailment and Satisfiability A sentence is satisfiable if it is true in some model. e.g., A B, C are satisfiable A sentence is unsatisfiable if it is false in all models. e.g., AA. Satisfiability and entailment: KB entails sentence α if and only if the sentence (KB α) is unsatisfiable There is no model for which KB=true and a is false. Demo using tarki’s world. Take the entailment A & B => A or B.

Proof by Contradiction Want to prove: KB α is unsatisfiable. Strategy: Derive new sentences from KB, α. One of two things can happen: We derive ⇒ unsatisfiable. We find no contradiction ⇒ satisfiable. Resolution is a rule for deriving new disjunctions from previous ones.

Resolution: Spot the Pattern Premise 1 Premise 2 Conclusion A  B  C A B  C A  B A  B B A  D  E B  C  D  E What is the rule to get from the two premises to the conclusion? pattern: cancel out common negated literal.

Resolution Inference Rule for CNF “If A or B or C is true, but not A, then B or C must be true.” “If A is false then B or C must be true, or if A is true then D or E must be true, hence since A is either true or false, B or C or D or E must be true.” Can rewrite as A -> Not A -> Disjoin the consequents. A special case is Modus Ponens: from A implies B, and A, infer B.

Resolution Step 1: Conversion to CNF B1,1  (P1,2  P2,1). Equivalent conjunctive normal form formula? Eliminate , replacing α  β with (α  β)(β  α). (B1,1  (P1,2  P2,1))  ((P1,2  P2,1)  B1,1) 2. Eliminate , replacing α  β with α β. (B1,1  P1,2  P2,1)  ((P1,2  P2,1)  B1,1) 3. Move  inwards using de Morgan's rules and double-negation: (B1,1  P1,2  P2,1)  ((P1,2  P2,1)  B1,1) 4. Apply distributive law ( over ) and flatten: (B1,1  P1,2  P2,1)  (P1,2  B1,1)  (P2,1  B1,1)

Resolution Step 2: Generate new disjunctions KB = (B1,1  (P1,2 P2,1))  B1,1 α = P1,2 True False in all worlds

More on Resolution Resolution is complete for propositional logic. Resolution in general can take up exponential space and time. (Hard proof!) Main method for the SAT problem: is a CNF formula satisfiable? Typically most useful when we expect the formula to be unsatisfiable. Single inference rule is complete! If all clauses are Horn clauses, then resolution is linear in space and time.

Why many problems are satisfiability problems Logic and Clauses Why many problems are satisfiability problems

Normal Clausal Form Rewrite into conjunctive normal form (CNF). Eventually we want to prove: Knowledge base KB entails sentence α Rewrite into conjunctive normal form (CNF). Apply resolution. literals A “conjunction of disjunctions” Can you prove this? k-CNF: exactly k literals per clause (A  B)  (B  C  D) Clause Clause Theorem: Any KB can be converted into an equivalent CNF.

Logical equivalence To manipulate logical sentences we need some rewrite rules. Two sentences are logically equivalent iff they are true in same models: α ≡ ß iff α╞ β and β╞ α Another example: solve equation in 1 unknown. Demonstrate in tarksi demo.

Horn Clauses Horn Clause = A clause with at most 1 positive literal. e.g. Every Horn clause can be rewritten as an implication with a conjunction of positive literals in the premises and at most a single positive literal as a conclusion. e.g. Psychologically natural: a condition implies (causes) a single fact. The basis of logic programming (the prolog language). SWI Prolog. Prolog and the Semantic Web. Prolog Applications Resolution for Horn clauses is fast (linear time and space cost). Show Aispace demo. In application, easy to specify rules, interchange format. See especially “Air” application, .e.g. Boeing. 1 positive literal: definite clause 0 positive literals: Fact or integrity constraint: e.g.

Summary Determining the satisfiability of a CNF formula is the basic problem of propositional logic (and of many reasoning/scheduling problems). Any propositional formula can be converted to CNF format. Resolution is complete for propositional logic. Can use search methods + inference (e.g. unit propagation): DPLL. Can also use stochastic local search methods: WALKSAT.