SlideShare a Scribd company logo
1 of 11
21
Unification and lifting
Inference rules for quantifiers
Unification and Lifting
Subscribe
Inference rules for quantifiers
The rule of Universal Instantiation (UI for short) says that we can infer any sentence obtained by
substituting a ground term (a term without variables) for the variable. It can be applied multiple times to
add new sentences.
Suppose our knowledge base contains the axiom stating that
All greedy kings are evil: ∀ x King(x) ∧ Greedy(x) ⇒ Evil(x)
 Then it seems quite permissible to infer any of the following sentences:
 King(John) ∧ Greedy(John) ⇒ Evil(John)
 King(Richard) ∧ Greedy(Richard) ⇒ Evil(Richard)
 King(Father (John)) ∧ Greedy(Father (John)) ⇒ Evil(Father (John)) .
 Let SUBST(θ,α) denote the result of applying the substitution θ to the sentence α. Then the rule is
written
 ∀v α
 SUBST({v/g}, α)
 for any variable v and ground term g. For example, the three sentences are obtained with the
substitutions {x/John}, {x/Richard}, and {x/Father (John)}
Subscribe
Inference rules for quantifiers
In the rule for Existential Instantiation, the variable is replaced by a single new constant symbol. It
can be applied only once to replace the existential sentence.
The formal statement is as follows: for any sentence α, variable v, and constant symbol k that does not
appear elsewhere in the knowledge base,
 ∃v α
 SUBST({v/k}, α) .
 For example, from the sentence ∃ x Crown(x) ∧ OnHead(x, John)
 we can infer the sentence Crown(C1) ∧ OnHead(C1, John) as long as C1 does not appear
elsewhere in the knowledge base.
 The existential sentence says there is some object satisfying a condition and applying the
existential instantiation rule just gives a name to that object, this is called as Skolem constant.
Subscribe
Generalized Modus Ponens Rule
 ∀ x King(x) ∧ Greedy(x) ⇒ Evil(x)
 King(John)
 Greedy(John)
 {x/John} solves the query Evil(x).
 In this case, the substitution θ = {x/John}.
 Suppose that instead of knowing Greedy(John), we know that everyone is greedy
 ∀ y Greedy(y)
 We have to find a substitution both for the variables in the implication sentence and for the
variables in the sentences that are in the knowledge base. In this case, applying the substitution
{x/John, y/John} to the implication premises King(x) and Greedy(x) and the knowledge-base
sentences King(John) and Greedy(y) will make them identical.
 Thus, we can infer the conclusion of the implication. This inference process can be captured as a
single inference rule that we call Generalized Modus Ponens.
Subscribe
Generalized Modus Ponens Rule
 For atomic sentences pi, pi’ , and q, where there is a substitution θ
 such that SUBST(θ, pi’ ) = SUBST(θ, pi), for all i,
 p1’ , p2’ , ..., pn’ , (p1 ∧ p2 ∧ ... ∧ pn ⇒ q)
 SUBST(θ, q)
 There are n+ 1 premises to this rule: the n atomic sentences pi and the one implication.
 The conclusion is the result of applying the substitution θ to the consequent q. For our example:
 p1’ is King(John) p1 is King(x)
 p2’ is Greedy(y) p2 is Greedy(x)
 θ is {x/John, y/John} q is Evil(x)
 SUBST(θ, q) is Evil(John) .
 Generalized Modus Ponens is a lifted version of Modus Ponens—it raises Modus Ponens from
ground (variable-free) propositional logic to first-order logic.
Subscribe
Unification
Lifted inference rules require finding substitutions that make different logical expressions look
identical. This process is called unification and is a key component of all first-order inference
algorithms.
The UNIFY algorithm takes two sentences and returns a unifier for them if one exists:
Substitution means replacing one variable with another term. It takes two literals as input and make
them identical using substitution. It returns fail if the expressions do not match with each other.
UNIFY(p, q) = θ where SUBST(θ, p) = SUBST(θ, q)
Example: P(x, y) (i)
P(a, f(z)) (ii)
Substitute x with a, and y with f(z) in the first expression and it will represented as a/x and f(z)/y.
With both the substitution the first expression will be identical to the second expression and the
substitution set will be [a/x, f(z)/y]
Subscribe
Unification
Given : Knows(John, x) is a predicate.
 whom does John know?
 The UNIFY algorithm will search all the related sentences in the knowledge base , which could
unify with Knows(John, x)
 UNIFY(Knows(John, x), Knows(John, Jane)) = {x/Jane}
 UNIFY(Knows(John, x), Knows(y, Bill)) = {x/Bill, y/John}
 UNIFY(Knows(John, x), Knows(x,Elizabeth)) = fail.
 The last unification fails because x cannot take on the values John and Elizabeth at the same time.
Subscribe
Conditions for Unification
1. Predicate symbol must be same.
Knows(John, Jane)
Brother(John, Jane) fail
2. Number of arguments in both expressions must be identical.
Hate(Marry)
Hate(Marry, John) fail
3. Unification will fail if there are two similar variables present in the same expression.
UNIFY(Knows(John, x), Knows(x, Elizabeth)) = fail.
Thanks For
Watching
Reference:
Artificial Intelligence
A Modern Approach Third Edition
Peter Norvig and Stuart J. Russell
Subscribe
Like
Share
Next Topic:
Forward and Backword Chaining
OMega TechEd
About the Channel
This channel helps you to prepare for BSc IT and BSc computer science subjects.
In this channel we will learn Business Intelligence ,Artificial Intelligence, Digital Electronics,
Internet OF Things Python programming , Data-Structure etc.
Which is useful for upcoming university exams.
Gmail: omega.teched@gmail.com
Social Media Handles:
omega.teched
megha_with
Subscribe

More Related Content

What's hot

Issues in knowledge representation
Issues in knowledge representationIssues in knowledge representation
Issues in knowledge representation
Sravanthi Emani
 
Propositional logic
Propositional logicPropositional logic
Propositional logic
Rushdi Shams
 
Artificial intelligence- Logic Agents
Artificial intelligence- Logic AgentsArtificial intelligence- Logic Agents
Artificial intelligence- Logic Agents
Nuruzzaman Milon
 

What's hot (20)

Control Strategies in AI
Control Strategies in AI Control Strategies in AI
Control Strategies in AI
 
predicate logic example
predicate logic examplepredicate logic example
predicate logic example
 
Ontology engineering
Ontology engineering Ontology engineering
Ontology engineering
 
Issues in knowledge representation
Issues in knowledge representationIssues in knowledge representation
Issues in knowledge representation
 
AI Lecture 7 (uncertainty)
AI Lecture 7 (uncertainty)AI Lecture 7 (uncertainty)
AI Lecture 7 (uncertainty)
 
I. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHMI. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHM
 
L03 ai - knowledge representation using logic
L03 ai - knowledge representation using logicL03 ai - knowledge representation using logic
L03 ai - knowledge representation using logic
 
And or graph
And or graphAnd or graph
And or graph
 
Reasoning in AI
Reasoning in AIReasoning in AI
Reasoning in AI
 
First order logic
First order logicFirst order logic
First order logic
 
Propositional logic
Propositional logicPropositional logic
Propositional logic
 
Artificial intelligence- Logic Agents
Artificial intelligence- Logic AgentsArtificial intelligence- Logic Agents
Artificial intelligence- Logic Agents
 
Knowledge Representation in Artificial intelligence
Knowledge Representation in Artificial intelligence Knowledge Representation in Artificial intelligence
Knowledge Representation in Artificial intelligence
 
Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)
 
AI 7 | Constraint Satisfaction Problem
AI 7 | Constraint Satisfaction ProblemAI 7 | Constraint Satisfaction Problem
AI 7 | Constraint Satisfaction Problem
 
Planning
PlanningPlanning
Planning
 
Forward and Backward chaining in AI
Forward and Backward chaining in AIForward and Backward chaining in AI
Forward and Backward chaining in AI
 
State space search
State space searchState space search
State space search
 
Fuzzy Logic ppt
Fuzzy Logic pptFuzzy Logic ppt
Fuzzy Logic ppt
 
AI: Planning and AI
AI: Planning and AIAI: Planning and AI
AI: Planning and AI
 

Similar to Unification and Lifting

Jarrar.lecture notes.aai.2011s.ch9.fol.inference
Jarrar.lecture notes.aai.2011s.ch9.fol.inferenceJarrar.lecture notes.aai.2011s.ch9.fol.inference
Jarrar.lecture notes.aai.2011s.ch9.fol.inference
PalGov
 
Jarrar.lecture notes.aai.2011s.ch9.fol.inference
Jarrar.lecture notes.aai.2011s.ch9.fol.inferenceJarrar.lecture notes.aai.2011s.ch9.fol.inference
Jarrar.lecture notes.aai.2011s.ch9.fol.inference
PalGov
 
Nested Quantifiers.pptx
Nested Quantifiers.pptxNested Quantifiers.pptx
Nested Quantifiers.pptx
Jeevan225779
 
Real and convex analysis
Real and convex analysisReal and convex analysis
Real and convex analysis
Springer
 
Jarrar.lecture notes.aai.2011s.ch8.fol.introduction
Jarrar.lecture notes.aai.2011s.ch8.fol.introductionJarrar.lecture notes.aai.2011s.ch8.fol.introduction
Jarrar.lecture notes.aai.2011s.ch8.fol.introduction
PalGov
 
A Machine-Assisted Proof of Gödel's Incompleteness Theorems
A Machine-Assisted Proof of Gödel's Incompleteness TheoremsA Machine-Assisted Proof of Gödel's Incompleteness Theorems
A Machine-Assisted Proof of Gödel's Incompleteness Theorems
Lawrence Paulson
 

Similar to Unification and Lifting (20)

Jarrar.lecture notes.aai.2011s.ch9.fol.inference
Jarrar.lecture notes.aai.2011s.ch9.fol.inferenceJarrar.lecture notes.aai.2011s.ch9.fol.inference
Jarrar.lecture notes.aai.2011s.ch9.fol.inference
 
Jarrar.lecture notes.aai.2011s.ch9.fol.inference
Jarrar.lecture notes.aai.2011s.ch9.fol.inferenceJarrar.lecture notes.aai.2011s.ch9.fol.inference
Jarrar.lecture notes.aai.2011s.ch9.fol.inference
 
Predicates
PredicatesPredicates
Predicates
 
Nested Quantifiers.pptx
Nested Quantifiers.pptxNested Quantifiers.pptx
Nested Quantifiers.pptx
 
FOLBUKCFAIZ.pptx
FOLBUKCFAIZ.pptxFOLBUKCFAIZ.pptx
FOLBUKCFAIZ.pptx
 
Real and convex analysis
Real and convex analysisReal and convex analysis
Real and convex analysis
 
Chapter 01 - p2.pdf
Chapter 01 - p2.pdfChapter 01 - p2.pdf
Chapter 01 - p2.pdf
 
Propositional Logic and Pridicate logic
Propositional Logic and Pridicate logicPropositional Logic and Pridicate logic
Propositional Logic and Pridicate logic
 
03 propsem
03 propsem03 propsem
03 propsem
 
The Chase in Database Theory
The Chase in Database TheoryThe Chase in Database Theory
The Chase in Database Theory
 
IRJET - Fuzzy Soft Hyperideals in Meet Hyperlattices
IRJET - Fuzzy Soft Hyperideals in Meet HyperlatticesIRJET - Fuzzy Soft Hyperideals in Meet Hyperlattices
IRJET - Fuzzy Soft Hyperideals in Meet Hyperlattices
 
Applications of partial differentiation
Applications of partial differentiationApplications of partial differentiation
Applications of partial differentiation
 
Predicate Logic
Predicate LogicPredicate Logic
Predicate Logic
 
Cs229 notes8
Cs229 notes8Cs229 notes8
Cs229 notes8
 
H03702061062
H03702061062H03702061062
H03702061062
 
Jarrar.lecture notes.aai.2011s.ch8.fol.introduction
Jarrar.lecture notes.aai.2011s.ch8.fol.introductionJarrar.lecture notes.aai.2011s.ch8.fol.introduction
Jarrar.lecture notes.aai.2011s.ch8.fol.introduction
 
Semantics
SemanticsSemantics
Semantics
 
Jarrar: First Order Logic- Inference Methods
Jarrar: First Order Logic- Inference MethodsJarrar: First Order Logic- Inference Methods
Jarrar: First Order Logic- Inference Methods
 
A Machine-Assisted Proof of Gödel's Incompleteness Theorems
A Machine-Assisted Proof of Gödel's Incompleteness TheoremsA Machine-Assisted Proof of Gödel's Incompleteness Theorems
A Machine-Assisted Proof of Gödel's Incompleteness Theorems
 
lacl (1)
lacl (1)lacl (1)
lacl (1)
 

More from Megha Sharma

More from Megha Sharma (20)

Data Management Activities, Extraction, Transformation and Loading (ETL)
Data Management Activities, Extraction, Transformation and Loading (ETL)Data Management Activities, Extraction, Transformation and Loading (ETL)
Data Management Activities, Extraction, Transformation and Loading (ETL)
 
Descriptive Statistics: Mean, Median Mode and Standard Deviation.
Descriptive Statistics: Mean, Median Mode and Standard Deviation.Descriptive Statistics: Mean, Median Mode and Standard Deviation.
Descriptive Statistics: Mean, Median Mode and Standard Deviation.
 
Model Evaluation Matrix: Confusion Matrix, F1 Score, ROC curve AUC
Model Evaluation Matrix: Confusion Matrix, F1 Score, ROC curve AUCModel Evaluation Matrix: Confusion Matrix, F1 Score, ROC curve AUC
Model Evaluation Matrix: Confusion Matrix, F1 Score, ROC curve AUC
 
Model Evaluation Matrix: Accuracy, precision and recall
Model Evaluation Matrix: Accuracy, precision and recallModel Evaluation Matrix: Accuracy, precision and recall
Model Evaluation Matrix: Accuracy, precision and recall
 
Visualization Techniques- Box plot, Line Chart, Scatter plot, Bar chart.
Visualization Techniques- Box plot, Line Chart, Scatter plot, Bar chart.Visualization Techniques- Box plot, Line Chart, Scatter plot, Bar chart.
Visualization Techniques- Box plot, Line Chart, Scatter plot, Bar chart.
 
Visualization Techniques ,Exploratory Data Analysis(EDA), Histogram
Visualization Techniques ,Exploratory Data Analysis(EDA), HistogramVisualization Techniques ,Exploratory Data Analysis(EDA), Histogram
Visualization Techniques ,Exploratory Data Analysis(EDA), Histogram
 
Data Preprocessing- Data transformation, Scaling, Normalization, Standardiza...
Data Preprocessing- Data transformation,  Scaling, Normalization, Standardiza...Data Preprocessing- Data transformation,  Scaling, Normalization, Standardiza...
Data Preprocessing- Data transformation, Scaling, Normalization, Standardiza...
 
Data Science- Data Preprocessing, Data Cleaning.
Data Science- Data Preprocessing, Data Cleaning.Data Science- Data Preprocessing, Data Cleaning.
Data Science- Data Preprocessing, Data Cleaning.
 
Data Preprocessing- Feature Selection and Merging.
Data Preprocessing- Feature Selection and Merging.Data Preprocessing- Feature Selection and Merging.
Data Preprocessing- Feature Selection and Merging.
 
Different types of data. Qualitative, Quantitative, Ordinal, Nominal, Discret...
Different types of data. Qualitative, Quantitative, Ordinal, Nominal, Discret...Different types of data. Qualitative, Quantitative, Ordinal, Nominal, Discret...
Different types of data. Qualitative, Quantitative, Ordinal, Nominal, Discret...
 
Data Science comparison with AI, ML, BI, and data warehousing, data mining.
Data Science comparison with AI, ML, BI, and data warehousing, data mining.Data Science comparison with AI, ML, BI, and data warehousing, data mining.
Data Science comparison with AI, ML, BI, and data warehousing, data mining.
 
Data Science Introduction, Application of Data Science.
Data Science Introduction, Application of Data Science.Data Science Introduction, Application of Data Science.
Data Science Introduction, Application of Data Science.
 
Ensemble learning
Ensemble learningEnsemble learning
Ensemble learning
 
Association Rule mining
Association Rule miningAssociation Rule mining
Association Rule mining
 
Bellman's equation Reinforcement learning - II
Bellman's equation Reinforcement learning - IIBellman's equation Reinforcement learning - II
Bellman's equation Reinforcement learning - II
 
Reinforcement learning in Machine learning
 Reinforcement learning in Machine learning Reinforcement learning in Machine learning
Reinforcement learning in Machine learning
 
E-M Algorithm
E-M AlgorithmE-M Algorithm
E-M Algorithm
 
Entropy and information gain in decision tree.
Entropy and information gain in decision tree.Entropy and information gain in decision tree.
Entropy and information gain in decision tree.
 
Types of Machine Learning. & Decision Tree.
Types of Machine Learning. & Decision Tree.Types of Machine Learning. & Decision Tree.
Types of Machine Learning. & Decision Tree.
 
If statements in C
If statements in CIf statements in C
If statements in C
 

Recently uploaded

Call Girls in Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in  Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in  Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Recently uploaded (20)

Philosophy of china and it's charactistics
Philosophy of china and it's charactisticsPhilosophy of china and it's charactistics
Philosophy of china and it's charactistics
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
Basic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationBasic Intentional Injuries Health Education
Basic Intentional Injuries Health Education
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Call Girls in Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in  Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in  Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 

Unification and Lifting

  • 2. Inference rules for quantifiers Unification and Lifting
  • 3. Subscribe Inference rules for quantifiers The rule of Universal Instantiation (UI for short) says that we can infer any sentence obtained by substituting a ground term (a term without variables) for the variable. It can be applied multiple times to add new sentences. Suppose our knowledge base contains the axiom stating that All greedy kings are evil: ∀ x King(x) ∧ Greedy(x) ⇒ Evil(x)  Then it seems quite permissible to infer any of the following sentences:  King(John) ∧ Greedy(John) ⇒ Evil(John)  King(Richard) ∧ Greedy(Richard) ⇒ Evil(Richard)  King(Father (John)) ∧ Greedy(Father (John)) ⇒ Evil(Father (John)) .  Let SUBST(θ,α) denote the result of applying the substitution θ to the sentence α. Then the rule is written  ∀v α  SUBST({v/g}, α)  for any variable v and ground term g. For example, the three sentences are obtained with the substitutions {x/John}, {x/Richard}, and {x/Father (John)}
  • 4. Subscribe Inference rules for quantifiers In the rule for Existential Instantiation, the variable is replaced by a single new constant symbol. It can be applied only once to replace the existential sentence. The formal statement is as follows: for any sentence α, variable v, and constant symbol k that does not appear elsewhere in the knowledge base,  ∃v α  SUBST({v/k}, α) .  For example, from the sentence ∃ x Crown(x) ∧ OnHead(x, John)  we can infer the sentence Crown(C1) ∧ OnHead(C1, John) as long as C1 does not appear elsewhere in the knowledge base.  The existential sentence says there is some object satisfying a condition and applying the existential instantiation rule just gives a name to that object, this is called as Skolem constant.
  • 5. Subscribe Generalized Modus Ponens Rule  ∀ x King(x) ∧ Greedy(x) ⇒ Evil(x)  King(John)  Greedy(John)  {x/John} solves the query Evil(x).  In this case, the substitution θ = {x/John}.  Suppose that instead of knowing Greedy(John), we know that everyone is greedy  ∀ y Greedy(y)  We have to find a substitution both for the variables in the implication sentence and for the variables in the sentences that are in the knowledge base. In this case, applying the substitution {x/John, y/John} to the implication premises King(x) and Greedy(x) and the knowledge-base sentences King(John) and Greedy(y) will make them identical.  Thus, we can infer the conclusion of the implication. This inference process can be captured as a single inference rule that we call Generalized Modus Ponens.
  • 6. Subscribe Generalized Modus Ponens Rule  For atomic sentences pi, pi’ , and q, where there is a substitution θ  such that SUBST(θ, pi’ ) = SUBST(θ, pi), for all i,  p1’ , p2’ , ..., pn’ , (p1 ∧ p2 ∧ ... ∧ pn ⇒ q)  SUBST(θ, q)  There are n+ 1 premises to this rule: the n atomic sentences pi and the one implication.  The conclusion is the result of applying the substitution θ to the consequent q. For our example:  p1’ is King(John) p1 is King(x)  p2’ is Greedy(y) p2 is Greedy(x)  θ is {x/John, y/John} q is Evil(x)  SUBST(θ, q) is Evil(John) .  Generalized Modus Ponens is a lifted version of Modus Ponens—it raises Modus Ponens from ground (variable-free) propositional logic to first-order logic.
  • 7. Subscribe Unification Lifted inference rules require finding substitutions that make different logical expressions look identical. This process is called unification and is a key component of all first-order inference algorithms. The UNIFY algorithm takes two sentences and returns a unifier for them if one exists: Substitution means replacing one variable with another term. It takes two literals as input and make them identical using substitution. It returns fail if the expressions do not match with each other. UNIFY(p, q) = θ where SUBST(θ, p) = SUBST(θ, q) Example: P(x, y) (i) P(a, f(z)) (ii) Substitute x with a, and y with f(z) in the first expression and it will represented as a/x and f(z)/y. With both the substitution the first expression will be identical to the second expression and the substitution set will be [a/x, f(z)/y]
  • 8. Subscribe Unification Given : Knows(John, x) is a predicate.  whom does John know?  The UNIFY algorithm will search all the related sentences in the knowledge base , which could unify with Knows(John, x)  UNIFY(Knows(John, x), Knows(John, Jane)) = {x/Jane}  UNIFY(Knows(John, x), Knows(y, Bill)) = {x/Bill, y/John}  UNIFY(Knows(John, x), Knows(x,Elizabeth)) = fail.  The last unification fails because x cannot take on the values John and Elizabeth at the same time.
  • 9. Subscribe Conditions for Unification 1. Predicate symbol must be same. Knows(John, Jane) Brother(John, Jane) fail 2. Number of arguments in both expressions must be identical. Hate(Marry) Hate(Marry, John) fail 3. Unification will fail if there are two similar variables present in the same expression. UNIFY(Knows(John, x), Knows(x, Elizabeth)) = fail.
  • 10. Thanks For Watching Reference: Artificial Intelligence A Modern Approach Third Edition Peter Norvig and Stuart J. Russell Subscribe Like Share Next Topic: Forward and Backword Chaining
  • 11. OMega TechEd About the Channel This channel helps you to prepare for BSc IT and BSc computer science subjects. In this channel we will learn Business Intelligence ,Artificial Intelligence, Digital Electronics, Internet OF Things Python programming , Data-Structure etc. Which is useful for upcoming university exams. Gmail: omega.teched@gmail.com Social Media Handles: omega.teched megha_with Subscribe