SlideShare a Scribd company logo
Knowledge
Representation in
Artificial Intelligence
Dr. Mehak Saini
Knowledge Representation
• A knowledge representation system should provide ways of
representing complex knowledge and should possess the following
characteristics:
1. The representation scheme should have a set of well-defined syntax
and semantics.
2. The knowledge representation scheme should have a good
expressive capacity.
3. The representation must be efficient, i.e., it should use only limited
resources without compromising on the expressive power.
How is a knowledge base different from a database?
Knowledge Representation in Artificial Intelligence
1. Propositional Logic
Knowledge Representation in Artificial Intelligence
Knowledge Representation in Artificial Intelligence
Knowledge Representation in Artificial Intelligence
Commonly Used Propositional logic connectives
S. no. Name Connective Symbol
1. Conjunction AND &
2. Inclusive disjunction OR V
3. Negation NOT ̄
4. Material Condition IMPLIES
5. Material biconditional IFF
6. Exclusive disjunction XOR
7. Joint Denial NAND ‫׀‬
8. Disjoint Denial NOR
Knowledge Representation in Artificial Intelligence
Knowledge Representation in Artificial Intelligence
Knowledge Representation in Artificial Intelligence
Knowledge Representation in Artificial Intelligence
Knowledge Representation in Artificial Intelligence
Knowledge Representation in Artificial Intelligence
Knowledge Representation in Artificial Intelligence
Knowledge Representation in Artificial Intelligence
A B ̄ A ̄B AVB A&B AB AB A+B A ‫׀‬ B AB
T T F F T T T T F F F
F T T F T F T F T T F
T F F T T F F F T T F
F F T T F F T T F T T
Truth table for logical connectives
Logical Equivalence
Problem: To verify that ((A & (A B)) B) is a tautology
Commonly used logical Equivalences
Knowledge Representation in Artificial Intelligence
Knowledge Representation in Artificial Intelligence
Knowledge Representation in Artificial Intelligence
Knowledge Representation in Artificial Intelligence
Knowledge Representation in Artificial Intelligence
Knowledge Representation in Artificial Intelligence
Knowledge Representation in Artificial Intelligence
Knowledge Representation in Artificial Intelligence
Knowledge Representation in Artificial Intelligence
Knowledge Representation in Artificial Intelligence
Knowledge Representation in Artificial Intelligence
What is tautology in propositional logic?
A tautology in propositional logic is a formula or statement that is always true, regardless of the truth values of
its component propositions. For example, "P ∨ ¬P" (P or not P) is a tautology because it is always true whether
P is true or false.
Another example of a tautology in propositional logic is:
"(P → Q) ∨ (Q → P)"
This means "if P implies Q or Q implies P," which is always true, regardless of the truth values of P and Q.
"(P ∧ True) → P"
This means "P and true implies P," which is always true, regardless of the truth value of P.
Statements that are tautologies Statements that are Contradictions
Normal forms in Propositional Logic
1. Conjunctive Normal Form (CNF)
2. Disjunctive Normal Form (DNF)
*A formula A is said to be in CNF if it has the form
A= & & … & , n≥1
Where … is a disjunction of an atom or negation of an atom
*A formula A is said to be in DNF if it has the form
A= … V , n≥1
Where … is a conjunction of an atom or negation of an atom
Conversion Procedure of formula to Normal Form
1. Eliminate implications and biconditionals.
2. Reduce the scope of NOT symbol by the formula ( ( A))=A and
̄ ̄
apply DeMorgan’s theorem to bring the negations before the atoms.
3. Use Distributive laws and other formulae to obtain the normal form.
2. Predicate Logic
Predicate or First order logic
A predicate is defined as a relation that binds two atoms together, e.g.,
Bhaskar likes aeroplanes is represented as LIKES (Bhaskar, aeroplanes).
Here, LIKES is a predicate that links two atoms “Bhaskar” and
“aeroplanes”.
This predicate can be generalized as, LIKES(x,y) where x and y are
variables meaning x likes y.
Main purpose of predicate logic in AI?
• The main purpose of predicate logic in AI is to provide a formal framework for representing and reasoning
about facts and relationships in a domain. It helps in defining rules, making inferences, and solving problems
that involve logical relationships.
What are universal and existential quantifiers
• Universal Quantifier (∀): It denotes "for all" or "for every." It implies that a statement applies to all
elements within a certain domain. For example, ∀x P(x) means that the predicate P(x) is true for all x.
• Existential Quantifier (∃): It denotes "there exists" or "for some." It implies that there is at least one
element in the domain for which the statement is true. For example, ∃x P(x) means that there exists at least
one x for which P(x) is true.
Quantifiers
NORMAL FORMS IN PREDICATE LOGIC
In predicate logic normal form is Prenex Normal form.
A formula A in predicate logic is said to be in Prenex Normal form if it has the form
() ()… () B
Where ( is either a V or 3 and B is a formula without any quantifiers.
() ()… () is called the prefix and B is called matrix of the formula.
Formulae for Prenex Normal form Conversion
Rules of Inference
S. no. Description Rule of Inference
1.
2.
3.
4.
5.
Addition
Simplification
Modus Ponens
Modus Tollens
Disjunctive Syllogism
Rules of Inference (Contd.)
Describe the rule represented by the following statement in predicate logic:
"∀x Animal(x) → Eats(x, 'Food')"
• This statement in predicate logic can be read as: "For all x, if x is an animal, then x eats food." It means that
every animal eats food.
Resolution
• Given any two clauses A and B, if there is a literal P1 in A which has a complementary literal P2 in
B, delete P1 and P2 from A and B and construct a disjunction of the remaining clauses. The clause
so constructed is called the resolvent of A and B.
• Example:
Limitations of Logic as knowledge
representation Scheme
*
*
*
*
*
*
3. Rule Based System
4. Semantic Networks
Definition
Semantic net (or semantic network) in AI is a graphical representation of knowledge that uses nodes to
represent objects, concepts, or entities, and edges (links) to represent the relationships between them. It is
commonly used to show hierarchical relationships or associations between different elements in a system,
aiding in knowledge representation and reasoning.
Knowledge Representation in Artificial Intelligence
Semantic Networks
• A semantic network is a structure for representing knowledge as a
pattern of interconnected nodes and arcs.
• It is defined as a graphical representation of knowledge.
• The objects under consideration serve as nodes and the relationship
with other nodes give the arcs.
• Nodes in the semantic net can be generic or individual node.
Knowledge Representation in Artificial Intelligence
Draw the semantic net for the following information:
1. Alice is a doctor.
2. Alice works at City Hospital.
3. City Hospital is located in New York.
4. Alice drives a red car.
Here’s the answer to the semantic net for the provided information:
1. A node for "Alice" connected to a node labeled "Doctor" with an "is-a" relationship.
2. A node for "Alice" connected to a node labeled "City Hospital" with a "works-at" relationship.
3. A node for "City Hospital" connected to a node labeled "New York" with a "located-in"
relationship.
4. A node for "Alice" connected to a node labeled "Red Car" with a "drives" relationship.
Graphically, it looks like this:
This graph represents the relationships and information given in the question.
Draw the semantic net for the following information:
1. John is a professor.
2. John works at Harvard University.
3. Harvard University is located in Boston.
4. John teaches Computer Science.
Here’s the semantic net for the provided information:
1. A node for "John" connected to a node labeled "Professor" with an "is-a" relationship.
2. A node for "John" connected to a node labeled "Harvard University" with a "works-at" relationship.
3. A node for "Harvard University" connected to a node labeled "Boston" with a "located-in" relationship.
4. A node for "John" connected to a node labeled "Computer Science" with a "teaches" relationship.
Graphically, it looks like this:
This graph represents the relationships and information in the question.
Semantic net
Representation of variables in Semantic nets
Hierarchial structure in a network
5. Frames
Knowledge Representation in Artificial Intelligence
Knowledge Representation in Artificial Intelligence
Knowledge Representation in Artificial Intelligence
Frames
• A frame can be defined as a data structure that has slots for various
objects and a collection of frames consists of expectations for a given
situation.
Example: Sample frame of a computer centre.
Declarative Frames
• A frame that merely contains description about objects is called a declarative/factual/ situational frame.
Procedural frame

More Related Content

PDF
Applications & Research Topics in Machine Learning
PDF
State space representation and search.pdf
PDF
heuristic search Techniques and game playing.pdf
PDF
Dimensionality Reduction Techniques in Machine Learning
PPTX
Data Preprocessing
PDF
Introduction to Artificial Intelligence.pdf
PDF
Semantic_net_and_Frames_in_knowledgeR.pdf
PDF
Dimentionality Reduction PCA Version 1.pdf
Applications & Research Topics in Machine Learning
State space representation and search.pdf
heuristic search Techniques and game playing.pdf
Dimensionality Reduction Techniques in Machine Learning
Data Preprocessing
Introduction to Artificial Intelligence.pdf
Semantic_net_and_Frames_in_knowledgeR.pdf
Dimentionality Reduction PCA Version 1.pdf

What's hot (20)

PDF
Introduction to Machine Learning Classifiers
PPTX
Knowledge representation in AI
PPT
Heuristic Search Techniques Unit -II.ppt
PPTX
What is Machine Learning
PPTX
WEKA: Output Knowledge Representation
PDF
Machine learning
PPTX
ADBMS Object and Object Relational Databases
PDF
Tools and techniques for data science
PDF
Cross validation
PPT
KNOWLEDGE REPRESENTATION ISSUES.ppt
PDF
MongoDB Lab Manual (1).pdf used in data science
PPTX
Machine Learning Basics
PPTX
Introduction to Artificial Intelligence and History of AI
PPTX
Machine learning with scikitlearn
PPTX
The Relational Model
PDF
Supervised vs Unsupervised vs Reinforcement Learning | Edureka
PPT
Agents_AI.ppt
PPTX
AI Agents, Agents in Artificial Intelligence
PPTX
Unit 1-Data Science Process Overview.pptx
PPTX
Supervised Unsupervised and Reinforcement Learning
Introduction to Machine Learning Classifiers
Knowledge representation in AI
Heuristic Search Techniques Unit -II.ppt
What is Machine Learning
WEKA: Output Knowledge Representation
Machine learning
ADBMS Object and Object Relational Databases
Tools and techniques for data science
Cross validation
KNOWLEDGE REPRESENTATION ISSUES.ppt
MongoDB Lab Manual (1).pdf used in data science
Machine Learning Basics
Introduction to Artificial Intelligence and History of AI
Machine learning with scikitlearn
The Relational Model
Supervised vs Unsupervised vs Reinforcement Learning | Edureka
Agents_AI.ppt
AI Agents, Agents in Artificial Intelligence
Unit 1-Data Science Process Overview.pptx
Supervised Unsupervised and Reinforcement Learning
Ad

Similar to Knowledge Representation in Artificial Intelligence (20)

PDF
Knowledge Representation, Prepositional Logic, Representation and Mapping
PPT
Predicate logic_2(Artificial Intelligence)
PDF
22PCOAM11_IAI_Unit III Notes Full Notesmerged.pdf
PPTX
continuity of module 2.pptx
PPTX
ARTIFICIAL INTELLIGENCE---UNIT 4.pptx
PDF
Chapter 4 - Knowledge Representation and Reasoning (1).pdf
PDF
Lesson 26
PDF
AI Lesson 26
PPTX
Introduction to First order logic .pptx
PDF
AI Lesson 11
PPTX
Foundation_Logic_1.pptx discrete mathematics
PPTX
Basic Knowledge Representation and Reasonong
PPTX
lec3 AI.pptx
PDF
Logic programming (1)
PPTX
m.a.t.h.e.m.a.t.i.c.s.d.i.s.c.r.e.t.e.pptx
PPTX
Abdbfhdkmdmdjfmfkmfmfmfjjfjfjfnfnnfnfnfn
PPTX
Module4_AI 4th semester engineering.pptx
PPTX
update -2022 Lec 4 - Knowledge Representation.pptx
PPTX
Disc.Math-ppt.pptx it is very informative presentation for bachelor students ...
PPTX
LEC 1oral pathology by lecture 23jn yh.pptx
Knowledge Representation, Prepositional Logic, Representation and Mapping
Predicate logic_2(Artificial Intelligence)
22PCOAM11_IAI_Unit III Notes Full Notesmerged.pdf
continuity of module 2.pptx
ARTIFICIAL INTELLIGENCE---UNIT 4.pptx
Chapter 4 - Knowledge Representation and Reasoning (1).pdf
Lesson 26
AI Lesson 26
Introduction to First order logic .pptx
AI Lesson 11
Foundation_Logic_1.pptx discrete mathematics
Basic Knowledge Representation and Reasonong
lec3 AI.pptx
Logic programming (1)
m.a.t.h.e.m.a.t.i.c.s.d.i.s.c.r.e.t.e.pptx
Abdbfhdkmdmdjfmfkmfmfmfjjfjfjfnfnnfnfnfn
Module4_AI 4th semester engineering.pptx
update -2022 Lec 4 - Knowledge Representation.pptx
Disc.Math-ppt.pptx it is very informative presentation for bachelor students ...
LEC 1oral pathology by lecture 23jn yh.pptx
Ad

Recently uploaded (20)

PDF
Well-logging-methods_new................
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PDF
composite construction of structures.pdf
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
DOCX
573137875-Attendance-Management-System-original
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PPT
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
web development for engineering and engineering
PPTX
bas. eng. economics group 4 presentation 1.pptx
PPT
Mechanical Engineering MATERIALS Selection
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PPTX
Lecture Notes Electrical Wiring System Components
Well-logging-methods_new................
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
Model Code of Practice - Construction Work - 21102022 .pdf
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
composite construction of structures.pdf
Automation-in-Manufacturing-Chapter-Introduction.pdf
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
573137875-Attendance-Management-System-original
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
Embodied AI: Ushering in the Next Era of Intelligent Systems
R24 SURVEYING LAB MANUAL for civil enggi
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
web development for engineering and engineering
bas. eng. economics group 4 presentation 1.pptx
Mechanical Engineering MATERIALS Selection
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
Lecture Notes Electrical Wiring System Components

Knowledge Representation in Artificial Intelligence

  • 2. Knowledge Representation • A knowledge representation system should provide ways of representing complex knowledge and should possess the following characteristics: 1. The representation scheme should have a set of well-defined syntax and semantics. 2. The knowledge representation scheme should have a good expressive capacity. 3. The representation must be efficient, i.e., it should use only limited resources without compromising on the expressive power.
  • 3. How is a knowledge base different from a database?
  • 9. Commonly Used Propositional logic connectives S. no. Name Connective Symbol 1. Conjunction AND & 2. Inclusive disjunction OR V 3. Negation NOT ̄ 4. Material Condition IMPLIES 5. Material biconditional IFF 6. Exclusive disjunction XOR 7. Joint Denial NAND ‫׀‬ 8. Disjoint Denial NOR
  • 18. A B ̄ A ̄B AVB A&B AB AB A+B A ‫׀‬ B AB T T F F T T T T F F F F T T F T F T F T T F T F F T T F F F T T F F F T T F F T T F T T Truth table for logical connectives
  • 20. Problem: To verify that ((A & (A B)) B) is a tautology
  • 21. Commonly used logical Equivalences
  • 33. What is tautology in propositional logic? A tautology in propositional logic is a formula or statement that is always true, regardless of the truth values of its component propositions. For example, "P ∨ ¬P" (P or not P) is a tautology because it is always true whether P is true or false. Another example of a tautology in propositional logic is: "(P → Q) ∨ (Q → P)" This means "if P implies Q or Q implies P," which is always true, regardless of the truth values of P and Q. "(P ∧ True) → P" This means "P and true implies P," which is always true, regardless of the truth value of P.
  • 34. Statements that are tautologies Statements that are Contradictions
  • 35. Normal forms in Propositional Logic 1. Conjunctive Normal Form (CNF) 2. Disjunctive Normal Form (DNF) *A formula A is said to be in CNF if it has the form A= & & … & , n≥1 Where … is a disjunction of an atom or negation of an atom *A formula A is said to be in DNF if it has the form A= … V , n≥1 Where … is a conjunction of an atom or negation of an atom
  • 36. Conversion Procedure of formula to Normal Form 1. Eliminate implications and biconditionals. 2. Reduce the scope of NOT symbol by the formula ( ( A))=A and ̄ ̄ apply DeMorgan’s theorem to bring the negations before the atoms. 3. Use Distributive laws and other formulae to obtain the normal form.
  • 38. Predicate or First order logic A predicate is defined as a relation that binds two atoms together, e.g., Bhaskar likes aeroplanes is represented as LIKES (Bhaskar, aeroplanes). Here, LIKES is a predicate that links two atoms “Bhaskar” and “aeroplanes”. This predicate can be generalized as, LIKES(x,y) where x and y are variables meaning x likes y.
  • 39. Main purpose of predicate logic in AI? • The main purpose of predicate logic in AI is to provide a formal framework for representing and reasoning about facts and relationships in a domain. It helps in defining rules, making inferences, and solving problems that involve logical relationships.
  • 40. What are universal and existential quantifiers • Universal Quantifier (∀): It denotes "for all" or "for every." It implies that a statement applies to all elements within a certain domain. For example, ∀x P(x) means that the predicate P(x) is true for all x. • Existential Quantifier (∃): It denotes "there exists" or "for some." It implies that there is at least one element in the domain for which the statement is true. For example, ∃x P(x) means that there exists at least one x for which P(x) is true.
  • 42. NORMAL FORMS IN PREDICATE LOGIC In predicate logic normal form is Prenex Normal form. A formula A in predicate logic is said to be in Prenex Normal form if it has the form () ()… () B Where ( is either a V or 3 and B is a formula without any quantifiers. () ()… () is called the prefix and B is called matrix of the formula.
  • 43. Formulae for Prenex Normal form Conversion
  • 44. Rules of Inference S. no. Description Rule of Inference 1. 2. 3. 4. 5. Addition Simplification Modus Ponens Modus Tollens Disjunctive Syllogism
  • 45. Rules of Inference (Contd.)
  • 46. Describe the rule represented by the following statement in predicate logic: "∀x Animal(x) → Eats(x, 'Food')" • This statement in predicate logic can be read as: "For all x, if x is an animal, then x eats food." It means that every animal eats food.
  • 47. Resolution • Given any two clauses A and B, if there is a literal P1 in A which has a complementary literal P2 in B, delete P1 and P2 from A and B and construct a disjunction of the remaining clauses. The clause so constructed is called the resolvent of A and B. • Example:
  • 48. Limitations of Logic as knowledge representation Scheme * * * * * *
  • 49. 3. Rule Based System
  • 51. Definition Semantic net (or semantic network) in AI is a graphical representation of knowledge that uses nodes to represent objects, concepts, or entities, and edges (links) to represent the relationships between them. It is commonly used to show hierarchical relationships or associations between different elements in a system, aiding in knowledge representation and reasoning.
  • 53. Semantic Networks • A semantic network is a structure for representing knowledge as a pattern of interconnected nodes and arcs. • It is defined as a graphical representation of knowledge. • The objects under consideration serve as nodes and the relationship with other nodes give the arcs. • Nodes in the semantic net can be generic or individual node.
  • 55. Draw the semantic net for the following information: 1. Alice is a doctor. 2. Alice works at City Hospital. 3. City Hospital is located in New York. 4. Alice drives a red car.
  • 56. Here’s the answer to the semantic net for the provided information: 1. A node for "Alice" connected to a node labeled "Doctor" with an "is-a" relationship. 2. A node for "Alice" connected to a node labeled "City Hospital" with a "works-at" relationship. 3. A node for "City Hospital" connected to a node labeled "New York" with a "located-in" relationship. 4. A node for "Alice" connected to a node labeled "Red Car" with a "drives" relationship. Graphically, it looks like this: This graph represents the relationships and information given in the question.
  • 57. Draw the semantic net for the following information: 1. John is a professor. 2. John works at Harvard University. 3. Harvard University is located in Boston. 4. John teaches Computer Science.
  • 58. Here’s the semantic net for the provided information: 1. A node for "John" connected to a node labeled "Professor" with an "is-a" relationship. 2. A node for "John" connected to a node labeled "Harvard University" with a "works-at" relationship. 3. A node for "Harvard University" connected to a node labeled "Boston" with a "located-in" relationship. 4. A node for "John" connected to a node labeled "Computer Science" with a "teaches" relationship. Graphically, it looks like this: This graph represents the relationships and information in the question.
  • 60. Representation of variables in Semantic nets
  • 66. Frames • A frame can be defined as a data structure that has slots for various objects and a collection of frames consists of expectations for a given situation. Example: Sample frame of a computer centre.
  • 67. Declarative Frames • A frame that merely contains description about objects is called a declarative/factual/ situational frame.