INTELLIGENCE
LECTURE # 03
Todays Lecture
Review of last lecture
Reasoning
Types of Reasoning
Logic
Reasoning
Reasoning is the process of deriving logical conclusions
Deductive reasoning
As the name implies, is based on deducing new
fire
Given: There is dry wood, oxygen and a spark
We can deduce: There will be a fire.
All men are mortal. Socrates is a man.
We can deduce: Socrates is mortal
Artificial Intelligence 2012 Lecture 03 Delivered By Zahid Iqbal
Inductive Reasoning
Inductive reasoning is based on forming, or inducing a
based on experience,
while deductive reasoning is based on rules, hence the
Analogical Reasoning
Analogical reasoning works by drawing analogies
But you also know that there are certain other distinct
characteristics of each.
Artificial Intelligence 2012 Lecture 03 Delivered By Zahid Iqbal
Common-sense Reasoning
Common-sense reasoning is an informal form of
Non-Monotonic Reasoning
Non-Monotonic reasoning is used when the facts of the
no longer.
However, if we use monotonic reasoning, this would not
10
Logic
Algebra is a type of formal logic deals with number
PROPOSITIONAL LOGIC
PREDICATE CALCULUS/LOGIC
11
Proposition
A proposition (p, q, r, ) is simply a statement (i.e., a
12
Proposition
A proposition is a statement about the world that may be either true
or false.
13
14
Propositional Symbols
Propositions are denoted by propositional symbols such
as: P, Q, R, S,.
Truth symbols are: true (or T), false (or F).
interesting.
We need to express complex propositions/compound
propositions:
The book is on the table or it is on the chair.
If Socrates is a man then he is mortal.
15
Propositional Symbols
We can use logical connecters such as:
...and
...or
...implies
..is equivalent
...not
[conjunction]
[disjunction]
[implication / conditional]
[biconditional]
[negation]
16
Operators / Connectives
An operator or connective combines one or more operand
17
p p
T F
F T
18
E.g. If p=I will have salad for lunch. and q=I will have steak
for dinner., then pq=I will have salad for lunch and I will
have steak for dinner.
p
F
F
T
T
q
F
T
F
T
pq
F
F
F
T
19
Example:
p=That car has a bad engine.
20
true!
p
F
F
T
T
q
F
T
F
T
pq
F
T
T
T
21
Examples
Example: BCS AI Class
P = Ali is the teacher
R= AI is a course teaching in BS
22
A Simple Exercise
Let p=It rained last night,
q=The sprinklers came on last night,
r=The lawn was wet this morning.
Translate each of the following into English:
p
q ^ r
r p
rpq
23
24
p
F
F
T
T
q pq
F F
T T
F T
T F
25
is q
26
Examples:
p
F
F
T
T
q pq
F
T
T T
F
F
T T
27
q is true.
It is TRUE when both p q and q p are TRUE.
p = It is raining.
q = The home team wins.
28
exact opposite of s!
p q means (p q)
p
F
F
T
T
q pq
F T
T F
F F
T T
29
Truth Table
p q p q p
p q p q p q
30
31
Precedence
32
not and or
p pq +
! && ||
~ & |
xor implies
!=
^
iff
==
Logic gates:
33
34
Exercise
Fact 1: Saira likes cakes. = P
35
Exercise
Fact 1: Saira likes cakes. = P
36
P1,2
If the train is late and there are no taxis, john is late for the meeting
If trains are late and there are no taxis, anyone traveling by trains is late
37
Limitations
Propositions can only represent knowledge as complete sentences,
e.g.
a = the balls color is blue.
Cannot analyze the internal structure of the sentence.
No quantifiers are available, e.g. for-all, there-exists
such as:
38
References
Artificial Intelligence: Structures and Strategies for
39
End of Lecture
40
Puzzle Game
A farmer went to market and purchased a fox, a goose,
41