Artificial Intelligence Chapter 13 The Propositional Calculus Biointelligence Lab School of Computer Sci. & Eng. Seoul National University.

Slides:



Advertisements
Similar presentations
Biointelligence Lab School of Computer Sci. & Eng.
Advertisements

Artificial Intelligence Chapter 21 The Situation Calculus Biointelligence Lab School of Computer Sci. & Eng. Seoul National University.
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.
CS344 : Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 9,10,11- Logic; Deduction Theorem 23/1/09 to 30/1/09.
Methods of Proof Chapter 7, second half.. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound)
Logic Use mathematical deduction to derive new knowledge.
Logic.
Logic Concepts Lecture Module 11.
Artificial Intelligence Chapter 14. Resolution in the Propositional Calculus Artificial Intelligence Chapter 14. Resolution in the Propositional Calculus.
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)
Knowledge Representation I (Propositional Logic) CSE 473.
From Chapter 4 Formal Specification using Z David Lightfoot
Knoweldge Representation & Reasoning
Let remember from the previous lesson what is Knowledge representation
CS 4700: Foundations of Artificial Intelligence
Artificial Intelligence Chapter 14 Resolution in the Propositional Calculus Artificial Intelligence Chapter 14 Resolution in the Propositional Calculus.
I NTRO TO L OGIC Dr Shlomo Hershkop March
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.
Knowledge Representation Use of logic. Artificial agents need Knowledge and reasoning power Can combine GK with current percepts Build up KB incrementally.
Pattern-directed inference systems
Advanced Topics in Propositional Logic Chapter 17 Language, Proof and Logic.
Logical Agents Logic Propositional Logic Summary
Propositional Logic Dr. Rogelio Dávila Pérez Profesor-Investigador División de Posgrado Universidad Autónoma Guadalajara
An Introduction to Artificial Intelligence – CE Chapter 7- Logical Agents Ramin Halavati
S P Vimal, Department of CSIS, BITS, Pilani
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
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.:
LECTURE LECTURE Propositional Logic Syntax 1 Source: MIT OpenCourseWare.
October 17, 2012Introduction to Artificial Intelligence Lecture 11: Knowledge Representation and Reasoning I 1Semantics In propositional logic, we associate.
Logical Agents Chapter 7. Outline Knowledge-based agents Logic in general Propositional (Boolean) logic Equivalence, validity, satisfiability.
CS6133 Software Specification and Verification
1 The Wumpus Game StenchBreeze Stench Gold Breeze StenchBreeze Start  Breeze.
Artificial Intelligence Chapter 15 The Predicate Calculus Artificial Intelligence Chapter 15 The Predicate Calculus Biointelligence Lab School of Computer.
Artificial Intelligence “Introduction to Formal Logic” Jennifer J. Burg Department of Mathematics and Computer Science.
© Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic.
CS2351 Artificial Intelligence Bhaskar.V Class Notes on Knowledge Representation - Logical Agents.
Chapter 7. Propositional and Predicate Logic Fall 2013 Comp3710 Artificial Intelligence Computing Science Thompson Rivers University.
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.
First-Order Logic Semantics Reading: Chapter 8, , FOL Syntax and Semantics read: FOL Knowledge Engineering read: FOL.
Propositional Logic Rather than jumping right into FOL, we begin with propositional logic A logic involves: §Language (with a syntax) §Semantics §Proof.
ARTIFICIAL INTELLIGENCE Lecture 2 Propositional Calculus.
Artificial Intelligence Chapter 23 Multiple Agents Biointelligence Lab School of Computer Sci. & Eng. Seoul National University.
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View Basic Concepts and Background.
Artificial Intelligence Chapter 13 The Propositional Calculus Biointelligence Lab School of Computer Sci. & Eng. Seoul National University.
Proof Methods for Propositional Logic CIS 391 – Intro to Artificial Intelligence.
Logics for Data and Knowledge Representation ClassL (part 1): syntax and semantics.
March 3, 2016Introduction to Artificial Intelligence Lecture 12: Knowledge Representation & Reasoning I 1 Back to “Serious” Topics… Knowledge Representation.
Artificial Intelligence Logical Agents Chapter 7.
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
Chapter 7. Propositional and Predicate Logic
2. The Logic of Compound Statements Summary
Propositional Logic Russell and Norvig: Chapter 6 Chapter 7, Sections 7.1—7.4 CS121 – Winter 2003.
Knowledge Representation and Reasoning
The Propositional Calculus
Logical Inference: Through Proof to Truth
Information Technology Department
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Biointelligence Lab School of Computer Sci. & Eng.
Artificial Intelligence: Agents and Propositional Logic.
Back to “Serious” Topics…
Computer Security: Art and Science, 2nd Edition
Biointelligence Lab School of Computer Sci. & Eng.
Logical Agents Chapter 7.
Chapter 7. Propositional and Predicate Logic
CSNB234 ARTIFICIAL INTELLIGENCE
Representations & Reasoning Systems (RRS) (2.2)
Presentation transcript:

Artificial Intelligence Chapter 13 The Propositional Calculus Biointelligence Lab School of Computer Sci. & Eng. Seoul National University

(c) 2009 SNU CSE Biointelligence Lab Outline Using Constraints on Feature Values The Language Rules of Inference Definition of Proof Semantics Soundness and Completeness The PSAT Problem Other Important Topics

(c) 2009 SNU CSE Biointelligence Lab 13.1 Using Constraints on Feature Values Description and Simulation  Description  Binary-valued features on what is true about the world and what is not true  easy to communicate  In cases where the values of some features cannot be sensed directly, their values can be inferred from the values of other features  Simulation  Iconic representation  more direct and more efficient

(c) 2009 SNU CSE Biointelligence Lab Difficult or impossible environment to represent iconically  General laws, such as “all blue boxes are pushable”  Negative information, such as “block A is not on the floor” (without saying where block A is)  Uncertain information, such as “either block A is on block B or block A is on block C” Some of this difficult-to-represent information can be formulated as constraints on the values of features  These constraints can be used to infer the values of features that cannot be sensed directly. Reasoning  inferring information about an agent’s personal state 13.1 Using Constraints on Feature Values (Cont’d)

(c) 2009 SNU CSE Biointelligence Lab Applications involving reasoning  Reasoning can enhance the effectiveness of agents  To diagnose malfunction in various physical systems  represent the functioning of the systems by appropriate set of features  Constraints among features encode physical laws relevant to the organism or device.  features associated with “causes” can be inferred from features associated with “symptoms,”  Expert Systems 13.1 Using Constraints on Feature Values (Cont’d)

(c) 2009 SNU CSE Biointelligence Lab Motivating Example  Consider a robot that is able to life a block, if that block is liftable and the robot’s battery power source is adequate  If both are satisfied, then when the robot tries to life a block it is holding, its arm moves.  x 1 (BAT_OK)  x 2 (LIFTABLE)  x 3 (MOVES)  constraint in the language of the propositional calculus BAT_OK  LIFTABLE  MOVES 13.1 Using Constraints on Feature Values (Cont’d)

(c) 2009 SNU CSE Biointelligence Lab Logic involves  A language (with a syntax)  Inference rule  Semantics for associating elements of the language with elements of some subject matter Two logical languages  propositional calculus  first-order predicate calculus (FOPC) 13.1 Using Constraints on Feature Values (Cont’d)

(c) 2009 SNU CSE Biointelligence Lab 13.2 The Language Elements  Atoms  two distinguished atoms T and F and the countably infinite set of those strings of characters that begin with a capital letter, for example, P, Q, R, …, P1, P2, ON_A_B, and so on.  Connectives  , , , and , called “or”, “and”, “implies”, and “not”, respectively.  Syntax of well-formed formula (wff), also called sentences  Any atom is a wff.  If w 1 and w 2 are wffs, so are w 1  w 2, w 1  w 2, w 1  w 2,  w 1.  There are no other wffs.

(c) 2009 SNU CSE Biointelligence Lab 13.2 The Language (Cont’d) Literal  atoms and a  sign in front of them Antecedent and Consequent  In w 1  w 2, w 1 is called the antecedent of the implication.  w 2 is called the consequent of the implication. Extra-linguistic separators, ( and )  group wffs into (sub) wffs according to the recursive definitions.

(c) 2009 SNU CSE Biointelligence Lab 13.3 Rule of Inference Ways by which additional wffs can be produced from other ones Commonly used rules  modus ponens: wff w 2 can be inferred from the wffs w 1 and w 1  w 2   introduction: wff w 1  w 2 can be inferred from the two wffs w 1 and w 2  commutativity  : wff w 2  w 1 can be inferred from the wff w 1  w 2   elimination: wff w 1 can be inferred from the w 1  w 2   introduction: wff w 1  w 2 can be inferred from either from the single wff w 1 or from the single wff w 2   elimination: wff w 1 can be inferred from the wff  (  w 1 ).

(c) 2009 SNU CSE Biointelligence Lab 13.4 Definitions of Proof Proof  The sequence of wffs {w 1, w 2, …, w n } is called a proof of w n from a set of wffs  iff each w i is either in  or can be inferred from a wff earlier in the sequence by using one of the rules of inference. Theorem  If there is a proof of w n from , w n is a theorem of the set .   ㅏ w n  Denote the set of inference rules by the letter R.  w n can be proved from    ㅏ R w n

(c) 2009 SNU CSE Biointelligence Lab Example Given a set, , of wffs: {P, R, P  Q}, {P, P  Q, Q, R, Q  R} is a proof of Q  R. The concept of proof can be based on a partial order. Figure 13.1 A Sample Proof Tree

(c) 2009 SNU CSE Biointelligence Lab 13.5 Semantics Semantics  Has to do with associating elements of a logical language with elements of a domain of discourse.  Meaning  Such association Interpretation  An association of atoms with propositions  Denotation  In a given interpretation, the proposition associated with an atom

(c) 2009 SNU CSE Biointelligence Lab 13.5 Semantics (Cont’d) Under a given interpretation, atoms have values – True or False. Special Atom  T : always has value True  F : always has value False An interpretation by assigning values directly to the atoms in a language can be specified – regardless of which proposition about the world each atom denotes.

(c) 2009 SNU CSE Biointelligence Lab Propositional Truth Table Given the values of atoms under some interpretation, use a truth table to compute a value for any wff under that same interpretation. Let w 1 and w 2 be wffs.  (w 1  w 2 ) has True if both w 1 and w 2 have value True.  (w 1  w 2 ) has True if one or both w 1 or w 2 have value True.   w 1 has value True if w1 has value False.  The semantics of  is defined in terms of  and . Specifically, (w 1  w 2 ) is an alternative and equivalent form of (  w 1  w 2 ).

(c) 2009 SNU CSE Biointelligence Lab Propositional Truth Table (Cont’d) If an agent describes its world using n features and these features are represented in the agent’s model of the world by a corresponding set of n atoms, then there are 2 n different ways its world can be. Given values for the n atoms, the agent can use the truth table to find the values of any wffs. Suppose the values of wffs in a set of wffs are given.  Do those values induce a unique interpretation?  Usually “No.”  Instead, there may be many interpretations that give each wff in a set of wffs the value True.

(c) 2009 SNU CSE Biointelligence Lab Satisfiability An interpretation satisfies a wff if the wff is assigned the value True under that interpretation. Model  An interpretation that satisfies a wff  In general, the more wffs that describe the world, the fewer models. Inconsistent or Unsatisfiable  When no interpretation satisfies a wff, the wff is inconsistent or unsatisfiable.  e.g. F or P   P

(c) 2009 SNU CSE Biointelligence Lab Validity A wff is said to be valid  It has value True under all interpretations of its constituent atoms.  e.g.  P  P  T   ( P   P )  Q  T  [(P  Q)  P]  P  P  (Q  P)  Use of the truth table to determine the validity of a wff takes time exponential in the number of atoms

(c) 2009 SNU CSE Biointelligence Lab Equivalence Two wffs are said to be equivalent iff their truth values are identical under all interpretations. DeMorgan’s laws  (w 1  w 2 )   w 1   w 2  (w 1  w 2 )   w 1   w 2 Law of the contrapositive (w 1  w 2 )  (  w 2   w 1 ) If w 1 and w 2 are equivalent, then the following formula is valid: (w 1  w 2 )  (w 2  w 1 )

(c) 2009 SNU CSE Biointelligence Lab Entailment If a wff w has value True under all of interpretations for which each of the wffs in a set  has value True,  logically entails w and w logically follows from  and w is a logical consequence of . e.g.  {P} ㅑ P  {P, P  Q} ㅑ Q  F ㅑ w  P  Q ㅑ P

(c) 2009 SNU CSE Biointelligence Lab 13.6 Soundness and Completeness If, for any set of wffs, , and wff, w,  ㅏ R w implies  ㅑ w, the set of inference rules, R, is sound. If, for any set of wffs, , and wff, w, it is the case that whenever  ㅑ w, there exist a proof of w from  using the set of inference rules, we say that R is complete. When inference rules are sound and complete, we can determine whether one wff follows from a set of wffs by searching for a proof.

(c) 2009 SNU CSE Biointelligence Lab 13.6 Soundness and Completeness (Cont’d) When the inference rules are sound, if we can find a proof of w from , w logically follows from . When the inference rules are complete, we will eventually be able to confirm that w follows from  by using a complete search procedure to search for a proof. To determine whether or not a wff logically follows from a set of wffs or can be proved from a set of wffs is, in general, an NP-hard problem.

(c) 2009 SNU CSE Biointelligence Lab 13.7 The PSAT Problem Propositional satisfiability (PSAT) problem: The problem of finding a model for a formula. Clause  A disjunction of literals Conjunctive Normal Form (CNF)  A formula written as a conjunction of clauses An exhaustive procedure for solving the CNF PSAT problem is to try systematically all of the ways to assign True and False to the atoms in the formula.  If there are n atoms in the formula, there are 2 n different assignments.

(c) 2009 SNU CSE Biointelligence Lab 13.7 The PSAT Problem (Cont’d) Interesting Special Cases  2SAT and 3SAT  kSAT problem  To find a model for a conjunction of clauses, the longest of which contains exactly k literals  2SAT  Polynomial complexity  3SAT  NP-complete  Many problems take only polynomial expected time.

(c) 2009 SNU CSE Biointelligence Lab 13.7 The PSAT Problem (Cont’d) GSAT  Nonexhaustive, greedy, hill-climbing type of search procedure  Begin by selecting a random set of values for all of the atoms in the formula.  The number of clauses having value True under this interpretation is noted.  Next, go through the list of atoms and calculate, for each one, the increase in the number of clauses whose values would be True if the value of that atom were to be changed.  Change the value of that atom giving the largest increase  Terminated after some fixed number of changes  May terminate at a local maximum

(c) 2009 SNU CSE Biointelligence Lab 13.8 Other Important Topics Language Distinctions The propositional calculus is a formal language that an artificial agent uses to describe its world. Possibility of confusing the informal languages of mathematics and of English with the formal language of the propositional calculus itself.  ㅏ of {P, P  Q} ㅏ Q  Not a symbol in the language of propositional calculus  A symbol in language used to talk about the propositional calculus

(c) 2009 SNU CSE Biointelligence Lab Metatheorems Theorems about the propositional calculus Important Theorems  Deductive theorem  If {w 1, w 2, …, w n } ㅑ w, (w 1  w 2  …  w n )  w is valid.  Reductio ad absurdum  If the set  has a model but   {  w} does not, then  ㅑ w.

(c) 2009 SNU CSE Biointelligence Lab Associative Laws and Distributive Laws Associative Laws (w 1  w 2 )  w 3  w 1  ( w 2  w 3 ) (w 1  w 2 )  w 3  w 1  ( w 2  w 3 ) Distributive Laws w 1  (w 2  w 3 )  (w 1  w 2 )  (w 1  w 3 ) w 1  (w 2  w 3 )  (w 1  w 2 )  (w 1  w 3 )