Predicate Logic in Artificial Intelligence

undefined
 
ARTIFICIAL INTELLIGENCE
 
S.MANIMOZHI
ASSISTANT PROFESSOR,
DEPARTMENT OF CA
BON SECOURS COLLEGE FOR WOMEN,
THANJAVUR
 
Ch
apter 
5: Using Predicate
 
Logic
 
Representing simple facts in
 
Logic
Representing Instance and Isa
 
relationships
 
Slide
 
1
 
Using Predicate
 
Logic
 
L
o
g
i
c
Logic 
is 
concerned with the truth of statements 
about 
the world.
Generally each statement 
is 
either 
TRUE 
or
 
FALSE
.
Logic includes :
Syntax , Semantics and Inference
 
Procedure
.
 
S
y
n
t
a
x
 
:
S
p
e
c
i
f
i
e
s
 
t
h
e
 
s
y
m
b
o
l
s
 
i
n
 
t
h
e
 
l
a
n
g
u
a
g
e
 
a
b
o
u
t
 
h
o
w
 
t
h
e
y
 
c
a
n
 
b
e
 
c
o
m
b
i
n
e
d
 
t
o
 
f
o
r
m
 
s
e
n
t
e
n
c
e
s
.
 
T
h
e
 
f
a
c
t
s
 
a
b
o
u
t
 
t
h
e
 
w
o
r
l
d
 
a
r
e
 
r
e
p
r
e
s
e
n
t
e
d
 
a
s
 
s
e
n
t
e
n
c
e
s
 
i
n
 
l
o
g
i
c
.
 
Slide
 
2
 
Using Predicate
 
Logic
 
S
e
m
a
n
t
i
c
 
:
Specifies how 
to 
assign a truth value 
to 
a sentence based on
its  
meaning 
in the world.
 
It 
Specifies what facts a sentence refers to.
 
A fact 
is 
a claim about the world, and 
it 
may be 
TRUE 
or
FALSE
.
I
n
f
e
r
e
n
c
e
 
P
r
o
c
e
d
u
r
e
 
:
Specifies
 
methods
 
for
 
computing
 
new
 
sentences
 
from
 
the
existing
 
sentences
 
.
 
Slide
 
2
 
Representing Simple Facts in
 
Logic
 
Using propositional
 
logic
–Rea
l-
w
o
rld
 
facts
 
are repre
s
e
n
ted
 
as
 
logic
a
l
 
pro
p
o
s
it
i
o
n
s
 
wr
itten 
as well-formed formulas
 
(wff’s)
–Example
 
1:
 
Representing Simple Facts in
 
Logic
 
Example
 
2:
 
Slide
 
6
 
=> Since the assertions are separate, 
it 
is not possible to dra
w any conclusion about similarities between Socrates and
 
Pl
ato.
 
Representing Simple Facts in
 
Logic
 
It would be much better to represent these facts
 
as
 
This 
fails 
to 
capture the relationship between any individual being  a man 
and 
that
individual being a
 
mortal.
Therefore 
it is necessary to move to first 
order predicate 
logic 
as a  way of representing
knowledge because 
it 
permits representation o   f things that cannot reasonably be
represented in 
prepositional logi  c.
In 
predicate logic, real world facts are represented as
 
statements
 written as
 
wff’s
 
.
 
Slide
 
5
 
Representing Simple Facts in
 
Logic
 
Slide
 
8
 
Q 
Propositional logic 
vs. 
predicate
 
logic
–Using propositional
 
logic
Theorem proving is
 
decidable
Cannot represent objects and
 
quantification
–Using predicate
 
logic
Can represent objects and
 
quantification
Theorem proving is
 
semi-decidable
 
Representing Simple Facts in
 
Logic
 
Slide
 
9
 
Consider the following set of
 
sentences.
1.
Marcus was a
 
man.
2.
Marcus was a
 
Pompeian.
3.
All Pompeians were
 
Romans.
4.
Caesar was a
 
ruler.
5.
All Romans were either loyal to Caesar or hated
 
him.
6.
Every one is loyal to
 
someone.
7.
Pe
o
ple
 
o
n
ly try 
t
o
 
a
s
s
a
s
s
i
n
a
te
 
rulers
 
they
 
are not loy
a
l
 
to.
8.
Marcus 
tried to 
assassinate
 
Caesar
 
Representing Simple Facts in
 
Logic
 
Slide
 
10
 
1.
Mar
c
us
 
w
a
s
 
a ma
n
.
 
m
a
n(M
a
r  cus)
 
2.
Mar
c
us
 
w
a
s
 
a Po
m
p
e
ian.
 
Po  mpeian(Marcus)
 
3.
All Pompeians were
 
Romans.  x:
 
Pompeian(x)
 
Roman(x)
 
4.
C
a
e
s
ar
 
w
a
s
 
a ruler.
 
ruler(Cae  sar)
 
Representing Simple Facts in
 
Logic
 
Slide
 
11
 
5.
 
All Romans were either loyal to Caesar or hated
 
him.
In English the word 
‘or’ 
means the logical inclusive-or and
sometimes means the logical
 
exclusive-or(XOR)
 
hate(x,
 
Caesar)
 
inclusive-or
x:
 
Roman(x)
 
loyalto(x,
 
Caesar)
 
exclusive-or
 
(XOR)
x:
 
Roman(x)
 
(loyalto(x,
 
Caesar)
 
hate(x,
 
Caesar))
 
(
 
loyalto(x,
 
Caesar)
 
hate(x,
 
Caesar))
 
Representing Simple Facts in
 
Logic
 
Slide
 
12
 
6.
Every one is loyal to
 
someone.  x
y: loyalto(x,
 
y)
7.
People only try 
to 
assassinate rulers they are not loyal  to.
x:
  
y:
 
person(x)
 
ruler(y)
 
tryassassinate(x,
 
y)
loyalto(x,
 
y)
 
8.
Mar
c
us
 
tr
i
ed
 
t
o
 
a
s
s
a
s
s
ina
t
e
 
C
a
e
s
ar.
 
trya
s
s
a
s
s
ina
t
e(
Marcus,
 
Caesar)
 
Representing Simple Facts in
 
Logic
 
Slide
 
13
 
To answer the
 
question
Was Marcus loyal to
 
Caesar?
To produce a formal proof , reasoning backward from
 
th
e desired
 
goal
loyalto(Marcus,
 
Caesar)
To prove the goal, rules of inference 
are to 
be used 
to 
trans
form into another goal that 
in 
turn be transformed and s
o on, until there are no insatisfied goals
 
remaining.
 
Representing Simple Facts in
 
Logic
 
Slide
 
14
 
This attempt fails , since there is no way to satisfy the goal perso
n(Marcus)with the statements
 
available.
The problem is although its known that Marcus was a man there
is no way to conclude
 
it.
Therefore another representation is added
 
namely
 
Representing Simple Facts in
 
Logic
 
9.All men are people
x:m
a
n(x)
pers
o
n(x)
This satisfies the last goal and produce a proof that Marcus w  as not loyal to
ceasar.
Three 
important 
issues 
to 
be addressed 
in 
this process  of converting
English 
sentences 
to logical 
statements 
and 
the  
n using these statements 
to
deduce new
 
ones.
Many English sentences are 
ambiguous. 
Choosing the
 
corre  ct interpretation
may be
 
difficult.
There is often a choice of how 
to 
represent knowledge
Obvious information may be necessary 
for
 
reasoning
 
Slide
 
13
 
Representing Instance & Isa
 
Relationships
 
Attributes “ IsA ” 
and 
“ Instance ” support property inheritance  and play important
role 
in 
knowledge representation.
The 
ways  
these two attributes "instance" and "isa", are logically expresse  d are
shown 
in 
the example below
 
:
Example : A simple sentence like "Joe 
is 
a
 
musician"
H
e
r
e
 
"
i
s
 
a
"
 
(
c
a
l
l
e
d
 
I
s
A
)
 
i
s
 
a
 
w
a
y
 
o
f
 
e
x
p
r
e
s
s
i
n
g
 
w
h
a
t
 
 
l
o
g
i
c
a
l
l
y
 
i
s
 
c
a
l
l
e
d
 
a
c
l
a
s
s
-
i
n
s
t
a
n
c
e
 
r
e
l
a
t
i
o
n
s
h
i
p
 
b
e
t
w
e
e
n
 
t
h
e
 
s
u
 
 
b
j
e
c
t
s
 
r
e
p
r
e
s
e
n
t
e
d
 
b
y
 
t
h
e
 
t
e
r
m
s
"
J
o
e
"
 
a
n
d
 
"
m
u
s
i
c
i
a
n
"
.
◊ "Joe" 
is 
an 
instance
 of the class of things 
called 
"musician". "  Joe" plays the
role of
 
instance,
 
"musician" plays the role of class 
in 
that
 
sentence.
◊ Note : In such a sentence, while for a human there 
is 
no con  fusion, but for
computers 
each 
relationship have 
to 
be defined  explicitly.
 
Representing Instance & Isa
 
Relationships
 
Slide
 
17
 
Representing 
Instance 
& Isa
 
Relationships
 
Slide
 
18
 
The 
first part 
of the figure contains the representations, 
in whic
h the
class membership 
is 
represented with unary predicates,  each
corresponding 
to 
a class. Asserting that p(x) 
is 
true 
is 
equi  valent 
to
asserting that X 
is 
an instance of p.
The second part uses the instance 
predicate 
explicitly. It 
is 
a b  inary
one, whose 
first 
argument 
is 
an object and whose second  argument
is 
a class 
to 
which the object belongs. 
The 
implicatio  
n rule 
in
statement 3 states that object 
is 
an instance of the sub  class
pompeian then 
it is 
an instance of the superclass
 
Roman.
 
Representing 
Instance 
& Isa
 
Relationships
 
Slide
 
19
 
The 
third part contains representations that use both the instan  ce
and 
isa 
predicates 
explicitly. 
Use of 
isa simplifies 
the 
repres  
entation
of sentence 3 but requires one additional 
axiom.It 
desc  
ribes how an
instance relation and an isa relation combined 
to  
derive a new
instance
 
relation.
Slide Note
Embed
Share

In the world of artificial intelligence, predicate logic plays a crucial role in representing simple facts. It involves syntax, semantics, and inference procedures to determine the truth value of statements. Real-world facts are represented using propositions in logic, allowing for structured knowledge representation. Utilizing first-order predicate logic enhances the ability to capture relationships between entities, moving beyond the limitations of propositional logic.

  • Predicate Logic
  • Artificial Intelligence
  • Knowledge Representation
  • Syntax
  • Semantics

Uploaded on Jul 09, 2024 | 1 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. ARTIFICIAL INTELLIGENCE S.MANIMOZHI ASSISTANT PROFESSOR, DEPARTMENT OF CA BON SECOURS COLLEGE FOR WOMEN, THANJAVUR

  2. Chapter 5: Using Predicate Logic Representing simple facts in Logic Representing Instance and Isa relationships Slide 1

  3. Using Predicate Logic Logic Logic is concerned with the truth of statements about the world. Generally each statement is either TRUE or FALSE. Logic includes :Syntax , Semantics and Inference Procedure. Syntax : Specifies the symbols in the language about how they can be co mbined to form sentences. The facts about the world are repre sented as sentences in logic. Slide 2

  4. Using Predicate Logic Semantic : Specifies how to assign a truth value to a sentence based on its meaning in the world. It Specifies what facts a sentence refers to. A fact is a claim about the world, and it may be TRUE or FALSE. Inference Procedure : Specifies methods for computing new sentences from the existing sentences Slide 2 .

  5. Representing Simple Facts in Logic Using propositional logic Real-world facts are represented as logical propositions wr itten as well-formed formulas (wff s) Example 1: It is raining RAINING It is sunny SUNNY It is Windy WINDY RAINING SUNNY If it is raining, then it is notsunny

  6. Representing Simple Facts in Logic Example 2: Socrates is a man SOCRATESMAN Plato is a man PLATOMAN All men are mortal MORTALMAN => Since the assertions are separate, it is not possible to dra w any conclusion about similarities between Socrates and Pl ato. Slide 6

  7. Representing Simple Facts in Logic It would be much better to represent these facts as Socrates is a man man(socrates) Plato is a man man(plato) All men are mortal mortalman This fails to capture the relationship between any individual being individual being a mortal. Therefore it is necessary to move to first order predicate logic as a way of representing knowledge because it permits representation o represented in prepositional logi c. In predicate logic, real world facts are represented as statements written as wff s a man and that f things that cannot reasonably be . Slide 5

  8. Representing Simple Facts in Logic Q Propositional logic vs. predicate logic Using propositional logic Theorem proving is decidable Cannot represent objects and quantification Using predicate logic Can represent objects and quantification Theorem proving is semi-decidable Slide8

  9. Representing Simple Facts in Logic Consider the following set of sentences. 1. Marcus was a man. 2. Marcus was a Pompeian. 3. All Pompeians were Romans. 4. Caesar was a ruler. 5. All Romans were either loyal to Caesar or hated him. 6. Every one is loyal to someone. 7. People only try to assassinate rulers they are not loyal to. 8. Marcus tried to assassinate Caesar Slide9

  10. Representing Simple Facts in Logic 1. Marcus was a man. man(Mar cus) 2. Marcus was a Pompeian. Po mpeian(Marcus) 3.All Pompeians were Romans. x: Pompeian(x) Roman(x) 4. Caesar was a ruler. ruler(Cae sar) Slide10

  11. Representing Simple Facts in Logic 5. All Romans were either loyal to Caesar or hated him. In English the word or means the logical inclusive-or and sometimes means the logical exclusive-or(XOR) inclusive-or x: Roman(x) loyalto(x, Caesar) hate(x, Caesar) exclusive-or (XOR) x: Roman(x) ( loyalto(x, Caesar) hate(x, Caesar)) (loyalto(x, Caesar) hate(x, Caesar)) Slide11

  12. Representing Simple Facts in Logic 6.Every one is loyal to someone. x y: loyalto(x, y) 7. People only try to assassinate rulers they are not loyal to. x: y: person(x) ruler(y) tryassassinate(x, y) loyalto(x, y) 8. Marcus tried to assassinate Caesar. tryassassinate( Marcus, Caesar) Slide12

  13. Representing Simple Facts in Logic To answer the question Was Marcus loyal to Caesar? To produce a formal proof , reasoning backward from th e desired goal loyalto(Marcus, Caesar) To prove the goal, rules of inference are to be used to trans form into another goal that in turn be transformed and s o on, until there are no insatisfied goals remaining. Slide13

  14. Representing Simple Facts in Logic This attempt fails , since there is no way to satisfy the goal perso n(Marcus)with the statements available. The problem is although its known that Marcus was a man there is no way to conclude it. Therefore another representation is added namely Slide14

  15. Representing Simple Facts in Logic 9.All men are people x:man(x) person(x) This satisfies the last goal and produce a proof that Marcus w as not loyal to ceasar. Three important issues to be addressed in this process of converting English sentences to logical statements and the n using these statements to deduce new ones. Many English sentences are ambiguous. Choosing the corre ct interpretation may be difficult. There is often a choice of how to represent knowledge Obvious information may be necessary for reasoning Slide 13

  16. Representing Instance & IsaRelationships Attributes IsA and Instance support property inheritance and play important role in knowledge representation. The ways these two attributes "instance" and "isa", are logically expresse d are shown in the example below : Example : A simple sentence like "Joe is a musician" Here "is a" (called IsA) is a way of expressing what logically is called a class-instance relationship between the su "Joe" and "musician". "Joe" is an instance of the class of things called "musician". " Joe" plays the role of instance, "musician" plays the role of class in that sentence. Note : In such a sentence, while for a human there is no con fusion, but for computers each relationship have to be defined explicitly. bjects represented by the terms Slide 14

  17. Representing Instance & IsaRelationships Slide17

  18. Representing Instance & IsaRelationships The first part of the figure contains the representations, in which the class membership is represented with unary predicates, corresponding to a class. Asserting that p(x) is true is equi valent to asserting that X is an instance of p. The second part uses the instance predicate explicitly. It is a b inary one, whose first argument is an object and whose second argument is a class to which the object belongs. The implicatio statement 3 states that object is an instance of the sub pompeian then it is an instance of the superclass Roman. each n rule in class Slide18

  19. Representing Instance & IsaRelationships The third part contains representations that use both the instan ce and isa predicates explicitly. Use of isa simplifies the repres entation of sentence 3 but requires one additional axiom.It desc ribes how an instance relation and an isa relation combined to instance relation. derive a new Slide19

More Related Content

giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#