Artificial Intelligence University Politehnica of Bucharest 2008-2009 Adina Magda Florea

Slides:



Advertisements
Similar presentations
First-Order Logic.
Advertisements

Artificial Intelligence Chapter 13 The Propositional Calculus Biointelligence Lab School of Computer Sci. & Eng. Seoul National University.
Biointelligence Lab School of Computer Sci. & Eng.
Artificial Intelligence University Politehnica of Bucharest Adina Magda Florea
Knowledge Representation and Reasoning University "Politehnica" of Bucharest Department of Computer Science Fall 2010 Adina Magda Florea
Artificial Intelligence
Logic Use mathematical deduction to derive new knowledge.
Agents That Reason Logically Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 7 Spring 2004.
Logic Concepts Lecture Module 11.
Artificial Intelligence First-Order Predicate Logic -
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)
Computability and Complexity 8-1 Computability and Complexity Andrei Bulatov Logic Reminder.
TR1413: Discrete Mathematics For Computer Science Lecture 3: Formal approach to propositional logic.
Knowledge Representation I (Propositional Logic) CSE 473.
Knoweldge Representation & Reasoning
Introduction to Logic for Artificial Intelligence Lecture 1 Erik Sandewall 2010.
Inference in FOL All PL inference rules hold in FOL, as well as the following additional ones: –Universal elimination rule:  x, A ===> Subst({x / g},
TR1413: Discrete Mathematics For Computer Science Lecture 4: System L.
EE1J2 - Slide 1 EE1J2 – Discrete Maths Lecture 6 Limitations of propositional logic Introduction to predicate logic Symbols, terms and formulae, Parse.
I NTRO TO L OGIC Dr Shlomo Hershkop March
CSE PredLogic 1 Knowledge Representation with Logic: First Order Predicate Calculus Outline –Introduction to First Order Predicate Calculus (FOPC)
1 Chapter 7 Propositional and Predicate Logic. 2 Chapter 7 Contents (1) l What is Logic? l Logical Operators l Translating between English and Logic l.
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
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.
ARTIFICIAL INTELLIGENCE Lecture 3 Predicate Calculus.
Propositional Logic Dr. Rogelio Dávila Pérez Profesor-Investigador División de Posgrado Universidad Autónoma Guadalajara
Computing & Information Sciences Kansas State University Wednesday, 20 Sep 2006CIS 490 / 730: Artificial Intelligence Lecture 12 of 42 Wednesday, 20 September.
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 11 of 41 Wednesday, 15.
1 Introduction to Computational Linguistics Eleni Miltsakaki AUTH Spring 2006-Lecture 8.
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 12 Friday, 17 September.
9/30/98 Prof. Richard Fikes Inference In First Order Logic Computer Science Department Stanford University CS222 Fall 1998.
1 Introduction to Abstract Mathematics Chapter 2: The Logic of Quantified Statements. Predicate Calculus Instructor: Hayk Melikya 2.3.
CS6133 Software Specification and Verification
Artificial Intelligence Chapter 15 The Predicate Calculus Artificial Intelligence Chapter 15 The Predicate Calculus Biointelligence Lab School of Computer.
For Wednesday Read chapter 9, sections 1-3 Homework: –Chapter 7, exercises 8 and 9.
Artificial Intelligence “Introduction to Formal Logic” Jennifer J. Burg Department of Mathematics and Computer Science.
For Friday Read chapter 8 Homework: –Chapter 7, exercises 2 and 10 Program 1, Milestone 2 due.
CSCI 5582 Fall 2006 CSCI 5582 Artificial Intelligence Lecture 11 Jim Martin.
ECE457 Applied Artificial Intelligence R. Khoury (2007)Page 1 Implication Truth Table If α is true, then β must be true for the implication to be true.
Knowledge Repn. & Reasoning Lec. #5: First-Order Logic UIUC CS 498: Section EA Professor: Eyal Amir Fall Semester 2004.
Chapter 7. Propositional and Predicate Logic Fall 2013 Comp3710 Artificial Intelligence Computing Science Thompson Rivers University.
CS.462 Artificial Intelligence SOMCHAI THANGSATHITYANGKUL Lecture 05 : Knowledge Base & First Order Logic.
Computing & Information Sciences Kansas State University Lecture 12 of 42 CIS 530 / 730 Artificial Intelligence Lecture 12 of 42 William H. Hsu Department.
Artificial Intelligence First-Order Predicate Logic - First-Order Predicate Logic (FOL or FOPL), also called First-Order Predicate Calculus.
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.
Today’s Topics 11/17/15CS Fall 2015 (Shavlik©), Lecture 24, Week 111 Representing Knowledge in a Logic One way to get domain knowledge into a computer,
Lecture 041 Predicate Calculus Learning outcomes Students are able to: 1. Evaluate predicate 2. Translate predicate into human language and vice versa.
March 3, 2016Introduction to Artificial Intelligence Lecture 12: Knowledge Representation & Reasoning I 1 Back to “Serious” Topics… Knowledge Representation.
Computing & Information Sciences Kansas State University Monday, 18 Sep 2006CIS 490 / 730: Artificial Intelligence Lecture 11 of 42 Monday, 18 September.
Chapter 7. Propositional and Predicate Logic
Introduction to Logic for Artificial Intelligence Lecture 2
Formal Modeling Concepts
Knowledge Representation and Reasoning
Introduction to Logic for Artificial Intelligence Lecture 1
Logic Use mathematical deduction to derive new knowledge.
Artificial Intelligence Chapter 15. The Predicate Calculus
CS 416 Artificial Intelligence
Relational Proofs Computational Logic Lecture 8
Back to “Serious” Topics…
Relational Proofs Computational Logic Lecture 7
Chapter 7. Propositional and Predicate Logic
CSNB234 ARTIFICIAL INTELLIGENCE
Inference in FOL All PL inference rules hold in FOL, as well as the following additional ones: Universal elimination rule: x, A ===> Subst({x / g}, A).
Relational Proofs Computational Logic Lecture 7
Relational Proofs Computational Logic Lecture 7
Presentation transcript:

Artificial Intelligence University Politehnica of Bucharest Adina Magda Florea

Lecture No. 4 Knowledge representation in AI Symbolic Logic Simbolic logic representation Formal system Propositional logic Predicate logic Theorem proving

1. Knowledge representation Why Symbolic logic Power of representation Formal language: syntax, semantics Conceptualization + representation in a language Inference rules

2. Formal systems O formal system is a quadruple A rule of inference of arity n is an association: Immediate consequence Be the set of premises An element is an immediate consequence of a set of premises 

Formal systems - cont If then the elements of E i are called theorems Be a theorem; it can be obtained by successive applications of i.r on the formulas in E i Sequence of rules - demonstration. |  S x |  R x If thencan be deduced from   |  S x

3. Propositional logic Formal language 3.1 Syntax Alphabet A well-formed formula (wff) in propositional logic is: (1) An atom is a wff (2) If P is a wff, then ~P is a wff. (3) If P and Q are wffs then P  Q, P  Q, P  Q si P  Q are wffs. (4) The set of all wffs can be generated by repeatedly applying rules (1)..(3).

3.2 Semantics Interpretation Evaluation function of a formula Properties of wffs Valid / tautulogy Satisfiable Contradiction Equivalent formulas

Semantics - cont A formula F is a logical consequence of a formula P A formula F is a logical consequence of a set of formulas P 1,…P n Notation of logical consequence P 1,…P n  F. Theorem.Formula F is a logical consequence of a set of formulas P 1,…P n if the formula P 1,…P n  F is valid. Teorema. Formula F is a logical consequence of a set of formulas P 1,…P n if the formula P 1  …  P n  ~F is a contradiction.

Equivalence rules

3.3 Obtaining new knowledge Conceptualization Reprezentation in a formal language Model theory KB ||  x M Proof theory KB |  S x M Monotonic logics Non-monotonic logics

3.4 Inference rules Modus Ponens Substitution Chain rule AND introduction Transposition

Example Mihai has money The car is white The car is nice If the car is white or the car is nice and Mihai has money then Mihai goes to the mountain B A F (A  F)  B  C

4. First order predicate logic 4.1 Syntax Be D a domain of values. A term is defined as: (1)A constant is a term with a fixed value belonging to D. (2)A variable is a term which may take values in D. (3)If f is a function of n arguments and t 1,..t n are terms then f(t 1,..t n ) is a term. (4)All terms are generated by the application of rules (1)…(3).

Predicates of arity n Atom or atomic formula. Literal A well formed formula (wff) in first order predicate logic is defined as: (1)A atom is an wff (2)If P[x] is a wff then ~P[x] is an wff. (3)If P[x] and Q [x] are wffs then P[x]  Q[x], P[x]  Q[x], P  Q and P  Q are wffs. (4)If P[x] is an wff then  x P[x],  x P[x] are wffs. (5)The set of all wffs can be generated by repeatedly applying rules (1)..(4). Syntax PL - cont

Syntax - schematically

CNF, DNF Conjunctive normal form (CNF) F 1  …  F n, F i, i=1,n (L i1  …  L im ). Disjunctive normal form (DNF) F 1  …  F n, F i, i=1,n (L i1  …  L im )

The interpretation of a formula F in first order predicate logic consists of fixing a domain of values (non empty) D and of an association of values for every constant, function and predicate in the formula F as follows: (1)Every constant has an associated value in D. (2)Every function f, of arity n, is defined by the correspondence where (3)Every predicate of arity n, is defined by the correspondence 4.2 Semantics of PL

X=1 X=2 D={1,2} Interpretation - example

4.3 Properties of wffs in PL Valid / tautulogy Satisfiable Contradiction Equivalent formulas A formula F is a logical consequence of a formula P A formula F is a logical consequence of a set of formulas P 1,…P n Notation of logical consequence P 1,…P n  F. Theorem.Formula F is a logical consequence of a set of formulas P 1,…P n if the formula P 1  …  P n  F is valid. Teorema. Formula F is a logical consequence of a set of formulas P 1,…P n if the formula P 1  …  P n  ~F is a contradiction.

Equivalence of quantifiers

Examples All apples are red All objects are red apples There is a red apple All packages in room 27 are smaller than any package in room 28 All purple mushrooms are poisonous  x (Purple(x)  Mushroom(x))  Poisonous(x)  x Purple(x)  (Mushroom(x)  Poisonous(x))  x Mushroom (x)  (Purple (x)  Poisonous(x)) (  x)(  y) loves(x,y) (  y)(  x)loves(x,y)

4.4. Inference rules in PL Modus Ponens  Substitution  Chaining  Transpozition  AND elimination (AE)  AND introduction (AI)  Universal instantiation (UI)  Existential instantiation (EI)  Rezolution

Example Horses are faster than dogs and there is a greyhound that is faster than every rabbit. We know that Harry is a horse and that Ralph is a rabbit. Derive that Harry is faster than Ralph. Horse(x) Greyhound(y) Dog(y) Rabbit(z) Faster(y,z))  y Greyhound(y)  Dog(y)  x  y  z Faster(x,y)  Faster(y,z)  Faster(x,z)  x  y Horse(x)  Dog(y)  Faster(x,y)  y Greyhound(y)  (  z Rabbit(z)  Faster(y,z)) Horse(Harry) Rabbit(Ralph)

Proof example Theorem: Faster(Harry, Ralph) ? Proof using inference rules 1.  x  y Horse(x)  Dog(y)  Faster(x,y) 2.  y Greyhound(y)  (  z Rabbit(z)  Faster(y,z)) 3.  y Greyhound(y)  Dog(y) 4.  x  y  z Faster(x,y)  Faster(y,z)  Faster(x,z) 5. Horse(Harry) 6. Rabbit(Ralph) 7. Greyhound(Greg)  (  z Rabbit(z)  Faster(Greg,z))2, EI 8. Greyhound(Greg)7, AE 9.  z Rabbit(z)  Faster(Greg,z))7, AE

10. Rabbit(Ralph)  Faster(Greg,Ralph)9, UI 11. Faster(Greg,Ralph)6,10, MP 12. Greyhound(Greg)  Dog(Greg)3, UI 13. Dog(Greg)12, 8, MP 14. Horse(Harry)  Dog(Greg)  Faster(Harry, Greg)1, UI 15. Horse(Harry)  Dog(Greg)5, 13, AI 16. Faster(Harry, Greg)14, 15, MP 17. Faster(Harry, Greg)  Faster(Greg, Ralph)  Faster(Harry,Ralph) 4, UI 18. Faster(Harry, Greg)  Faster(Greg, Ralph)16, 11, AI 19. Faster(Harry,Ralph)17, 19, MP Proof example - cont