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

Knowledge Representation Techniques

Knowledge representation techniques

Uploaded by

Syed Tahaseen
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Knowledge Representation Techniques

Knowledge representation techniques

Uploaded by

Syed Tahaseen
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 32

DATA DRIVEN

ARTIFICIAL
INTELLIGENT SYSTEMS
TOPIC: KNOWLEDGE REPRESENTATION TECHNIQUES
INTRODUCTION

• We, humans, are good at reasoning, understanding, analyzing, and interpreting what we are
seeing in our daily life. We know how to react and respond to the situation we are going
through. But how to make machines perform similar actions?
• Here comes the knowledge representation in AI that equips the machines to perform
understanding and interpreting the queries of the real world.
• Knowledge Representation in AI is the study of how to equip intelligent machines with
beliefs, intentions, and judgments to express according to the situations through automated
reasoning.

2
WHAT IS KNOWLEDGE
REPRESENTATION?
• Knowledge Representation in AI describes the representation of knowledge. Basically, it is a study of how
the beliefs, intentions, and judgments of an intelligent agent can be expressed suitably for automated
reasoning.
• One of the primary purposes of Knowledge Representation includes modeling intelligent behavior for an
agent.
• Knowledge Representation and Reasoning (KR, KRR) represents information from the real world for a
computer to understand and then utilize this knowledge to solve complex real-life problems like
communicating with human beings in natural language.
• Knowledge representation in AI is not just about storing data in a database, it allows a machine to learn from
that knowledge and behave intelligently like a human being.

3
DIFFERENT TYPES OF KNOWLEDGE

4
DIFFERENT TYPES OF KNOWLEDGE…

• Declarative Knowledge – It includes concepts, facts, and objects and expressed in a declarative
sentence.
• Structural Knowledge – It is a basic problem-solving knowledge that describes the relationship
between concepts and objects.
• Procedural Knowledge – This is responsible for knowing how to do something and includes rules,
strategies, procedures, etc.
• Meta Knowledge – Meta Knowledge defines knowledge about other types of Knowledge.
• Heuristic Knowledge – This represents some expert knowledge in the field or subject.

5
TECHNIQUES OF KNOWLEDGE
REPRESENTATION

• Three major techniques of Knowledge Representation:


• Logical Representation
• Semantic Network Representation
• Frame Representation

6
LOGICAL REPRESENTATION

• It is the most basic form of representing


knowledge to machines where a well-defined
syntax with proper rules is used.
• This syntax needs to have no ambiguity in its
meaning and must deal with prepositions.
• Thus, this logical form of presentation acts as
communication rules and is why it can be
best used when representing facts to a
machine.
7
LOGICAL REPRESENTATION…

• Logical representation is a language with some definite rules which deals with propositions
and has no ambiguity in representation.
• It represents a conclusion based on various conditions and lays down some
important communication rules.
• Logical representation can be categorized into mainly two logics:
• Propositional Logic
• First Order Logic

8
LOGICAL REPRESENTATION…

• Propositional Logic, also known as propositional calculus or statement logic, is a formal system of logic
that deals with the relationships between propositions, which are statements that are either true or false.
Propositional logic is based on the Boolean system, which means that propositions are evaluated as either true
or false. In propositional logic, propositions are combined using logical connectives such as "and", "or", and
"not", and the resulting compound propositions can also be evaluated as true or false based on the truth values
of their component propositions.
• First-order logic (FOL), also known as first-order predicate calculus (FOPC) or first-order logic with
identity, is an extension of propositional logic that allows for the representation of more complex
relationships between objects. In FOL, propositions are constructed using predicates, which are statements
that describe properties or relations between objects, and quantifiers, which specify the scope of the variables
in the proposition.

9
LOGICAL REPRESENTATION…

• Advantages:
• Logical representation helps to perform logical reasoning.
• This representation is the basis for the programming languages.

• Disadvantages:
• Logical representations have some restrictions and are challenging to work with.
• This technique may not be very natural, and inference may not be very efficient.

10
PROPOSITIONAL LOGIC

• Represent real world facts as logical propositions written as Well Formed Formula (Wffs).
• Simple to deal with.
• A decision procedure exists for it.
Facts Propositional logic
it is raining RAINING
it is sunny SUNNY
it is windy WINDY
if it is raining, then it is not sunny RAINING   SUNNY

11
SUMMARIZED TABLE FOR PROPOSITIONAL
LOGIC CONNECTIVES

12
PROPOSITIONAL LOGIC

• The propositional logic symbols and sentences:


• If S is a sentence,  S is a sentence (negation) (S is true iff S is false )
• If S1 and S2 are sentences, S1  S2 is a sentence (conjunction) S1S2 is true iff
S1 is true and S2 is true
• If S1 and S2 are sentences, S1  S2 is a sentence (disjunction) S1S2 is true iff
S1 is true or S2 is true
• If S1 and S2 are sentences, S1  S2 is a sentence (implication) S1S2 is true iff S1
is false or S2 is true i.e, S1  S2 is false iff, S1 is true and S2 is false
• If S1 and S2 are sentences, S1  S2 is a sentence (bi-conditional) S1S2 is true iff S1
 S2 is true and S2  S1 is true
13
LOGICAL CONNECTIVES:

1. Negation: A sentence such as ¬ P is called negation of P. A literal can be either Positive literal or negative literal.

2. Conjunction: A sentence which has ∧ connective such as, P ∧ Q is called a conjunction.


Example: Rohan is intelligent and hardworking. It can be written as,
P= Rohan is intelligent,
Q= Rohan is hardworking. → P∧ Q.

3. Disjunction: A sentence which has ∨ connective, such as P ∨ Q. is called disjunction, where P and Q are the propositions.
Example: "Ritika is a doctor or Engineer",
Here P= Ritika is Doctor. Q= Ritika is Doctor, so we can write it as P ∨ Q.

4. Implication: A sentence such as P → Q, is called an implication. Implications are also known as if-then rules. It can be represented as:
If it is raining, then the street is wet.
Let P= It is raining, and Q= Street is wet, so it is represented as P → Q

5. Biconditional: A sentence such as P⇔ Q is a Biconditional sentence, example: If I am breathing, then I am alive


P= I am breathing, Q= I am alive, it can be represented as P ⇔ Q

14
LOGICAL EQUIVALENCE

• Commutativity: • Distributive:
• P∧ Q= Q ∧ P, or • P∧ (Q ∨ R) = (P ∧ Q) ∨ (P ∧ R).
• P ∨ Q = Q ∨ P. • P ∨ (Q ∧ R) = (P ∨ Q) ∧ (P ∨ R).
• Associativity: • DE Morgan's Law:
• (P ∧ Q) ∧ R= P ∧ (Q ∧ R), • ¬ (P ∧ Q) = (¬P) ∨ (¬Q)
• (P ∨ Q) ∨ R= P ∨ (Q ∨ R) • ¬ (P ∨ Q) = (¬ P) ∧ (¬Q).
• Identity element: • Double-negation elimination:
• P ∧ True = P, • ¬ (¬P) = P.
• P ∨ True= True.

15
LOGICAL EQUIVALENCE…

Name Equivalences
Identity p ∧ T ≡ p, p ∨ F ≡ p
Domination p ∨ T ≡ T, p ∧ F ≡ F
Idempotent p ∧ p ≡ p, p ∨ p ≡ p
Double Negation ¬(¬p) ≡ p
Commutative p∨q≡q∨p, p∧q≡q∧p

Associative (p ∨ q) ∨ r ≡ p ∨ (q ∨ r) , (p ∧ q) ∧ r ≡ p ∧ (q ∧ r)

Distributive p ∨ (q ∧ r) ≡ (p ∨ q) ∧ (p ∨ r), p ∧ (q ∨ r) ≡ (p ∧ q) ∨ (p ∧ r)
De Morgan's Law ¬(p ∧ q)≡ ¬p ∨ ¬q, ¬(p ∨ q) ≡ ¬p ∧ ¬q
Absorption p ∨ (p ∧ q)≡p, p ∧ (p ∨ q) ≡ p
Negation p ∨ ¬p ≡ T, p ∧ ¬p ≡ F

16
LIMITATIONS OF PROPOSITIONAL LOGIC

• If you want to represent complicated sentences or natural language statements, PL is not sufficient.
• We cannot represent relations like ALL, some, or none with propositional logic. Example:
• All the girls are intelligent.
• Some apples are sweet.
• There is very limited expressive power in PL, so we use FOL instead
• Example:
All men are mortal MORTALMAN
• fails to capture the relationship between individual being a man and that individual being a
mortal.

17
FIRST ORDER LOGIC

• First-order logic is another way of knowledge representation in artificial intelligence. It


is an extension to propositional logic.
• FOL is sufficiently expressive to represent the natural language statements in a concise
way.
• First-order logic is also known as Predicate logic or First-order predicate logic.
First-order logic is a powerful language that develops information about the objects in
an easier way and can also express the relationship between those objects.

18
QUANTIFIERS IN FIRST-ORDER LOGIC

• These are the symbols that permit to determine or identify the range and scope of the
variable in the logical expression. There are two types of quantifier:
• Universal Quantifier, (for all, everyone, everything)
• Existential quantifier, (for some, at least one).
• The is represented by a symbol ∀, which resembles an inverted A. Universal quantifier
• Existential quantifiers are denoted by the logical operator ∃, which resembles as
inverted E. When it is used with a predicate variable then it is called as an existential
quantifier.

19
UNIVERSAL QUANTIFIER

If x is a variable, then ∀x is read as:


• For all x
• For each x
• For every x.

• Example:
• All man drink coffee.
• Let a variable x which refers to a man, so all x can
be represented as: ∀x man(x) → drink (x, coffee)
• It will be read as: There are all x where x is a
man who drink coffee. ∀x man(x) → drink (x,
coffee).
20
EXISTENTIAL QUANTIFIER

• If x is a variable, then existential quantifier will


be ∃x or ∃(x). And it will be read as:
• There exists a 'x.'
• For some 'x.'
• For at least one 'x.'

• Example:
• Some boys are intelligent.
• ∃x: boys(x) ∧ intelligent(x)
• It will be read as: There are some x where x is
a boy who is intelligent. ∃x: boys(x) ∧
intelligent(x)
21
FIRST ORDER LOGIC
• Use of predicate logic as a way of representing knowledge:
1.Marcus was a man man(Marcus)
2.Marcus was a Pompeian Pompeian(Marcus)
3.All Pompeians were Romans x: Pompeian(x)  Roman(x)
4.Casear was a ruler ruler(Casear)
5.All Romans are either loyal to Caesar or hated him
x: roman(x)  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)
8.Marcus tried to assassinate Caesar tryassassinate(Marcus,Caesar)
22
SEMANTIC NETWORK REPRESENTATION

• Semantic networks are alternative of predicate logic for knowledge representation.


• In Semantic networks, we can represent our knowledge in the form of graphical
networks. This network consists of nodes, representing objects and arcs which describe
the relationship between those objects
• This representation consist of mainly two types of relations:
• IS-A relation (Inheritance)
• Kind-of-relation

23
SEMANTIC NETWORK REPRESENTATION

Mamm
Statements: Cat
al
Is-a
1.Jerry is a cat. Is-a

Rubi Anim
2.Jerry is a mammal Is-colored Is-owned al

3.Jerry is owned by Priya. Whit


Jack
e
4.Jerry is white colored.
5.All Mammals are animal.

24
SEMANTIC NETWORK REPRESENTATION…

• Advantages:
• Semantic networks are a natural representation of knowledge.
• Also, it conveys meaning in a transparent manner.
• These networks are simple and easy to understand.
• Disadvantages:
• Semantic networks take more computational time at runtime.
• Also, these are inadequate as they do not have any equivalent quantifiers.
• These networks are not intelligent and depend on the creator of the system.

25
FRAME REPRESENTATION

• A frame is a record like structure which consists of a collection of attributes and its values to
describe an entity in the world. Frames are the AI data structure which divides knowledge
into substructures by representing stereotypes situations. It consists of a collection of slots
and slot values. These slots may be of any type and sizes. Slots have names and values which
are called facets.
• The various aspects of a slot is known as Facets. Facets are features of frames which enable
us to put constraints on the frames.
• A frame is also known as slot-filter knowledge representation in artificial intelligence.

26
FRAME REPRESENTATION: EXAMPLE

• Example:
Let's take an example of a frame for a book:

Slots Filters
Title Artificial Intelligence
Genre Computer Science
Author Peter Norvig
Edition Third Edition
Year 1996
Page 1152

27
FRAME REPRESENTATION…

Advantages of frame representation:


• By grouping related facts, the frame knowledge representation makes programming easier.
• Many AI applications employ the frame representation because it is rather flexible.
• Adding slots for additional attributes and relations is a breeze.
• It's simple to add default data and look for missing variables.
• The frame representation is simple to grasp and visualize.
Disadvantages of frame representation:
• The inference mechanism in a frame system is difficult to process.
• Frame representation does not allow for a smooth progression of the inference procedure.
• Frame representation has a much-generalized approach.

28
SUMMARY

This session discussed about the Three major techniques of Knowledge


Representation
• Logical Representation
• Semantic Network Representation
• Frame Representation

29
SELF ASSESSMENT
QUESTIONS

1. Knowledge and reasoning also play a crucial role in dealing with __________________
environment.

(a) Completely Observable


(b)Partially Observable
(c) Neither Completely nor Partially Observable
(d) Only Completely and Partially Observable

2. A knowledge-based agent can combine general knowledge with current percepts to infer
hidden aspects of the current state prior to selecting actions.

(a) True
(b) False
TERMINAL QUESTIONS

1. Illustrate various techniques of Knowledge Representation.


2. Discuss the semantic network with an example.

31
REFERENCE

• Reference Books:
• 1. Russel and Norvig, ‘Artificial Intelligence’, third edition, Pearson Education, PHI, (2015)
• 2. Elaine Rich & Kevin Knight, ‘Artificial Intelligence’, 3nd Edition, Tata Mc Graw Hill
Edition, Reprint( 2008)

• Sites and Web links:

1. https://www.virtusa.com/digital-themes/heuristic-search-techniques

2. https://towardsdatascience.com/a-star-a-search-algorithm-eb495fb156bb

32

You might also like