0% found this document useful (0 votes)
2 views

Introduction to Knowledge representation-12-08-2024

Knowledge representation aims to facilitate inferencing by organizing knowledge effectively. It encompasses various approaches, including relational knowledge, logic-based representation, and procedural knowledge, each with distinct advantages and limitations. The document also discusses knowledge-based agents and the differences between propositional and first-order logic in representing knowledge.

Uploaded by

Love Soni
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Introduction to Knowledge representation-12-08-2024

Knowledge representation aims to facilitate inferencing by organizing knowledge effectively. It encompasses various approaches, including relational knowledge, logic-based representation, and procedural knowledge, each with distinct advantages and limitations. The document also discusses knowledge-based agents and the differences between propositional and first-order logic in representing knowledge.

Uploaded by

Love Soni
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 64

Knowledge Representation

“The fundamental goal of knowledge representation is to represent


knowledge in a manner that facilitates the process of inferencing

(i.e. drawing conclusions) from it.
Knowledge

Data V/S Information V/S Knowledge


• Reflects current world • Interpreted data • Relation among sets of
• Frequently changing data/information
• Voluminous • Used for further information
deduction
Representation
Knowledge Representation
Any knowledge representation system should possess properties such as learning, efficiency in acquisition,

representational adequacy, and inferential adequacy.

• Learning refers to a capability that acquires new knowledge, behaviours, understanding, etc.

It does not simply involve adding new facts to a knowledge base but new information may have to

be classified to avoid redundancy and replication in the existing knowledge prior to storage to

enable easy retrieval.

There are a number of ways in which knowledge may be gained such as by reasoning and logic, by

experience, by observing the world, by mathematical proofs, and by scientific methods.


Knowledge Representation
• Efficiency in acquisition refers to the ability to acquire new knowledge using automatic

methods wherever possible rather than relying on human intervention.

• Representational adequacy refers to the ability to represent the required knowledge.

• Inferential adequacy refers to the ability of manipulating knowledge to produce new

knowledge from the existing one.


Approaches to Knowledge Representation
A. Relational Knowledge
Comprises objects comprising of attributes and associated values
Approaches to Knowledge Representation
A. Relational Knowledge
Comprises objects comprising of attributes and associated values

1. What is the age of John?


2. How much does Mary earn?
3. What is the qualification of Mike?

Does a person having a PhD qualification earn more?

“Helps in storing facts but gives little opportunity for inferencing”


Approaches to Knowledge Representation
B. Knowledge represented as logic

(∀𝑋)human(X)mortal(X)

John is human  John is mortal

The advantage of this approach is that we can represent a set of


rules, derive more facts, truths and verify the correctness of the
new statement
Approaches to Knowledge Representation
C. Procedural Knowledge
Encoding in the form of procedures which carry out specific tasks based on relevant knowledge

SYNTAX I is watching TV

SYMANTICS While watching chips I am eating TV

Advantage: Domain specific knowledge is easily represented

Storing knowledge  hierarchical structure  allows inheritance mechanism


Knowledge based Agent
Agents with some representation of complex knowledge about the
environment and use inference to derive new knowledge

Inference
Knowledge Base
Mechanism

[Domain-specific [Domain-independent
content ] Algorithm]
Knowledge based Agent

I/P
Environment Inference Engine O/P

Learning
[Updating the KB]

Knowledge Base

KBA
Knowledge based Agent
Types:

1. Declarative: You can build a knowledge-based agent simply by ‘TELLING’ it


what it needs to know

2. Procedural: Encode desired behaviour directly as program code


Logic as Knowledge Representation
• Logic is a formal language with precisely defined syntax and semantics and it supports sound
inference.

• It is a language with some concrete rules which deals with propositions and has no ambiguity
in representation.

• The language is independent of domains of application.

• Historically Logic is the first knowledge representation language.

Advantages:
 Compact, First-order Propositional
 Task-independent,
 Modular representation Logic Logic
 Reusable, flexible and maintainable.
Propositional Logic
Proposition
Propositional Logic
Definition: Propositional logic is a mathematical system for reasoning about
propositions and how they relate to one another.
Propositional Logic
Propositional variable
Propositional variable represents an arbitrary proposition. We represent propositional
variables with uppercase letter.

Each variable can take one of two values: True or False. If a proposition is true then we
say that its truth value is True and if a proposition is false we say its truth value is False.
Propositional Logic
Propositional connectives
Propositional Logic
Sentence
Propositional Logic
Truth Table
Propositional Logic
Operator Precedence
Propositional Logic
Translating English into logic

Propositional Symbol Semantics


P It is hot
Q It is humid
R It is raining

If it is humid, then it is hot 𝑸→𝑷

If it is hot and humid, then it is raining (𝑷 ∧ 𝑸) → 𝑹


Propositional Logic
Translating English into logic

Propositional Symbol Semantics


W I will work hard
V There are vaccancies
J I will get the job

I wont get the job, if I don’t work hard ¬𝑾 → ¬𝑱

If I work hard but there are no vacancies I would not get the job (𝑾 ∧ ¬𝑽) → ¬𝑱

Because the second part of


the sentence is a surprise,
“but” is used instead of “and”
Propositional Logic
De Morgan’s Laws
Propositional Logic
Logical Equivalence
Propositional Logic
Rules of Inference
A statement is in conjunctive normal form if it
is a conjunction (sequence of ANDs)
consisting of one or more conjuncts, each of
which is a disjunction (OR) of one or
more literals
A resolution algorithm
 Inference procedures based on resolution work by using the principle of proof by
contradiction That is, to show that KB |= α, we show that (KB ∧ ¬α) is unsatisfiable.

 In resolution algorithm. First, (KB ∧ ¬α) is converted into CNF.

 Then, the resolution rule is applied to the resulting clauses.

 Each pair that contains complementary literals is resolved to produce a new clause,
which is added to the set if it is not already present.

The process continues until one of two things happens:

• there are no new clauses that can be added, in which case KB does not entail
α;
or,
• two clauses resolve to yield the empty clause, in which case KB entails α.
Example OF Propositional Resolution

Consider the following Knowledge Base:


1.The humidity is high or the sky is cloudy.
2.If the sky is cloudy, then it will rain.
3.If the humidity is high, then it is hot.
4.It is not hot.
Goal: It will rain.
Use propositional logic and apply resolution method to prove that the goal is derivable
from the given knowledge base.
Solution:
Let’s construct propositions of the given sentences one by one:
1.Let, P: Humidity is high.
Q: Sky is cloudy.
It will be represented as P V Q.
2) Q: Sky is cloudy. …from(1)
Let, R: It will rain.
It will be represented as Q R.
3) P: Humidity is high. …from(1)
Let, S: It is hot.
It will be represented as P S.
4) ¬S: It is not hot.

Applying resolution method:


In (2), Q R will be converted as (¬Q V R)
In (3), P S will be converted as (¬P V S)
Negation of Goal (¬R): It will not rain.
Propositional Logic
Limitations
Propositional Logic
Limitations
 Limited expressive power

 Generalizations, patterns, and regularities can’t easily be represented

 Can not represent ‘all’, ‘some’, ‘none’ etc.


e.g. some apples are sweet
all apples are ripen
First-order Logic
Also known as predicate logic or first-order predicate logic.

There is someone behind you;


It may be a warning or request in English
First-order Logic
First-order Logic

P(x,y): x lives in y Predicate


P(Linkesh,Chennai): Linkesh lives in Chennai Proposition
First-order Logic
Propositional Logic First order Logic
Each variable represents a Each variable refers to some object
proposition which is either true or
false
Directly apply connectives to the Since variables represent arbitrary
propositions objects, it does not make sense to
apply the connectives to them
directly
Truth of a statement can be To reason about objects it uses
determined by the truth values for predicates
the input propositions
First-order Logic
The Domain or Universe is the set of values that may be assigned to the variables

If P(x) is a predicate, x has a domain U, then truth set of P(x) is the set of all the
elements t of U such that P(t) is true.
First-order Logic
Returns objects associated with other objects

Evaluates an object when specific values are assigned to variables

e.g. MotherOf(x)
X=Jesus, MotherOf(Jesus)=Mary
First-order Logic
First-order Logic
First-order Logic
First-order Logic

The use of quantifiers makes the FOL more expressive than PL


First-order Logic
First-order Logic
First-order Logic
First-order Logic

All students are smart

There is a student who is smart

Incorrect
Correct
First-order Logic
First-order Logic
First-order Logic
First-order Logic
First-order Logic

You might also like