WHY WOULD YOU STUDY ARTIFICIAL INTELLIGENCE? (1)

Download Report

Transcript WHY WOULD YOU STUDY ARTIFICIAL INTELLIGENCE? (1)

ARTIFICIAL INTELLIGENCE
[INTELLIGENT AGENTS PARADIGM]
SEMANTICS
OF PROPOSITIONAL CALCULUS
Professor Janis Grundspenkis
Riga Technical University
Faculty of Computer Science and Information Technology
Institute of Applied Computer Systems
Department of Systems Theory and Design
E-mail: [email protected]
Semantics of Propositional
Calculus
• Interpretation – the truth value
assignment to propositional sentences
R
S W
T
F
(truth values of the
semantic domain)
Semantics of Propositional
Calculus
Example of possible worlds
a) R
S
b) R
S
c) R
T
F
T
F
T
S d) R
S
F
F
T
Semantics of Propositional
Calculus
The symbol true is always assigned T, and
the symbol false is always assigned F.
The interpretation or truth value for sentences:
• The truth assignment of negation
P P
T F
F T
Truth Table
Semantics of Propositional
Calculus
• The truth assignments of conjunction
disjunction
implication
equivalence
P
T
T
F
F
Q PQ
T
T
F
F
T
F
F
F
PQ PQ
T
T
T
F
T
T
F
T
PQ
T
F
F
T
Semantics of Propositional
Calculus
The role of identities in Artificial
Intelligence
Two expressions are equivalent if they have
the same value under all truth value
assignments.
P  P
P  Q  P  Q
The contrapositive law: P  Q  Q  P
Semantics of Propositional
Calculus
De Morgan’s law:
(P  Q)  P  Q
and
(P  Q)  P  Q
The commutative laws:
AI: it is not important in
P  Q  Q  P In
which order the new true
P  Q  Q  P knowledge is added
Semantics of Propositional
Calculus
The associative laws:
((P  Q)  R)  (P  (Q  R))
((P  Q)  R)  (P  (Q  R))
The distributive laws:
P  (Q  R)  (P  Q)  (P  R)
P  (Q  R)  (P  Q)  (P  R)
Semantics of Propositional
Calculus
Identities can be used to change
expressions into a syntactically
different but logically equivalent
form (with equivalent truth values).
In AI it is important because
inference rules require
expressions to be in a specific
form.
Semantics of Propositional
Calculus
Propositional Calculus expressions
and natural language
• Conjunction corresponds to AND
A  B (A AND B)
Weather is fine AND sun shines
A
B
Semantics of Propositional
Calculus
Propositional Calculus expressions
and natural language (continued)
!
He get frightened AND he killed a wild boar
He killed a wild boar AND he get frightened
Conjunction has time and causal nuances
Semantics of Propositional
Calculus
Propositional Calculus expressions
and natural language (continued)
• Disjunction corresponds to OR
A  B (A OR B)
Weather is fine OR it is raining
A
B
Semantics of Propositional
Calculus
Propositional Calculus expressions and
natural language (continued)
• Negation corresponds to NOT
NOT fine weather
Semantics of Propositional
Calculus
Propositional Calculus expressions and
natural language (continued)
• Equivalence corresponds to IF AND
ONLY IF WHEN
AB
Weather is fine IF AND ONLY IF WHEN sun shines
A
B
Semantics of Propositional
Calculus
Propositional Calculus expressions and
natural language (continued)
• Implication corresponds to IF ... THEN ...
AB
IF the battery is dead THEN the car won’t start
A
B
Semantics of Propositional
Calculus
Propositional Calculus expressions and natural
language (continued)
Cases:
1) A = T, B = T
The battery is dead  the car won’t start,
implication T
2) A = T, B = F
The battery is dead  the car will start,
implication F
Semantics of Propositional
Calculus
!
Propositional Calculus expressions and natural
language (continued)
3) A = F, B = T
The battery is not dead  the car won’t start,
implication T
Implication allows for the possibility that the car may
not start even with a good battery because something
else may be wrong with the car
4) A = F, B = F
The battery is not dead  the car will start, implication T
Semantics of Propositional
Calculus
• Propositional logic offers techniques
for capturing facts or rules in symbolic
form and then operates on them
through the use of logical operators.
• This formal logical approach provides
an exact method for managing
statements that are either true or false.
Semantics of Propositional
Calculus
• However, for many problems, it can
be difficult to assert a truth value to an
entire statement.
• A way is needed for dissecting the
statement into a finer granularity,
where elements of the statement can be
represented and reasoned with
logically.