SlideShare a Scribd company logo
1 of 63
KNOWLEDGE REPRESENTATION
&
PREDICATE LOGIC
Issues in Knowledge Representation
1. Important Attributes:
Any attribute of objects so basic that they occur in
almost every problem domain?
There are two attributes “instance” and “isa”, that are
general significance. These attributes are important
because they support property inheritance.
2. Relationship among attributes
1. Inverse — This is about consistency check, while a value is added to one
attribute. The entities are related to each other in many different ways.
2. Existence in an isa hierarchy — This is about generalization-specification,
like, classes of objects and specialized subsets of those classes, there are
attributes and specialization of attributes. For example, the attribute
height is a specialization of general attribute physical-size which is, in
turn, a specialization of physical-attribute. These generalization-
specialization relationships are important for attributes because they
support inheritance.
3. Technique for reasoning about values — This is about reasoning values of
attributes not given explicitly. Several kinds of information are used in
reasoning, like, height: must be in a unit of length, Age: of a person cannot
be greater than the age of person’s parents. The values are often specified
when a knowledge base is created.
4. Single valued attributes — This is about a specific attribute that is
guaranteed to take a unique value. For example, a baseball player can at
time have only a single height and be a member of only one team. KR
systems take different approaches to provide support for single valued
attributes.
3. Choosing Granularity:
 At what level of detail should the knowledge be represented?
Regardless of the KR formalism, it is necessary to know:
 At what level should the knowledge be represented and what
are the primitives?
 Should there be a small number or should there be a large
number of low-level primitives or High-level facts.
 High-level facts may not be adequate for inference while Low-
level primitives may require a lot of storage.
4. Finding Right structure:
Given a large amount of knowledge stored in a database, how can
relevant parts are accessed when they are needed?
 This is about access to right structure for describing a particular
situation.
 This requires, selecting an initial structure and then revising the
choice.
While doing so, it is necessary to solve following problems:
 How to perform an initial selection of the most appropriate
structure.
 How to fill in appropriate details from the current situations.
 How to find a better structure if the one chosen initially turns
out not to be appropriate.
 What to do if none of the available structures is appropriate.
 When to create and remember a new structure.
Knowledge Representation
Methods
 Logic
 Production Rules
 Semantic Nets
 Frames
Knowledge representation
What is Logic?
• Logic: the set of patterns used to carry out reasoning.
• Pattern: a template or a set of rules found as a result of
observing commonalities.
• Reasoning: is the act of using reason.
• Reason: ability of the human mind to form concepts or
knowledge and operate on symbols or language.
Types of Logic
Theories of Logic What Exists Belief of Agents
Propositional Logic Facts T/F/Unknown
First Order
Predicate Logic
or simply
Predicate Logic
Facts, objects,
relations
T/F/Unknown
Temporal Logic Facts, object,
Relations, Times
T/F/Unknown
Probability theory Facts Degree of belief
[0…..1]
Fuzzy Logic Degree of truth Degree of belief
[0…..1]
Predicate Logic
• Logic which is concerned not only with sentential
connectives but also with the internal structure
of atomic propositions is usually called a
predicate logic.
• Two common quantifiers are the existential  and
universal  quantifiers.
First Order Predicate Logic
• First-order predicate logic (like natural language) assumes
the world contains:
– Objects: people, houses, numbers,
colors, baseball games, wars, …
– Relations: prime, brother of, bigger
than, part of, comes between, …
– Functions: father of, best friend,
one more than, plus, …
Syntax of FOPL: Basic elements
• Constants a, b, c, Ram, 2, ...
• Predicates P, Q, R, EQUAL, ...
• Functions Sqrt, f, g, h, father-of, …
• Variables x, y, z, ...
• Connectives (Not), (Implies),
(And(conjuction)),
(Or(disjunction)),
(Double implies)
• Equality =
• Quantifiers , 
Inference Rules
• Inference rules provide the means to perform logical proofs or deduction.
• Modus Ponens: From P and P Q infer Q.
• For example:
Given: (Joe is a father)
And: (Joe is a father)  (Joe has a child)
Conclude: (Joe has a child)
 Chain Rule:
From P  Q and Q  R, infer P  R
P  Q
Q  R
P  R


P
P Q
Q
Horn clauses
 A literal is an atomic formula or its negation.
 A clause is a disjunction of literals.
 A Horn clause is a clause with exactly one
positive literal
 A Horn formula is a conjunctive normal form
formula whose clauses are all Horn
Example
Prolog:
Horn formula:
 c:- a, b.
 a.
 b.
 [c  ¬a  ¬b]  a  b
 [c,¬a, ¬ b] [a] [b]
Examples Predicate Logic
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. Caesar was a ruler.
ruler(Caesar)
5. All Romans were either loyal to Caesar or hated him.
x: Roman(x)  loyalto(x, Caesar)  hate(x, Caesar)
6. Every one is loyal to someone.
x: y: loyalto(x, y) y: x: 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)
A Predicate Logic Example
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. Caesar was a ruler. ruler(Caesar)
5. All Romans were either loyal to Caesar or hated him.
x: Roman(x)  loyalto(x, Caesar) V hate(x,Caesar)
6. Everyone is loyal to someone. x: y: loyalto(x,y)
7. People only try to assassinate rulers they aren't loyal to.
x:y:person(x) ruler(y)  tryassassinate(x,y) loyalto(x,y)
8. Marcus tried to assassinate Caesar.
tryassassinate(Marcus, Caesar)
9. All men are people. x: man(x)  person(x)
Normal Forms in Propositional and Predicate Logic
Conversion to
Clause Form:Example
 Example:
x: [Roman(x)  know(x, Marcus)] [hate(x,Caesar) V (y: z: hate(y,z) 
thinkcrazy(x,y))]
– Eliminate 
x: [Roman(x)  know(x, Marcus)] V [hate(x,Caesar) V (y: z:
 hate(y,z) V thinkcrazy(x,y))]
– Reduce the scope of each  to a single term.
x: [ Roman(x) V  know(x, Marcus)] V [hate(x,Caesar) V (y: z: hate(y,z) V
thinkcrazy(x,y))]
– Standardize variables so that each quantifier binds a unique variable:
x: P(x) V x: Q(x) converts to x: P(x) V y: Q(y)
x: Roman(x) V x:  know(x, Marcus) V
x: hate(x,Caesar) V (y: z: hate(y,z) V x: y: thinkcrazy(x,y))
Conversion to
Clause Form:Example
– Move quantifiers.
x: y: z: [Roman(x) V  know(x, Marcus)] V [hate(x,Caesar) V (hate(y,z) V
thinkcrazy(x,y))]
– Eliminate existential quantifiers.
y: President(y) will be converted to President(S1)
x: y: father-of(y,x) will be converted to
x: father-of(S2(x),x))
Here, there are no existential quantifiers.
– Drop the prefix.
[ Roman(x) V  know(x,Marcus)] V [hate(x, Caesar) V ( hate(y,z) V thinkcrazy(x,y))]
– Convert to a conjunction of disjuncts.
 Roman(x) V  know(x,Marcus) V hate(x,Caesar) V 
hate(y,z) V thinkcrazy(x,y)
Example
a) John likes all kind of food.
b) Apple and vegetable are food
c) Anything anyone eats and not killed is food.
d) Anil eats peanuts and still alive
e) Harry eats everything that Anil eats.
Prove by resolution that:
f) John likes peanuts.
Step-1: Conversion of Facts into FOL
Step-2: Conversion of FOL into CNF
Step-4: Draw Resolution graph:
Explanation of Resolution graph
• First step: ¬likes(John, Peanuts) , and likes(John, x) get
resolved(canceled) by substitution of {Peanuts/x}, and we
are left with ¬ food(Peanuts)
• Second step: ¬ food(Peanuts) , and food(z) get resolved
(canceled) by substitution of { Peanuts/z}, and we are left
with¬ eats(y, Peanuts) V killed(y) .
• Third step: ¬ eats(y, Peanuts) and eats (Anil, Peanuts) get
resolved by substitution {Anil/y}, and we are left with
Killed(Anil).
• Fourth step: Killed(Anil) and ¬ killed(k) get resolve by
substitution {Anil/k}, and we are left with ¬ alive(Anil) .
• Last step:¬ alive(Anil) and alive(Anil) get resolve

More Related Content

Similar to knowledge representation.pptx

Artificial intelligence and first order logic
Artificial intelligence and first order logicArtificial intelligence and first order logic
Artificial intelligence and first order logicparsa rafiq
 
Knowledge representation using predicate logic
Knowledge representation using predicate logicKnowledge representation using predicate logic
Knowledge representation using predicate logicHarshitaSharma285596
 
Random Forests without the Randomness June 16_2023.pptx
 Random Forests without the Randomness June 16_2023.pptx Random Forests without the Randomness June 16_2023.pptx
Random Forests without the Randomness June 16_2023.pptxKirkMonteverde
 
Chaps 1-3-ai-prolog
Chaps 1-3-ai-prologChaps 1-3-ai-prolog
Chaps 1-3-ai-prologsaru40
 
Stuart russell and peter norvig artificial intelligence - a modern approach...
Stuart russell and peter norvig   artificial intelligence - a modern approach...Stuart russell and peter norvig   artificial intelligence - a modern approach...
Stuart russell and peter norvig artificial intelligence - a modern approach...Lê Anh Đạt
 
Foundations of Knowledge Representation in Artificial Intelligence.pptx
Foundations of Knowledge Representation in Artificial Intelligence.pptxFoundations of Knowledge Representation in Artificial Intelligence.pptx
Foundations of Knowledge Representation in Artificial Intelligence.pptxkitsenthilkumarcse
 
BACK TO THE DRAWING BOARD - The Myth of Data-Driven NLU and How to go Forward...
BACK TO THE DRAWING BOARD - The Myth of Data-Driven NLU and How to go Forward...BACK TO THE DRAWING BOARD - The Myth of Data-Driven NLU and How to go Forward...
BACK TO THE DRAWING BOARD - The Myth of Data-Driven NLU and How to go Forward...Walid Saba
 
15methods for Qualitative Research
15methods for Qualitative Research15methods for Qualitative Research
15methods for Qualitative Researchmrinalwkh
 
Framester and WFD
Framester and WFD Framester and WFD
Framester and WFD Aldo Gangemi
 
Logic programming (1)
Logic programming (1)Logic programming (1)
Logic programming (1)Nitesh Singh
 
dfgsdfdsgdfgfdgdrgdfgffdhyrthfgnhgjhgdfs.ppt
dfgsdfdsgdfgfdgdrgdfgffdhyrthfgnhgjhgdfs.pptdfgsdfdsgdfgfdgdrgdfgffdhyrthfgnhgjhgdfs.ppt
dfgsdfdsgdfgfdgdrgdfgffdhyrthfgnhgjhgdfs.pptNobitaNobi489694
 
Reference Frame Introduction
Reference Frame IntroductionReference Frame Introduction
Reference Frame IntroductionBuild Intuit
 
Knowledge Representation and Reasoning.pptx
Knowledge Representation and Reasoning.pptxKnowledge Representation and Reasoning.pptx
Knowledge Representation and Reasoning.pptxMohanKumarP34
 
Basic Knowledge Representation in First Order Logic.ppt
Basic Knowledge Representation in First Order Logic.pptBasic Knowledge Representation in First Order Logic.ppt
Basic Knowledge Representation in First Order Logic.pptAshfaqAhmed693399
 
paradigmatic controversies, contradictions, and emerging confluences
paradigmatic controversies, contradictions, and emerging confluencesparadigmatic controversies, contradictions, and emerging confluences
paradigmatic controversies, contradictions, and emerging confluencesfelipemtz89
 
aritficial intellegence
aritficial intellegencearitficial intellegence
aritficial intellegenceAnkit Sharma
 

Similar to knowledge representation.pptx (20)

Artificial intelligence and first order logic
Artificial intelligence and first order logicArtificial intelligence and first order logic
Artificial intelligence and first order logic
 
Chaps 1-3-ai-prolog
Chaps 1-3-ai-prologChaps 1-3-ai-prolog
Chaps 1-3-ai-prolog
 
Knowledge representation using predicate logic
Knowledge representation using predicate logicKnowledge representation using predicate logic
Knowledge representation using predicate logic
 
Random Forests without the Randomness June 16_2023.pptx
 Random Forests without the Randomness June 16_2023.pptx Random Forests without the Randomness June 16_2023.pptx
Random Forests without the Randomness June 16_2023.pptx
 
Chaps 1-3-ai-prolog
Chaps 1-3-ai-prologChaps 1-3-ai-prolog
Chaps 1-3-ai-prolog
 
Stuart russell and peter norvig artificial intelligence - a modern approach...
Stuart russell and peter norvig   artificial intelligence - a modern approach...Stuart russell and peter norvig   artificial intelligence - a modern approach...
Stuart russell and peter norvig artificial intelligence - a modern approach...
 
Foundations of Knowledge Representation in Artificial Intelligence.pptx
Foundations of Knowledge Representation in Artificial Intelligence.pptxFoundations of Knowledge Representation in Artificial Intelligence.pptx
Foundations of Knowledge Representation in Artificial Intelligence.pptx
 
01bkb04p.ppt
01bkb04p.ppt01bkb04p.ppt
01bkb04p.ppt
 
BACK TO THE DRAWING BOARD - The Myth of Data-Driven NLU and How to go Forward...
BACK TO THE DRAWING BOARD - The Myth of Data-Driven NLU and How to go Forward...BACK TO THE DRAWING BOARD - The Myth of Data-Driven NLU and How to go Forward...
BACK TO THE DRAWING BOARD - The Myth of Data-Driven NLU and How to go Forward...
 
15methods for Qualitative Research
15methods for Qualitative Research15methods for Qualitative Research
15methods for Qualitative Research
 
Framester and WFD
Framester and WFD Framester and WFD
Framester and WFD
 
Logic programming (1)
Logic programming (1)Logic programming (1)
Logic programming (1)
 
dfgsdfdsgdfgfdgdrgdfgffdhyrthfgnhgjhgdfs.ppt
dfgsdfdsgdfgfdgdrgdfgffdhyrthfgnhgjhgdfs.pptdfgsdfdsgdfgfdgdrgdfgffdhyrthfgnhgjhgdfs.ppt
dfgsdfdsgdfgfdgdrgdfgffdhyrthfgnhgjhgdfs.ppt
 
Reference Frame Introduction
Reference Frame IntroductionReference Frame Introduction
Reference Frame Introduction
 
semantic.ppt
semantic.pptsemantic.ppt
semantic.ppt
 
Knowledge Representation and Reasoning.pptx
Knowledge Representation and Reasoning.pptxKnowledge Representation and Reasoning.pptx
Knowledge Representation and Reasoning.pptx
 
Basic Knowledge Representation in First Order Logic.ppt
Basic Knowledge Representation in First Order Logic.pptBasic Knowledge Representation in First Order Logic.ppt
Basic Knowledge Representation in First Order Logic.ppt
 
paradigmatic controversies, contradictions, and emerging confluences
paradigmatic controversies, contradictions, and emerging confluencesparadigmatic controversies, contradictions, and emerging confluences
paradigmatic controversies, contradictions, and emerging confluences
 
aritficial intellegence
aritficial intellegencearitficial intellegence
aritficial intellegence
 
Knowledge representation
Knowledge representationKnowledge representation
Knowledge representation
 

More from SwatiHans10

Transmission control protocol ...............................
Transmission control protocol ...............................Transmission control protocol ...............................
Transmission control protocol ...............................SwatiHans10
 
analytics platform
analytics platformanalytics platform
analytics platformSwatiHans10
 
data collection.ppt
data collection.pptdata collection.ppt
data collection.pptSwatiHans10
 
heuristic - best search and a*
heuristic - best search and a*heuristic - best search and a*
heuristic - best search and a*SwatiHans10
 
filler structures.pptx
filler structures.pptxfiller structures.pptx
filler structures.pptxSwatiHans10
 
filler structures
filler structuresfiller structures
filler structuresSwatiHans10
 
Multiplexing.ppt
Multiplexing.pptMultiplexing.ppt
Multiplexing.pptSwatiHans10
 
3D Transformation
3D Transformation3D Transformation
3D TransformationSwatiHans10
 

More from SwatiHans10 (14)

routing algo n
routing algo                                nrouting algo                                n
routing algo n
 
ethernet nn
ethernet                                         nnethernet                                         nn
ethernet nn
 
Transmission control protocol ...............................
Transmission control protocol ...............................Transmission control protocol ...............................
Transmission control protocol ...............................
 
search_sort.ppt
search_sort.pptsearch_sort.ppt
search_sort.ppt
 
analytics platform
analytics platformanalytics platform
analytics platform
 
kpi
kpikpi
kpi
 
data collection.ppt
data collection.pptdata collection.ppt
data collection.ppt
 
heuristic - best search and a*
heuristic - best search and a*heuristic - best search and a*
heuristic - best search and a*
 
filler structures.pptx
filler structures.pptxfiller structures.pptx
filler structures.pptx
 
filler structures
filler structuresfiller structures
filler structures
 
Multiplexing.ppt
Multiplexing.pptMultiplexing.ppt
Multiplexing.ppt
 
ER.ppt
ER.pptER.ppt
ER.ppt
 
Cloud computing
Cloud computingCloud computing
Cloud computing
 
3D Transformation
3D Transformation3D Transformation
3D Transformation
 

Recently uploaded

College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 

Recently uploaded (20)

College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 

knowledge representation.pptx

  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13. Issues in Knowledge Representation 1. Important Attributes: Any attribute of objects so basic that they occur in almost every problem domain? There are two attributes “instance” and “isa”, that are general significance. These attributes are important because they support property inheritance.
  • 14. 2. Relationship among attributes 1. Inverse — This is about consistency check, while a value is added to one attribute. The entities are related to each other in many different ways. 2. Existence in an isa hierarchy — This is about generalization-specification, like, classes of objects and specialized subsets of those classes, there are attributes and specialization of attributes. For example, the attribute height is a specialization of general attribute physical-size which is, in turn, a specialization of physical-attribute. These generalization- specialization relationships are important for attributes because they support inheritance. 3. Technique for reasoning about values — This is about reasoning values of attributes not given explicitly. Several kinds of information are used in reasoning, like, height: must be in a unit of length, Age: of a person cannot be greater than the age of person’s parents. The values are often specified when a knowledge base is created. 4. Single valued attributes — This is about a specific attribute that is guaranteed to take a unique value. For example, a baseball player can at time have only a single height and be a member of only one team. KR systems take different approaches to provide support for single valued attributes.
  • 15. 3. Choosing Granularity:  At what level of detail should the knowledge be represented? Regardless of the KR formalism, it is necessary to know:  At what level should the knowledge be represented and what are the primitives?  Should there be a small number or should there be a large number of low-level primitives or High-level facts.  High-level facts may not be adequate for inference while Low- level primitives may require a lot of storage.
  • 16. 4. Finding Right structure: Given a large amount of knowledge stored in a database, how can relevant parts are accessed when they are needed?  This is about access to right structure for describing a particular situation.  This requires, selecting an initial structure and then revising the choice. While doing so, it is necessary to solve following problems:  How to perform an initial selection of the most appropriate structure.  How to fill in appropriate details from the current situations.  How to find a better structure if the one chosen initially turns out not to be appropriate.  What to do if none of the available structures is appropriate.  When to create and remember a new structure.
  • 17. Knowledge Representation Methods  Logic  Production Rules  Semantic Nets  Frames
  • 18. Knowledge representation What is Logic? • Logic: the set of patterns used to carry out reasoning. • Pattern: a template or a set of rules found as a result of observing commonalities. • Reasoning: is the act of using reason. • Reason: ability of the human mind to form concepts or knowledge and operate on symbols or language.
  • 19. Types of Logic Theories of Logic What Exists Belief of Agents Propositional Logic Facts T/F/Unknown First Order Predicate Logic or simply Predicate Logic Facts, objects, relations T/F/Unknown Temporal Logic Facts, object, Relations, Times T/F/Unknown Probability theory Facts Degree of belief [0…..1] Fuzzy Logic Degree of truth Degree of belief [0…..1]
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26. Predicate Logic • Logic which is concerned not only with sentential connectives but also with the internal structure of atomic propositions is usually called a predicate logic. • Two common quantifiers are the existential  and universal  quantifiers.
  • 27. First Order Predicate Logic • First-order predicate logic (like natural language) assumes the world contains: – Objects: people, houses, numbers, colors, baseball games, wars, … – Relations: prime, brother of, bigger than, part of, comes between, … – Functions: father of, best friend, one more than, plus, …
  • 28. Syntax of FOPL: Basic elements • Constants a, b, c, Ram, 2, ... • Predicates P, Q, R, EQUAL, ... • Functions Sqrt, f, g, h, father-of, … • Variables x, y, z, ... • Connectives (Not), (Implies), (And(conjuction)), (Or(disjunction)), (Double implies) • Equality = • Quantifiers , 
  • 29. Inference Rules • Inference rules provide the means to perform logical proofs or deduction. • Modus Ponens: From P and P Q infer Q. • For example: Given: (Joe is a father) And: (Joe is a father)  (Joe has a child) Conclude: (Joe has a child)  Chain Rule: From P  Q and Q  R, infer P  R P  Q Q  R P  R   P P Q Q
  • 30. Horn clauses  A literal is an atomic formula or its negation.  A clause is a disjunction of literals.  A Horn clause is a clause with exactly one positive literal  A Horn formula is a conjunctive normal form formula whose clauses are all Horn
  • 31. Example Prolog: Horn formula:  c:- a, b.  a.  b.  [c  ¬a  ¬b]  a  b  [c,¬a, ¬ b] [a] [b]
  • 32.
  • 33.
  • 34.
  • 35.
  • 36. Examples Predicate Logic 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. Caesar was a ruler. ruler(Caesar) 5. All Romans were either loyal to Caesar or hated him. x: Roman(x)  loyalto(x, Caesar)  hate(x, Caesar)
  • 37.
  • 38.
  • 39.
  • 40.
  • 41. 6. Every one is loyal to someone. x: y: loyalto(x, y) y: x: 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)
  • 42. A Predicate Logic Example 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. Caesar was a ruler. ruler(Caesar) 5. All Romans were either loyal to Caesar or hated him. x: Roman(x)  loyalto(x, Caesar) V hate(x,Caesar) 6. Everyone is loyal to someone. x: y: loyalto(x,y) 7. People only try to assassinate rulers they aren't loyal to. x:y:person(x) ruler(y)  tryassassinate(x,y) loyalto(x,y) 8. Marcus tried to assassinate Caesar. tryassassinate(Marcus, Caesar) 9. All men are people. x: man(x)  person(x)
  • 43. Normal Forms in Propositional and Predicate Logic
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
  • 49. Conversion to Clause Form:Example  Example: x: [Roman(x)  know(x, Marcus)] [hate(x,Caesar) V (y: z: hate(y,z)  thinkcrazy(x,y))] – Eliminate  x: [Roman(x)  know(x, Marcus)] V [hate(x,Caesar) V (y: z:  hate(y,z) V thinkcrazy(x,y))] – Reduce the scope of each  to a single term. x: [ Roman(x) V  know(x, Marcus)] V [hate(x,Caesar) V (y: z: hate(y,z) V thinkcrazy(x,y))] – Standardize variables so that each quantifier binds a unique variable: x: P(x) V x: Q(x) converts to x: P(x) V y: Q(y) x: Roman(x) V x:  know(x, Marcus) V x: hate(x,Caesar) V (y: z: hate(y,z) V x: y: thinkcrazy(x,y))
  • 50. Conversion to Clause Form:Example – Move quantifiers. x: y: z: [Roman(x) V  know(x, Marcus)] V [hate(x,Caesar) V (hate(y,z) V thinkcrazy(x,y))] – Eliminate existential quantifiers. y: President(y) will be converted to President(S1) x: y: father-of(y,x) will be converted to x: father-of(S2(x),x)) Here, there are no existential quantifiers. – Drop the prefix. [ Roman(x) V  know(x,Marcus)] V [hate(x, Caesar) V ( hate(y,z) V thinkcrazy(x,y))] – Convert to a conjunction of disjuncts.  Roman(x) V  know(x,Marcus) V hate(x,Caesar) V  hate(y,z) V thinkcrazy(x,y)
  • 51.
  • 52.
  • 53.
  • 54.
  • 55. Example a) John likes all kind of food. b) Apple and vegetable are food c) Anything anyone eats and not killed is food. d) Anil eats peanuts and still alive e) Harry eats everything that Anil eats. Prove by resolution that: f) John likes peanuts.
  • 56. Step-1: Conversion of Facts into FOL
  • 57. Step-2: Conversion of FOL into CNF
  • 58.
  • 59.
  • 60.
  • 61.
  • 63. Explanation of Resolution graph • First step: ¬likes(John, Peanuts) , and likes(John, x) get resolved(canceled) by substitution of {Peanuts/x}, and we are left with ¬ food(Peanuts) • Second step: ¬ food(Peanuts) , and food(z) get resolved (canceled) by substitution of { Peanuts/z}, and we are left with¬ eats(y, Peanuts) V killed(y) . • Third step: ¬ eats(y, Peanuts) and eats (Anil, Peanuts) get resolved by substitution {Anil/y}, and we are left with Killed(Anil). • Fourth step: Killed(Anil) and ¬ killed(k) get resolve by substitution {Anil/k}, and we are left with ¬ alive(Anil) . • Last step:¬ alive(Anil) and alive(Anil) get resolve