Unit 2:: Knowledge Representation
Unit 2:: Knowledge Representation
Unit 2:: Knowledge Representation
Unit 2:
Knowledge Representation:
School of Computer Science and Engineering
Prof. Nikhil
OUTLINE
Recap of previous Lecture
Topic for the Lecture
Objective and Outcome of Lecture
Lecture Discussion
Using Predicate Logic
Lecture
Objective Illustrate knowledge representation issues and methods
Lecture
Represent knowledge using logic and apply reasoning methods
Outcome
REPRESENTING Simple FACTS IN
LOGIC
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 combined to
form sentences. The facts about the world are represented as sentences in 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
REPRESENTING SIMPLE FACTS IN LOGIC
Using propositional logic –Real-world facts are represented as logical propositions
written as well-formed formulas (wff’s)
Example 1:
It is raining.
RAINING
It is sunny.
SUNNY
It is Windy.
WINDY
If it is raining, then it is not sunny.
RAINING ¬SUNNY
REPRESENTING SIMPLE FACTS IN LOGIC
– Example 2:
Suppose we want to represent the obvious fact stated by the classical sentence.
Socrates is a man.
We could write:
SOCRATESMAN
Plato is a man.
PLATOMAN
Which would be a totally separate assertion, it would be much better to represent these
facts as:
MAN(SOCRATES)
MAN(PLATO)
All men are mortal.
MORTALMAN
• To explore the use of predicate logic as a way of representing knowledge by
looking at a specific
• example.
• The above two statements becomes totally separate assertion, we would not be able to
draw any conclusions about similarities between Socrates and Plato.
Exclusive-or
∀x: Roman(x) → (loyalto(x, Caesar) ∧¬ hate(x, Caesar)) ∨
(¬loyalto(x, Caesar) ∧ hate(x, Caesar))
6. Everyone 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)
• Also, Now let’s try to produce a formal proof, reasoning backward from the desired
goal: ¬Loyalto(Marcus, Caesar)
• In order to prove the goal, we need to use the rules of inference to transform it into
another goal (or possibly a set of goals) that can, in turn, transformed, and so on,
until there are no unsatisfied goals remaining.
An attempt to prove ¬loyalto(Marcus, Caesar).
The problem is that, although we know that Marcus was a man, we do not have any way
to conclude from that that Marcus was a person.
Also, We need to add the representation of another fact to our system, namely:
∀ man(x) → person(x)
Now we can satisfy the last goal and produce a proof that Marcus was not loyal to
Caesar.