ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.

Slides:



Advertisements
Similar presentations
Nested Quantifiers Section 1.4.
Advertisements

Artificial Intelligence
Semantics (Representing Meaning)
Knowledge Representation Methods
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
Propositional Calculus A propositional calculus formula is composed of atomic propositions, which area simply statements that are either true or false.
Knowledge Representation using First-Order Logic (Part II) Reading: Chapter 8, First lecture slides read: Second lecture slides read:
TCP1211-Logic Programming Formal Syntax and Semantics of Logic Programs Faculty of Information Technology Multimedia University.
Propositional Calculus Knowledge based agent Knowledge is contained in agents in the form of sentences in a knowledge representation language stored in.
FIRST-ORDER LOGIC FOL or FOPC
1 Predicates and quantifiers Chapter 8 Formal Specification using Z.
1 Knowledge Representation and Reasoning. 2 Knowledge Representation & Reasoning How knowledge about the world can be represented How knowledge about.
Formal Logic Mathematical Structures for Computer Science Chapter 1 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesFormal Logic.
FIRST ORDER LOGIC Levent Tolga EREN.
Predicates and Quantifiers
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
Discussion #141/20 Discussion #14 Predicate Calculus.
First Order Logic Chapter 7. PL is a Weak Representational Language §Propositional Logic (PL) is not a very expressive language because: §Hard to identify.
Introduction to AgentSpeak and Jason for Programming Multi-agent Systems (1) Dr Fuhua (Oscar) Lin SCIS Athabasca University June 19, 2009.
PART TWO PREDICATE LOGIC. Chapter Seven Predicate Logic Symbolization.
ARTIFICIAL INTELLIGENCE Lecture 3 Predicate Calculus.
1.  Provides the ability to access individual assertions. e.g. in Predicate calculus we may say: P denotes “It rained on Tuesday” but in predicate calculus.
11 Artificial Intelligence CS 165A Thursday, November 1, 2007  First-order logic (Ch 8)  Inference in FOL (Ch 9) 1.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
Propositional Calculus Knowledge based agent Knowledge is contained in agents in the form of sentences in a knowledge representation language stored in.
1 Predicate (Relational) Logic 1. Introduction The propositional logic is not powerful enough to express certain types of relationship between propositions.
DISCRETE COMPUTATIONAL STRUCTURES
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
Programming Languages and Design Lecture 3 Semantic Specifications of Programming Languages Instructor: Li Ma Department of Computer Science Texas Southern.
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.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
Artificial Intelligence Chapter 15 The Predicate Calculus Artificial Intelligence Chapter 15 The Predicate Calculus Biointelligence Lab School of Computer.
Artificial Intelligence First-Order Logic (FOL). Outline of this Chapter The need for FOL? What is a FOL? Syntax and semantics of FOL Using FOL.
For Wednesday Read chapter 9, sections 1-3 Homework: –Chapter 7, exercises 8 and 9.
For Friday Read chapter 8 Homework: –Chapter 7, exercises 2 and 10 Program 1, Milestone 2 due.
Discrete Structures Predicate Logic 1 Dr. Muhammad Humayoun Assistant Professor COMSATS Institute of Computer Science, Lahore.
1 CSC384: Intro to Artificial Intelligence Lecture 5.  Knowledge Representation.
Semantics of Predicate Calculus For the propositional calculus, an interpretation was simply an assignment of truth values to the proposition letters of.
Artificial Intelligence CIS 342 The College of Saint Rose David Goldschmidt, Ph.D.
PREDICATE CALCULS In Propositional Calculus, each atomic symbol denotes a proposition. But there is no way to access the components of an individual assertion.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
First-Order Logic Semantics Reading: Chapter 8, , FOL Syntax and Semantics read: FOL Knowledge Engineering read: FOL.
ARTIFICIAL INTELLIGENCE Lecture 2 Propositional Calculus.
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.
Chapter 3 Propositional calculus Predicate calculus Artificial Intelligence Dr.Hassan Al-Tarawneh.
رياضيات متقطعة لعلوم الحاسب MATH 226. Chapter 1 Predicates and Quantifiers 1.4.
Knowledge Representation and Reasoning 2
The Predicate Calculus
Knowledge Representation using First-Order Logic
The function of knowledge representation scheme is
Predicate Calculus Discussion #14 Chapter 2, Section 1 1/20.
Discussion #14 Predicate Calculus
Artificial Intelligence
CS201: Data Structures and Discrete Mathematics I
CHAPTER 1: LOGICS AND PROOF
Predicate Calculus Discussion #14 Chapter 2, Section 1.
Discrete Mathematics Lecture 4 & 5: Predicate and Quantifier
Discrete Mathematics Lecture 3: Predicate and Quantifier
Relational Logic Computational Logic Lecture 5
Discrete Mathematics Lecture 4 & 5: Predicate and Quantifier
CSNB234 ARTIFICIAL INTELLIGENCE
Chapter 1: Propositional and First-Order Logic
CS201: Data Structures and Discrete Mathematics I
Predicate Calculus. Predicate Calculus Topics Predicates Variables and instantiation Quantifiers Logical expressions Bound and free variables.
Predicate Logic: Syntax.
Predicate Logic.
Representations & Reasoning Systems (RRS) (2.2)
Presentation transcript:

ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information Technology Institute of Applied Computer Systems Department of Systems Theory and Design SYNTAX OF PREDICATE CALCULUS

Syntax of Predicate Calculus Predicate calculus provides more flexibility and a finer representation of the knowledge. For example, A = ball’s color is yellow - propositional calculus representation Color(ball, yellow) – predicate calculus representation

Syntax of Predicate Calculus Weather(Tuesday, rain) Weather(X, rain), where X is a day of a week This representation enhances knowledge processing by allowing the use of variables and functions. predicate calculus representation B = It rained on Tuesday - propositional calculus representation

Syntax of Predicate Calculus Symbols Predicate calculus symbols are irreducible syntactic elements: they cannot be broken into their component parts by the operations. The alphabet that makes up the symbols consists of: 1.The set of letters, both upper- and lowercase 2.The set of digits, 0, 1,..., 9 3.The underscore, _

Syntax of Predicate Calculus Symbols (continued) Symbols begin with the letter and are followed by any sequence of these legal symbols. For example, Agent007, father of, XXXXX, tom_and_jerry. All these strings are legal symbols.

Syntax of Predicate Calculus Symbols (continued) Contrary, 007agent, ab%cd, #duck, are examples of strings that are not legal symbols. Improper symbols “( )”, “,”, “.” do not denote objects or relations in the world, but are used solely to construct well- formed expressions.

Syntax of Predicate Calculus Symbols (continued) Symbols may represent constants are used to name specific objects or properties. In general, constants are symbols that begin with a lowercase letter.

Syntax of Predicate Calculus Symbols (continued) For example, the constant tom may represent the object Tom, a person in the domain. The constants true and false are reserved as truth symbols.

Syntax of Predicate Calculus Symbols (continued) Predicates A fact or proposition is divided into two parts: a predicate and an argument The argument represents the object or objects of the proposition and the predicate an assertion about the object.

Syntax of Predicate Calculus Symbols (continued) For example, to represent the proposition “Tom owns a car” we would write: owns(tom, car) Predicate denotes some relationship between arguments Arguments are symbols denoting objects within the problem

Syntax of Predicate Calculus Symbols (continued) Variables Variables are used to represent general classes of objects or properties in the world. For example, to capture the propositions “Tom likes Ann” and “Bob likes Mary”, we can write likes(X, Y)

Syntax of Predicate Calculus Symbols (continued) In this case, variables assume or instantiate the values X = {tom, bob}; Y = {ann, mary}. Variables can be used as arguments in a predicate expression or a function

Syntax of Predicate Calculus Symbols (continued) Functions Function denotes a mapping of one or more elements in a set (called the domain of the function) to a unique element of another set (the range of the function).

Syntax of Predicate Calculus Symbols (continued) Elements of the domain and range are objects in the world of discourse. Every function symbol has an associated arity, indicating the number of elements in the domain mapped onto each element of the range.

Syntax of Predicate Calculus Symbols (continued) A function expression consists of a function constant of arity n, followed by n terms (arguments), t 1, t 2,..., t n, enclosed in parentheses and separated by commas.

Syntax of Predicate Calculus Symbols (continued) A term is either a constant, variable, or function expression. Examples: price(apples), father(tom); father(bill), left_foot_of_(tom), minus(7, 3), f(X, Y, Z)

Syntax of Predicate Calculus Symbols (continued) Each function expression denotes the mapping of arguments onto a single object in the range, called the value of the function. The act of replacing a function with its value is called evaluation.

Syntax of Predicate Calculus Symbols (continued) Example: father(tom) = bob; father(bill) = john Function can be used within predicates: colleagues(father(tom), father(bill)) After the function expressions are evaluated, the expresion becomes: colleagues(bob, john)

Syntax of Predicate Calculus Atomic Sentences Predicates have an associated positive integer referred to as the arity or “argument number” for the predicate. Predicates with the same name but different arities are considered distinct. An atomic sentence is a predicate constant of arity n, followed by n terms, t 1, t 2,..., t n, enclosed in parentheses and separated by commas.

Syntax of Predicate Calculus Atomic Sentences (continued) The truth values, true and false, are also atomic sentences. Atomic sentences are also called atomic expressions, atoms, or propositions. Examples: equal(minus(7, 3), seven) is an atomic sentence equal(minus(seven, three), four) is an atomic sentence minus(seven, three) is not an atomic sentence.

Syntax of Predicate Calculus Complex Sentences Atomic sentences can be combined using logical operators to form complex sentences: Every atomic sentence is a sentence S. 1.If S is a sentence, then so is  S. 2.If S1 and S2 are sentences, then so is S1  S2.

Syntax of Predicate Calculus Complex Sentences (continued) 3.If S1 and S2 are sentences, then so is S1  S2. 4.If S1 and S2 are sentences, then so is S1  S2. 5.If S1 and S2 are sentences, then so is S1  S2.

Syntax of Predicate Calculus Complex Sentences (continued) Example: likes(bob, mary) likes(george, mary) atomic sentences likes(bob, mary)  likes(george, mary)   likes(bob, george)

Syntax of Predicate Calculus Complex Sentences (continued) Or, general implication likes(X, Y)  likes(Z, Y)   likes(X, Z) Captures the knowledge “If two different individuals like the same person, then they dislike each other”

Syntax of Predicate Calculus Complex Sentences (continued) When a variable appears as an argument in a sentence, it refers to unspecified objects in the domain.

Syntax of Predicate Calculus Complex Sentences (continued) Predicate calculus includes two other symbols called variable quantifiers  and , that are used to define the range or scope of the variable in a logical expression. In other words, variable quantifiers constrain the meaning of a sentence containing a variable.

Syntax of Predicate Calculus Complex Sentences (continued) The universal quantifier, , indicates that the sentence is true for all values of the quantified variable. For example, statement “Everybody likes Mary” may be written like  X likes(X, mary) and it is true for all values of X.

Syntax of Predicate Calculus Complex Sentences (continued) If X = { john, paul, george, ringo }, then likes(john, mary)  likes(paul, mary)  likes(george, mary)  likes(ringo, mary) In general,  X p(X)  p(x 1 )  p(x 2 ) ...  p(x n ) any predicate

Syntax of Predicate Calculus Complex Sentences (continued) The existential quantifier, , indicates that sentence is true for some value(s) in the domain, i.e., at least one value “exists” that makes the sentence true. For example, the statement “At least someone likes ice cream” may be written like  X likes(X, ice_cream) and it is true for at least one (but not necessarily exactly one!) object, indicated by the variable X.

Syntax of Predicate Calculus Complex Sentences (continued) If Y = { john, paul, george, ringo }, and we know that the first two like ice cream and the second two not, then variable X instantiate all these constants, and two statements, namely likes(john, ice_cream) and likes(paul, ice_cream) are true, while likes(george, ice_cream) and likes(ringo, ice_cream) are false. If general,  X p(X)  p(x 1 )  p(x 2 ) ...  p(x n ) any predicate

Syntax of Predicate Calculus Complex Sentences (continued) 6.If X is a variable and s a sentence, then  Xs is a sentence. 7.If X is a variable and s a sentence, then  Xs is a sentence. Parentheses are used to indicate the scope of quantification, that is, the range over which the instances of the variable hold.

Syntax of Predicate Calculus Complex Sentences (continued) Examples: a)  X (cat(X)  animal(X)) This logical expression represents the statement “All cats are animals”. b)  X (likes(X, mary)  nice(mary)  nice(X)) This logical expression determines all instances of X who like Mary, and if Mary is nice, then it is implied that those who like Mary are also nice.

Syntax of Predicate Calculus Complex Sentences (continued) c)  X, Y (parent(X, Y)  child(Y, X) This logical expression represents the statement “For all persons, if X is a parent of Y, then Y is a child of X”. d)  X  Y loves(X, Y) This logical expression represents the statement “Everybody loves somebody”.

Syntax of Predicate Calculus Complex Sentences (continued) e)  Y  X loves(X, Y) This logical expression represents the statement “Somebody is loved by everybody”.