alo cse f buf Symbolic Representation and Reasoning
alo @ cse f buf Symbolic Representation and Reasoning an Overview Stuart C. Shapiro Department of Computer Science and Engineering, Center for Multisource Information Fusion, and Center for Cognitive Science University at Buffalo, The State University of New York 201 Bell Hall, Buffalo, NY 14260 -2000 shapiro@cse. buffalo. edu http: //www. cse. buffalo. edu/~shapiro/ September, 2004 S. C. Shapiro
alo @ cse f buf Introduction Knowledge Representation Reasoning Symbols Logics 2 September, 2004 S. C. Shapiro
alo @ cse f buf Knowledge Representation A subarea of Artificial Intelligence Concerned with understanding, designing, and implementing ways of representing information in computers So that programs can use this information to derive information that is implied by it, to converse with people in natural languages, to plan future activities, to solve problems in areas that normally require human expertise. 3 September, 2004 S. C. Shapiro
alo @ cse f buf Reasoning Deriving information that is implied by the information already present is a form of reasoning. Knowledge representation schemes are useless without the ability to reason with them. So, Knowledge Representation and Reasoning 4 September, 2004 S. C. Shapiro
alo @ cse f buf Knowledge vs. Belief Knowledge: Justified True Belief KR systems operate the same whether or not the information stored is justified or true. So, Belief Representation and Reasoning would be better. But we’ll stick with KR. 5 September, 2004 S. C. Shapiro
alo f buf @ cse What Is a Symbol? “A symbol token is a pattern that can be compared to some other symbol token and judged equal with it or different from it… Symbols may be formed into symbol structures by means of a set of relations… The `objects’ that symbols designate may include … objects in an external environment of sensible (readable) stimuli. ” [Newell & Simon, Concise Encyclopedia of CS, 2004] 6 September, 2004 S. C. Shapiro
alo f buf @ cse What Is Logic? The study of correct reasoning. Not a particular KR language. There are many systems of logic. With slight abuse, we call a system of logic a logic. KR research may be seen as the search for the correct logic(s) to use in intelligent systems. 7 September, 2004 S. C. Shapiro
alo @ cse f buf Parts of Specifying a Logic Syntax Semantics Proof Theory 8 September, 2004 S. C. Shapiro
alo f buf @ cse Syntax The specification of a set of atomic symbols, and the grammatical rules for combining them into well-formed expressions (symbol-structures). 9 September, 2004 S. C. Shapiro
alo @ cse f buf Syntactic Expressions Atomic symbols Individual constants: Tom, Betty, white Variables: x, y, z Function symbols: mother. Of Predicate symbols: Person, Elephant, Color Propositions: P, Q, Bd. T Terms Individual constants: Tom, Betty, white Variables : x, y, z Functional terms: mother. Of(Fred) Well-formed formulas (wffs) Propositions (Proposition symbols) : P, Q, Bd. T Atomic formulas: Color(x, white), Duck(mother. Of(Fred)) Non-atomic formulas: Td. B Td Bp 10 September, 2004 S. C. Shapiro
alo f buf @ cse Semantics The specification of the meaning (designation) of the atomic symbols, and the rules for determining the meanings of the well-formed expressions from the meanings of their parts. 11 September, 2004 S. C. Shapiro
alo @ cse f buf Semantic Values Terms could denote Objects Categories of objects Properties… Wffs could denote Propositions Truth values 12 September, 2004 S. C. Shapiro
alo @ cse f buf Truth Values Could be 2, 3, 4, …, ∞ different truth values. Some truth values are “distinguished” Needn’t have anything to do with truth in the real world. By default, we’ll assume 2 truth values. Call distinguished one True (T) Call other False (F) 13 September, 2004 S. C. Shapiro
alo f buf @ cse Proof Theory The specification of a set of rules, which, given an initial collection of well-formed expressions, specify what other well-formed expressions can be added to the collection. 14 September, 2004 S. C. Shapiro
alo @ cse f buf Proof / Knowledge Base The collection could be A proof A knowledge base The initial collection could be Axioms Hypotheses Assumptions Domain facts & rules The added expressions could be Theorems Derived facts & rules 15 September, 2004 S. C. Shapiro
alo @ cse f buf Example Logic: Standard Propositional Logic Domain: Car. Pool World Atomic Proposition Symbols: Bd. T, Td. B, Bd, Td, Bp, Tp Unary wff-forming connective: Binary wff-forming connectives: , , , 16 September, 2004 S. C. Shapiro
alo @ cse f buf Intended Interpretation (Intensional Semantics) Bd. T: Betty drives Tom Td. B: Tom drives Betty Bd: Betty is the driver Td: Tom is the driver Bp: Betty is the passenger Tp: Tom is the passenger 17 September, 2004 S. C. Shapiro
alo @ cse f buf Extensional (Denotational) Semantics Bd. T Td. B Bd Td T T T T F T F F Bp Tp Bd Tp Td Td T T F F T F F T F 5 of 26 = 64 possible situations 18 September, 2004 S. C. Shapiro
alo @ cse f buf Properties of Wffs Satisfiable T in some situation Bd. T T F F Td. B T T F Bd T T T F F Td T F F T F Bp T F F Tp T F F Bd Tp T F F Td T T T Td F F F 19 September, 2004 S. C. Shapiro
alo @ cse f buf Properties of Wffs Contingent T in some, F in some Bd. T T F F Td. B T T F Bd T T T F F Td T F F T F Bp T F F Tp T F F Bd Tp T F F Td T T T Td F F F 20 September, 2004 S. C. Shapiro
alo @ cse f buf Properties of Wffs Valid T in all situations Bd. T T F F Td. B T T F Bd T T T F F Td T F F T F Bp T F F Tp T F F Bd Tp T F F Td T T T Td F F F 21 September, 2004 S. C. Shapiro
alo @ cse f buf Properties of Wffs Contradictory T in no situation Bd. T T F F Td. B T T F Bd T T T F F Td T F F T F Bp T F F Tp T F F Bd Tp T F F Td T T T Td F F F 22 September, 2004 S. C. Shapiro
alo @ cse f buf Logical Implication P 1, …, Pn logically imply Q P 1, …, Pn |= Q In every situation that P 1, …, Pn are True, so is Q. 23 September, 2004 S. C. Shapiro
alo @ cse f buf Example: Car. Pool World KB Let KBCPW = Bd Bp Td Tp Bd. T Bd Tp Td. B Td Bp Td. B Bd. T 24 September, 2004 S. C. Shapiro
alo @ cse f buf Extensional (Denotational) Semantics Bd. T Td. B Bd Td T F F T Bp Tp F T T F Only 2 of the 64 situations where KBCPW are T So, e. g. , KBCPW, Bd. T |= Bd Bp This is how a KB constrains a model to the domain we want. 25 September, 2004 S. C. Shapiro
alo @ cse f buf Proof Theory Some Rules of Inference P Q P Q Modus Ponens or Elimination Q Elimination P Q P Q Elimination Introduction 26 September, 2004 S. C. Shapiro
alo @ cse f buf Derivation from Assumptions Q is derivable from P 1, …, Pn |- Q Starting from the collection P 1, …, Pn, one can repeatedly apply rules of inference, and eventually get Q. 27 September, 2004 S. C. Shapiro
alo @ cse f buf Example: Car. Pool World Proof Bd. T Bd Tp Bd. T Bd Bp Bd Tp Bd Bp Bd Bp So, KBCPW, Bd. T |- Bd Bp 28 September, 2004 S. C. Shapiro
alo @ cse f buf Theoremhood If Q is derivable from no assumptions, |- Q We say that Q is provable, and that Q is a theorem. 29 September, 2004 S. C. Shapiro
alo @ cse f buf Deduction Theorem P 1, …, Pn |= Q iff |= (P 1 · · · Pn ) Q P 1, …, Pn |- Q iff |- (P 1 · · · Pn ) Q So theorem-proving is relevant to reasoning. 30 September, 2004 S. C. Shapiro
alo @ cse f buf Properties of Logics Soundness If |- P then |= P (If P is a provable, then P is valid. ) Completeness If |= P then |- P (If P is valid, then P is a provable. ) 31 September, 2004 S. C. Shapiro
alo f buf @ cse Soundness vs. Completeness Soundness is the essence of correct reasoning Completeness is less important because it doesn’t indicate how long it might take. 32 September, 2004 S. C. Shapiro
alo Commutativity Diagram for Sound and Complete Logics |= (P 1 · · · Pn ) Q P 1, …, Pn |= Q soundness completeness soundness @ cse f buf |- (P 1 · · · Pn ) Q P 1, …, Pn |- Q So, whenever you want one, you can do another. 33 September, 2004 S. C. Shapiro
alo f buf @ cse Use of Commutativity Diagram Refutation proof techniques, such as resolution refutation or semantic tableaux, prove that there can be no situation in which P 1, …, and Pn are True and Q is False. These are semantic proof techniques. 34 September, 2004 S. C. Shapiro
alo @ cse f buf Decision Procedure A procedure that is guaranteed to terminate and tell whether or not P is provable. 35 September, 2004 S. C. Shapiro
alo @ cse f buf Semidecision Procedure A procedure that, if P is a theorem is guaranteed to terminate and say so. Otherwise, it may not terminate. 36 September, 2004 S. C. Shapiro
alo @ cse f buf A Tour of Some Classes of Logics Propositional Logics Elementary Predicate Logics Full First-Order Logics 37 September, 2004 S. C. Shapiro
alo @ cse f buf Propositional Logics Smallest Unit: Proposition/Sentence propositional logics that are Sound Complete Have decision procedures 38 September, 2004 S. C. Shapiro
alo @ cse f buf What You Can Do with Propositional Logic • Betty. Drives. Tom. Drives. Betty • Betty. Drives. Tom Near. Tom. Betty • Tom. Drives. Betty Near. Tom. Betty • Near. Tom. Betty Can derive conclusions even though the “facts” aren’t entirely known. 39 September, 2004 S. C. Shapiro
alo @ cse f buf Elementary Predicate Logics Propositions plus Predicate (Relation) symbols, Individual terms, variables, quantifiers elementary predicate logics that are Sound Complete Have decision procedures 40 September, 2004 S. C. Shapiro
alo @ cse f buf What You Can Say with Elementary Predicate Logic • x[Elephant(x) Has. A(x, trunk)] Can state generalities before all individuals are known. • x[Elephant(x) Color(x, white)] Can describe individuals Even when they are not specifically known. 41 September, 2004 S. C. Shapiro
alo @ cse f buf Full First-Order Logics Elementary predicate logic plus Function symbols/ functional terms full first-order logics that are Sound None are Complete Have decision procedures 42 September, 2004 S. C. Shapiro
alo @ cse f buf What You Can Say with Full First-Order Logic p[Has. Prop(0, p) x[Has. Prop(x, p) Has. Prop(x+1, p)] x Has. Prop(x, p)] Principle of induction. 43 September, 2004 S. C. Shapiro
alo @ cse f buf Example of Undecidability • Large KB about ducks, etc. • x[ y (Duck(y) Walks. Like(x, y)) y (Duck(y) Talks. Like(x, y)) Duck(x)] • x Duck(mother. Of(x)) Duck(x) • Duck(Fred)? • If Fred is not a duck, possible ∞ loop. 44 September, 2004 S. C. Shapiro
alo @ cse f buf Unsound Reasoning Induction From Raven(a) Black(a) Raven(b) Black(b) Raven(c) Black(c) Raven(d) Black(d) … Raven(n) Black(n) To x[Raven(x) Black(x)] 45 September, 2004 S. C. Shapiro
alo @ cse f buf Unsound Reasoning Abduction From x[Person(x) Injured(x) Bandaged(x)] Person(Tom) Bandaged(Tom) To Injured(Tom) 46 September, 2004 S. C. Shapiro
alo @ cse f buf What’s “First-Order” about First-Order Logics Can’t quantify over Function symbols Predicate symbols Propositions 47 September, 2004 S. C. Shapiro
alo @ cse f buf Examples of SNe. PS Reasoning Using a Logic Designed for KRR 48 September, 2004 S. C. Shapiro
alo @ cse f buf SNe. PS, A “Higher-Order” Logic : all(R)(Transitive(R) => (all(x, y, z)(R(x, y) and R(y, z) => R(x, z)))). : Bigger(elephants, lions). : Bigger(lions, mice). : Transitive(Bigger). : Bigger(elephants, mice)? Bigger(elephants, mice) Really a higher-order language for a first-order logic 49 September, 2004 S. C. Shapiro
alo @ cse f buf “Higher-Order” Example 2 : all(source)(Trusted(source) => all(p)(Says(source, p) => p)). : Trusted(Agent 007). : Says(Agent 007, Dangerous(Dr_No)). : Dangerous(Dr_No)? Dangerous(Dr_No) 50 September, 2004 S. C. Shapiro
alo @ cse f buf Designing New Connectives : andor(1, 1){On. Floor(G 2), On. Floor(G 1), On. Floor(2)}. : On. Floor(G 1). : On. Floor(? where)? ~On. Floor(G 2) ~On. Floor(1) ~On. Floor(2) On. Floor(G 1) 51 September, 2004 S. C. Shapiro
alo @ cse f buf Belief Change : andor(1, 1){On. Floor(G 2), On. Floor(G 1), On. Floor(2)}. : {On. Floor(G 2), On. Floor(G 1)} => {Location(below. Ground)}. : {On. Floor(1), On. Floor(2)} => {Location(above. Ground)}. : perform believe(On. Floor(G 2)) : Location(? where)? Location(below. Ground) : perform believe(On. Floor(2)) : Location(? where)? Location(above. Ground) 52 September, 2004 S. C. Shapiro
alo @ cse f buf Summary 1 Symbolic KRR uses logic. There are many logics. The question is which to use. 53 September, 2004 S. C. Shapiro
alo @ cse f buf Summary 2 A logic has a Syntax Semantics Proof Theory Logics may Be sound Be complete Have a decision procedure 54 September, 2004 S. C. Shapiro
alo @ cse f buf Summary 3 Logics provide non-atomic wffs That can describe situations Without knowing all specifics 55 September, 2004 S. C. Shapiro
alo @ cse f buf Summary 4 One can design and build Useful new logics And reasoning systems using them. 56 September, 2004 S. C. Shapiro
- Slides: 56