Knowledge Representation Methods

Slides:



Advertisements
Similar presentations
Artificial Intelligence
Advertisements

1 Knowledge Representation Introduction KR and Logic.
Artificial Intelligence 4. Knowledge Representation
The Foundations: Logic and Proofs
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.
Logic Use mathematical deduction to derive new knowledge.
Knowledge Representation
L41 Lecture 2: Predicates and Quantifiers.. L42 Agenda Predicates and Quantifiers –Existential Quantifier  –Universal Quantifier 
F22H1 Logic and Proof Week 7 Clausal Form and Resolution.
CAS LX 502 8a. Formal semantics Truth and meaning The basis of formal semantics: knowing the meaning of a sentence is knowing under what conditions.
Propositional Calculus A propositional calculus formula is composed of atomic propositions, which area simply statements that are either true or false.
Logic. Propositional Logic Logic as a Knowledge Representation Language A Logic is a formal language, with precisely defined syntax and semantics, which.
Discrete Mathematics Lecture 2 Alexander Bukharovich New York University.
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 I (Propositional Logic) CSE 473.
Formal Logic Mathematical Structures for Computer Science Chapter 1 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesFormal Logic.
Logical and Rule-Based Reasoning Part I. Logical Models and Reasoning Big Question: Do people think logically?
Adapted from Discrete Math
Predicates and Quantifiers
Formal Logic Mathematical Structures for Computer Science Chapter Copyright © 2006 W.H. Freeman & Co.MSCS SlidesFormal Logic.
Artificial Intelligence 4. Knowledge Representation Course V231 Department of Computing Imperial College, London © Simon Colton.
 Predicate: A sentence that contains a finite number of variables and becomes a statement when values are substituted for the variables. ◦ Domain: the.
First Order Logic Chapter 7. PL is a Weak Representational Language §Propositional Logic (PL) is not a very expressive language because: §Hard to identify.
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.
Propositional Calculus Composed of symbols –P – some true statement P might represent something like “It is Monday” or “the car is red” And sentences –a.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
Pattern-directed inference systems
1 CMSC 471 Fall 2002 Class #10/12–Wednesday, October 2 / Wednesday, October 9.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
1 Predicate (Relational) Logic 1. Introduction The propositional logic is not powerful enough to express certain types of relationship between propositions.
1 Introduction to Computational Linguistics Eleni Miltsakaki AUTH Spring 2006-Lecture 8.
Hazırlayan DISCRETE COMPUTATIONAL STRUCTURES Propositional Logic PROF. DR. YUSUF OYSAL.
1 Introduction to Abstract Mathematics Chapter 2: The Logic of Quantified Statements. Predicate Calculus Instructor: Hayk Melikya 2.3.
CS6133 Software Specification and Verification
Word Problem Consider the following problem: To register, you will need either a yellow card or a note from the Dean. To obtain a note from the Dean you.
For Wednesday Read chapter 9, sections 1-3 Homework: –Chapter 7, exercises 8 and 9.
Propositional Logic Predicate Logic
CS 285- Discrete Mathematics Lecture 4. Section 1.3 Predicate logic Predicate logic is an extension of propositional logic that permits concisely reasoning.
For Friday Read chapter 8 Homework: –Chapter 7, exercises 2 and 10 Program 1, Milestone 2 due.
11 Artificial Intelligence CS 165A Thursday, October 25, 2007  Knowledge and reasoning (Ch 7) Propositional logic 1.
Chapter 7. Propositional and Predicate Logic Fall 2013 Comp3710 Artificial Intelligence Computing Science Thompson Rivers University.
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 Knowledge Representation Department of Computer Science & Enggineering V. R. Palekar.
Section 1.5 and 1.6 Predicates and Quantifiers. Vocabulary Predicate Domain Universal Quantifier Existential Quantifier Counterexample Free variable Bound.
1 Chapter 2.1 Chapter 2.2 Chapter 2.3 Chapter 2.4 All images are copyrighted to their respective copyright holders and reproduced here for academic purposes.
Lecture 041 Predicate Calculus Learning outcomes Students are able to: 1. Evaluate predicate 2. Translate predicate into human language and vice versa.
Section 1.4. Propositional Functions Propositional functions become propositions (and have truth values) when their variables are each replaced by a value.
Discrete Mathematical Structures: Theory and Applications 1 Logic: Learning Objectives  Learn about statements (propositions)  Learn how to use logical.
1 Section 7.1 First-Order Predicate Calculus Predicate calculus studies the internal structure of sentences where subjects are applied to predicates existentially.
Artificial Intelligence Knowledge Representation.
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.
Uniqueness Quantifier ROI for Quantified Statement.
Lecture 1-3: Quantifiers and Predicates. Variables –A variable is a symbol that stands for an individual in a collection or set. –Example, a variable.
CENG 424-Logic for CS Introduction Based on the Lecture Notes of Konstantin Korovin, Valentin Goranko, Russel and Norvig, and Michael Genesereth.
Artificial Intelligence 4. Knowledge Representation
Chapter 7. Propositional and Predicate Logic
Advanced Algorithms Analysis and Design
Proposition & Predicates
CS201: Data Structures and Discrete Mathematics I
Chapter 7. Propositional and Predicate Logic
Predicates and Quantifiers
Propositional Logic CMSC 471 Chapter , 7.7 and Chuck Dyer
CS201: Data Structures and Discrete Mathematics I
ece 720 intelligent web: ontology and beyond
Predicate Logic: Syntax.
The Foundations: Logic and Proofs
Presentation transcript:

Knowledge Representation Methods Predicate Logic

Introduction: Logic

Introduction: Logic Representing knowledge using logic is appealing because you can derive new knowledge from old mathematical deduction. In this formalism you can conclude that a new statement is true if by proving that it follows from the statement that are already known. It provides a way of deducing new statements from old ones.

Introduction: Logic A Logic is language with concrete rules No ambiguity in representation (may be other errors!) Allows unambiguous communication and processing Very unlike natural languages e.g. English Many ways to translate between languages A statement can be represented in different logics And perhaps differently in same logic Expressiveness of a logic How much can we say in this language? Not to be confused with logical reasoning Logics are languages, reasoning is a process (may use logic)

Syntax and Semantics Syntax Semantics Rules for constructing legal sentences in the logic Which symbols we can use (English: letters, punctuation) How we are allowed to combine symbols Semantics How we interpret (read) sentences in the logic Assigns a meaning to each sentence Example: “All lecturers are seven foot tall” A valid sentence (syntax) And we can understand the meaning (semantics) This sentence happens to be false (there is a counterexample)

Syntax and Semantics Syntax Semantics (Classical AKA Boolean) Propositions, e.g. “it is raining” Connectives: and, or, not, implies, iff (equivalent) Brackets, T (true) and F (false) Semantics (Classical AKA Boolean) Define how connectives affect truth “P and Q” is true if and only if P is true and Q is true Use truth tables to work out the truth of statements

Propositional Logic We can represent real world facts as logical propositions written as well-formed formulas (wff’s). E.g., It is raining : RAINING It is sunny : SUNNY It is windy : WINDY It is raining then it is not sunny (This is logical conclusion) RAINING → ¬ SUNNY (Propositional logic representation)

Propositional Logic Propositional logic is the simplest way of attempting representing knowledge in logic using symbols. Symbols represent facts: P, Q, etc.. These are joined by logical connectives (and, or, implication) e.g., P  Q; Q  R Given some statements in the logic we can deduce new facts (e.g., from above deduce R)

Propositional Logic Propositional logic isn’t powerful enough as a general knowledge representation language. Impossible to make general statements. E.g., “all students sit exams” or “if any student sits an exam they either pass or fail”. So we need predicate logic.

Predicate Logic Propositional logic combines atoms An atom contains no propositional connectives Have no structure (today_is_wet, john_likes_apples) Predicates allow us to talk about objects Properties: is_wet(today) Relations: likes(john, apples) True or false In predicate logic each atom is a predicate e.g. first order logic, higher-order logic

Predicate Logic: First order Logic More expressive logic than propositional Used in this course (Lecture 6 on representation in FOL) Constants are objects: john, apples Predicates are properties and relations: likes(john, apples) Functions transform objects: likes(john, fruit_of(apple_tree)) Variables represent any object: likes(X, apples) Quantifiers qualify values of variables True for all objects (Universal): X. likes(X, apples) Exists at least one object (Existential): X. likes(X, apples)

First-Order Logic (FOL)

Example

Existential Quantification

Example

Predicate Logic In predicate logic the basic unit is a predicate/ argument structure called an atomic sentence: likes(alison, chocolate) tall(fred) Arguments can be any of: constant symbol, such as ‘alison’ variable symbol, such as X function expression, e.g., motherof(fred)

Predicate Logic So we can have: likes(X, richard) friends(motherof(joe), motherof(jim))

Predicate logic: Syntax These atomic sentences can be combined using logic connectives likes(john, mary)  tall(mary) tall(john)  nice(john) Sentences can also be formed using quantifiers  (forall) and  (there exists) to indicate how to treat variables:  X lovely(X) Everything is lovely.  X lovely(X) Something is lovely.  X in(X, garden) lovely(X) Everything in the garden is lovely.

Predicate Logic: Syntax Can have several quantifiers, e.g.,  X  Y loves(X, Y)  X handsome(X)   Y loves(Y, X) So we can represent things like: All men are mortal. No one likes brussel sprouts. Everyone taking AI will pass their exams. Every race has a winner. John likes everyone who is tall. John doesn’t like anyone who likes brussel sprouts. There is something small and slimy on the table.

Predicate Logic: Semantics There is a precise meaning to expressions in predicate logic. Like in propositional logic, it is all about determining whether something is true or false.  X P(X) means that P(X) must be true for every object X in the domain of interest

Predicate Logic: Semantics  X P(X) means that P(X) must be true for at least one object X in the domain of interest. So if we have a domain of interest consisting of just two people, john and mary, and we know that tall(mary) and tall(john) are true, we can say that  X tall(X) is true.

Proof and inference Again we can define inference rules allowing us to say that if certain things are true, certain other things are sure to be true, e.g.  X P(X)  Q(X) P(something) ----------------- (so we can conclude) Q(something) This involves matching P(X) against P(something) and binding the variable X to the symbol something.

Proof and Inference What can we conclude from the following?  X tall(X)  strong(X) tall(john)  X strong(X)  loves(mary, X)

Prolog and Logic The language which is based upon predicate logic is PROLOG. But it has slightly difference in syntax. a(X) :- b(X), c(X). Equivalent to  X a(X)  b(X)  c(X) Or equivalently  X b(X)  c(X) a(X) Prolog has a built in proof/inference procedure, that lets you determine what is true given some initial set of facts. Proof method called “resolution”.

O ther Logics Predicate logic not powerful enough to represent and reason on things like time, beliefs, possibility. “He may do X” He will do X. I believe he should do X. Specialised logics exist to support reasoning on this kind of knowledge

Motivation The major motivation for choosing logic as representation tool is that we can reason with that knowledge.