SlideShare une entreprise Scribd logo
1  sur  61
Dr. Mustafa Jarrar [email_address]   www.jarrar.info   University of Birzeit Chapter 9 Inference in first-order logic Advanced Artificial Intelligence  (SCOM7341) Lecture Notes  University of Birzeit 2 nd  Semester, 2011
Motivation: Knowledge Bases vs. Databases The DB is a set of tuples, and queries are perfromed truth rvaluation. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Wffs : Proof xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Provability Query Answer Knowledge Base System Query Proof Theoretic View Constraints DBMS Transactions i.e insert, update, delete... Query Query Answer Model Theoretic View The KB is a set of formulae and the query evaluation is to prove that the result is provable.
Outline ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Inference in First-Order Logic ,[object Object],[object Object],[object Object],[object Object],[object Object]
Propositionalization Universal Quantifiers ,[object Object],[object Object],[object Object],[object Object],[object Object], x  King ( x )     Greedy ( x )     Evil ( x )  King ( John )  Greedy ( John ) ,[object Object],Then we can say So we reduced the FOL  knowledge base into PL KB So we reduced the FOL  sentence into PL sentence
Propositionalization Existential quantifiers ,[object Object],[object Object],[object Object],Crown(C 1 )    OnHead(C 1 ,John)  x Crown(x)    OnHead(x,John) Example: ,[object Object],[object Object],[object Object],provided  C 1  is a new constant symbol, called a  Skolem constant.
Reduction to Propositional Inference ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],irrelevant
Reduction to Propositional Inference ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Reduction to Propositional Inference ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Problems with Propositionalization ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Problems with Propositionalization ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Unification ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Unification Example Unify (p,q)  =  θ   where Subst( θ ,p) = Subset( θ ,q) Suppose we have a query Knows(John,x), we need to unify Knows(John,x) with all sentences in KD. Knows(John,x)  Knows(John,Jane)  Knows(John,x) Knows(y,Bill)  Knows(John,x)  Knows(y,Mother(y)) Knows(John,x) Knows(x,Elizabeth)  Q P   θ
Unification Example {x/Jane} Unify (p,q)  =  θ   where Subst( θ ,p) = Subset( θ ,q) Suppose we have a query Knows(John,x), we need to unify Knows(John,x) with all sentences in KD. Knows(John,x)  Knows(John,Jane)  Knows(John,x) Knows(y,Bill)  Knows(John,x)  Knows(y,Mother(y)) Knows(John,x) Knows(x,Elizabeth)  Q P   θ
Unification Example {x/Jane} {x/Bill,y/John} Unify (p,q)  =  θ   where Subst( θ ,p) = Subset( θ ,q) Suppose we have a query Knows(John,x), we need to unify Knows(John,x) with all sentences in KD. Knows(John,x)  Knows(John,Jane)  Knows(John,x) Knows(y,Bill)  Knows(John,x)  Knows(y,Mother(y)) Knows(John,x) Knows(x,Elizabeth)  Q P   θ
Unification Example {x/Jane} {x/Bill,y/John} {y/John,x/Mother(John)} Unify (p,q)  =  θ   where Subst( θ ,p) = Subset( θ ,q) Suppose we have a query Knows(John,x), we need to unify Knows(John,x) with all sentences in KD. Knows(John,x)  Knows(John,Jane)  Knows(John,x) Knows(y,Bill)  Knows(John,x)  Knows(y,Mother(y)) Knows(John,x) Knows(x,Elizabeth)  Q P   θ
Unification Example {x/Jane} {x/Bill,y/John} {y/John,x/Mother(John)} fail ,[object Object],[object Object],[object Object],Unify (p,q)  =  θ   where Subst( θ ,p) = Subset( θ ,q) Suppose we have a query Knows(John,x), we need to unify Knows(John,x) with all sentences in KD. Knows(John,x)  Knows(John,Jane)  Knows(John,x) Knows(y,Bill)  Knows(John,x)  Knows(y,Mother(y)) Knows(John,x) Knows(x,Elizabeth)  Q P   θ
Unification Example {x/Jane} {x/Bill,y/John} {y/John,x/Mother(John)} {x/Elizabeth, z 17 /John} ,[object Object],[object Object],[object Object],Unify (p,q)  =  θ   where Subst( θ ,p) = Subset( θ ,q) Suppose we have a query Knows(John,x), we need to unify Knows(John,x) with all sentences in KD. Knows(John,x)  Knows(John,Jane)  Knows(John,x) Knows(y,Bill)  Knows(John,x)  Knows(y,Mother(y)) Knows(John,x) Knows(z 17 ,Elizabeth)  Q P   θ
Unification Example {x/Jane} {x/Bill,y/John} {y/John,x/Mother(John)} {x/Elizabeth, z 17 /John} Unify (p,q)  =  θ   where Subst( θ ,p) = Subset( θ ,q) Suppose we have a query Knows(John,x), we need to unify Knows(John,x) with all sentences in KD. Knows(John,x)  Knows(John,Jane)  Knows(John,x) Knows(y,Bill)  Knows(John,x)  Knows(y,Mother(y)) Knows(John,x) Knows(z 17 ,Elizabeth)  Q P   θ
Unification Example {x/Jane} {x/Bill,y/John} {y/John,x/Mother(John)} {x/Elizabeth, z 17 /John} In the last case, we have two answers: θ = {y/John,x/z}, or θ = {y/John,x/John, z/John} ?? This first unification is more general,  as it places fewer restrictions on the  values of the variables. Unify (p,q)  =  θ   where Subst( θ ,p) = Subset( θ ,q) Suppose we have a query Knows(John,x), we need to unify Knows(John,x) with all sentences in KD. Knows(John,x)  Knows(John,Jane)  Knows(John,x) Knows(y,Bill)  Knows(John,x)  Knows(y,Mother(y)) Knows(John,x) Knows(z 17 ,Elizabeth)  Knows(John,x)  Knows(y,z) Q P   θ
Unification Example {x/Jane} {x/Bill,y/John} {y/John,x/Mother(John)} {x/Elizabeth, z 17 /John} For every unifiable pair of  expressions, there is a  Most General Unifier  MGU In the last case, we have two answers: θ = {y/John,x/z}, or θ = {y/John,x/John, z/John} {y/John,x/z} Unify (p,q)  =  θ   where Subst( θ ,p) = Subset( θ ,q) Suppose we have a query Knows(John,x), we need to unify Knows(John,x) with all sentences in KD. Knows(John,x)  Knows(John,Jane)  Knows(John,x) Knows(y,Bill)  Knows(John,x)  Knows(y,Mother(y)) Knows(John,x) Knows(z 17 ,Elizabeth)  Knows(John,x)  Knows(y,z) Q P   θ
Other Examples ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Generalized Modus Ponens (GMP) where  P i   θ  =  Q i   θ  for all  i A first-order inference rule, to find substitutions easily. ,[object Object],[object Object],P 1 ,  P 2 , … ,  P n ,  (  Q 1      Q 2     …     Q n    R ) Subst (R,  θ ) King ( John ) , Greedy ( y ) ,  ( King ( x ) , Greedy ( x )     Evil ( x )) Subst(Evil(x),  {x/John, y/John})
Generalized Modus Ponens (GMP) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Forward Chaining ,[object Object],[object Object],[object Object]
Example Knowledge Base ,[object Object],[object Object]
Example Knowledge Base contd. ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Forward Chaining Proof American ( x )    Weapon ( y )  Sells ( x,y,z ) Missile ( M 1 ) Owns ( Nono,M 1 )   Missile ( x )   Owns ( Nono,x ) Sells ( West,x,Nono )   Weapon(x) Missile ( x )    Enemy ( x,America )   Hostile ( x )  ,[object Object],[object Object], Criminal(x)  Hostile(x)
Forward Chaining Proof American ( x )    Weapon ( y )  Sells ( x,y,z ) Missile ( M 1 ) Owns ( Nono,M 1 )   Missile ( x )   Owns ( Nono,x ) Sells ( West,x,Nono )   Weapon(x) Missile ( x )    Enemy ( x,America )   Hostile ( x )  ,[object Object],[object Object], Criminal(x)  Hostile(x)
Forward Chaining Proof American ( x )    Weapon ( y )  Sells ( x,y,z ) Missile ( M 1 ) Owns ( Nono,M 1 )   Missile ( x )   Owns ( Nono,x ) Sells ( West,x,Nono )   Weapon(x) Missile ( x )    Enemy ( x,America )   Hostile ( x )  ,[object Object],[object Object], Criminal(x)  Hostile(x)
Forward Chaining Proof American ( x )    Weapon ( y )  Sells ( x,y,z ) Missile ( M 1 ) Owns ( Nono,M 1 )   Missile ( x )   Owns ( Nono,x ) Sells ( West,x,Nono )   Weapon(x) Missile ( x )    Enemy ( x,America )   Hostile ( x )  ,[object Object],[object Object], Criminal(x)  Hostile(x)
Forward Chaining Proof American ( x )    Weapon ( y )  Sells ( x,y,z ) Missile ( M 1 ) Owns ( Nono,M 1 )   Missile ( x )   Owns ( Nono,x ) Sells ( West,x,Nono )   Weapon(x) Missile ( x )    Enemy ( x,America )   Hostile ( x )  ,[object Object],[object Object], Criminal(x)  Hostile(x)
Forward Chaining Proof American ( x )    Weapon ( y )  Sells ( x,y,z ) Missile ( M 1 ) Owns ( Nono,M 1 )   Missile ( x )   Owns ( Nono,x ) Sells ( West,x,Nono )   Weapon(x) Missile ( x )    Enemy ( x,America )   Hostile ( x )  ,[object Object],[object Object], Criminal(x)  Hostile(x)
Properties of Forward Chaining ,[object Object],[object Object],[object Object],[object Object],[object Object]
Efficiency of Forward Chaining ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Backward Chaining ,[object Object],[object Object]
Backward chaining example American ( x )    Weapon ( y )  Sells ( x,y,z )  Criminal ( x ) Missile ( M 1 ) Owns ( Nono,M 1 )   Missile ( x )   Owns ( Nono,x ) Sells ( West,x,Nono )   Weapon(x) Missile ( x )    Enemy ( x,America )   Hostile ( x )  ,[object Object],[object Object], Hostile ( x )
Backward chaining example American ( x )    Weapon ( y )  Sells ( x,y,z ) Missile ( M 1 ) Owns ( Nono,M 1 )   Missile ( x )   Owns ( Nono,x ) Sells ( West,x,Nono )   Weapon(x) Missile ( x )    Enemy ( x,America )   Hostile ( x )  ,[object Object],[object Object], Criminal ( x )  Hostile(x)
Backward chaining example American ( x )    Weapon ( y )  Sells ( x,y,z ) Missile ( M 1 ) Owns ( Nono,M 1 )   Missile ( x )   Owns ( Nono,x ) Sells ( West,x,Nono )   Weapon(x) Missile ( x )    Enemy ( x,America )   Hostile ( x )  ,[object Object],[object Object], Criminal ( x )  Hostile(x)
Backward chaining example American ( x )    Weapon ( y )  Sells ( x,y,z ) Missile ( M 1 ) Owns ( Nono,M 1 )   Missile ( x )   Owns ( Nono,x ) Sells ( West,x,Nono )   Weapon(x) Missile ( x )    Enemy ( x,America )   Hostile ( x )  ,[object Object],[object Object], Criminal ( x )  Hostile(x)
Backward chaining example American ( x )    Weapon ( y )  Sells ( x,y,z ) Missile ( M 1 ) Owns ( Nono,M 1 )   Missile ( x )   Owns ( Nono,x ) Sells ( West,x,Nono )   Weapon(x) Missile ( x )    Enemy ( x,America )   Hostile ( x )  ,[object Object],[object Object], Criminal ( x )  Hostile(x)
Backward chaining example American ( x )    Weapon ( y )  Sells ( x,y,z ) Missile ( M 1 ) Owns ( Nono,M 1 )   Missile ( x )   Owns ( Nono,x ) Sells ( West,x,Nono )   Weapon(x) Missile ( x )    Enemy ( x,America )   Hostile ( x )  ,[object Object],[object Object], Criminal ( x )  Hostile(x)
Backward chaining example American ( x )    Weapon ( y )  Sells ( x,y,z ) Missile ( M 1 ) Owns ( Nono,M 1 )   Missile ( x )   Owns ( Nono,x ) Sells ( West,x,Nono )   Weapon(x) Missile ( x )    Enemy ( x,America )   Hostile ( x )  ,[object Object],[object Object], Criminal ( x )  Hostile(x)
Properties of Backward Chaining ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Forward  vs.  Backward Chaining ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Logic Programming ,[object Object],[object Object],[object Object],If B 1  and … and B n  then H ,[object Object],where implication would be interpreted as a solution of problem H given solutions of B 1  … B n .  ,[object Object],[object Object]
Logic Programming: Prolog ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Logic Programming: Prolog ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],?- sibling(Sara, Dina).  Yes  ?- father(Father, Child).  // enumerates all valid answers
Resolution in FOL
Resolution in FOL ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Conversion to CNF ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Conversion to CNF contd. ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Resolution in FOL ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Resolution in FOL (Example) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Resolution in FOL (Example)
Resolution in FOL (Example) A1 ,[object Object],A2 ,[object Object],B  Loves(y,x)      Animal(z)      Kills(x,z) C  Animal(x) Cat(Foxi) Loves(Ali,x) D Kills(Ali,Foxi)    Kills(Kais, Foxi) E Cat(Foxi) F  Cat(x)    Animal (x) G ,[object Object],H Animal (Foxi) E,F {x/Foxi} I ,[object Object],D,G {} J ,[object Object],A2,C {x/Ali, F(x)/x} K ,[object Object],J,A1 {F(x)/F(Ali), X/Ali} L ,[object Object],H,B {z/Foxi} M ,[object Object],I,L {x/Ali} N . M,K {y/G(Ali)}
Resolution in FOL (Another Example) ,[object Object],[object Object],[object Object],   American(x)      Weapon(y)      Sells(x,y,z)      Hostile(z)    Criminal(x)  Missile(x)      Owns(Nono,x)    Sells(West,x,Nano)  Enemy(x,America)    Hostile(x)   Missile(x)    Weapon(x) Owns(Nono,M 1 ) Missile(M 1 )  American(West)  Enemy(Nano,America)  Criminal (West)
Resolution in FOL (Another Example) 1    American(x)      Weapon(y)      Sells(x,y,z)      Hostile(z)    Criminal(x) 2  Missile(x)      Owns(Nono,x)    Sells(West,x,Nano) 3  Enemy(x,America)    Hostile(x)  4  Missile(x)    Weapon(x) 5 Owns(Nono,M 1 ) 6 Missile(M 1 )  7 American(West)  8 Enemy(Nano,America) 9  Criminal (West)
Resolution in FOL (Another Example) 1    American(x)      Weapon(y)      Sells(x,y,z)      Hostile(z)    Criminal(x) 2  Missile(x)      Owns(Nono,x)    Sells(West,x,Nano) 3  Enemy(x,America)    Hostile(x)  4  Missile(x)    Weapon(x) 5 Owns(Nono,M 1 ) 6 Missile(M 1 )  7 American(West)  8 Enemy(Nano,America) 9  Criminal (West) 10    American(West)      Weapon(y)      Sells(West,y,z)      Hostile(z)  1,9 {x/West} 11  Weapon(y)      Sells(West,y,z)      Hostile(z)  7,10 {x/West} 12  Missile(y)      Sells(West,y,z)      Hostile(z)  4,11 {x/y} 13  Sells(West,M 1 ,z)      Hostile(z) 6,12 {y/M 1 } 14  Missile(M 1 )      Owns(Nono, M 1 )      Hostile(Nano) 2,13 {x/M 1 , z/Nano} 15  Owns(Nono, M 1 )      Hostile(Nano) 6,14 {} 16  Hostile(Nano) 5,15 {} 17  Enemy(Nano,America) 3,16 {x/Nano} 18 . 8,17 {}
Resolution in FOL (Another Example) 9 10 11 12 13 14 15 16 17 18 1 7 6 2 6 4 5 3 8 Another representation (as Tree)
Summary ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

Contenu connexe

Tendances

On fuzzy compact open topology
On fuzzy compact open topologyOn fuzzy compact open topology
On fuzzy compact open topology
bkrawat08
 
Data Complexity in EL Family of Description Logics
Data Complexity in EL Family of Description LogicsData Complexity in EL Family of Description Logics
Data Complexity in EL Family of Description Logics
Adila Krisnadhi
 
Local Closed World Semantics - DL 2011 Poster
Local Closed World Semantics - DL 2011 PosterLocal Closed World Semantics - DL 2011 Poster
Local Closed World Semantics - DL 2011 Poster
Adila Krisnadhi
 

Tendances (19)

Logic 2
Logic 2Logic 2
Logic 2
 
Per3 logika&pembuktian
Per3 logika&pembuktianPer3 logika&pembuktian
Per3 logika&pembuktian
 
First order logic
First order logicFirst order logic
First order logic
 
3 fol examples v2
3 fol examples v23 fol examples v2
3 fol examples v2
 
Predicate Logic
Predicate LogicPredicate Logic
Predicate Logic
 
W.cholamjiak
W.cholamjiakW.cholamjiak
W.cholamjiak
 
On fuzzy compact open topology
On fuzzy compact open topologyOn fuzzy compact open topology
On fuzzy compact open topology
 
Update 2
Update 2Update 2
Update 2
 
Fibrewise near compact and locally near compact spaces
Fibrewise near compact and locally near compact spacesFibrewise near compact and locally near compact spaces
Fibrewise near compact and locally near compact spaces
 
Data Complexity in EL Family of Description Logics
Data Complexity in EL Family of Description LogicsData Complexity in EL Family of Description Logics
Data Complexity in EL Family of Description Logics
 
Raices primitivas
Raices primitivasRaices primitivas
Raices primitivas
 
Discrete assignment
Discrete assignmentDiscrete assignment
Discrete assignment
 
True but Unprovable
True but UnprovableTrue but Unprovable
True but Unprovable
 
Lesson 5: Continuity
Lesson 5: ContinuityLesson 5: Continuity
Lesson 5: Continuity
 
First order logic
First order logicFirst order logic
First order logic
 
Overview prolog
Overview prologOverview prolog
Overview prolog
 
Local Closed World Semantics - DL 2011 Poster
Local Closed World Semantics - DL 2011 PosterLocal Closed World Semantics - DL 2011 Poster
Local Closed World Semantics - DL 2011 Poster
 
C2.0 propositional logic
C2.0 propositional logicC2.0 propositional logic
C2.0 propositional logic
 
3.6 Families ordered by inclusion
3.6 Families ordered by inclusion3.6 Families ordered by inclusion
3.6 Families ordered by inclusion
 

En vedette

16 1 predicate resolution
16 1 predicate resolution16 1 predicate resolution
16 1 predicate resolution
Tianlu Wang
 
Inference in first order logic12
Inference in first order logic12Inference in first order logic12
Inference in first order logic12
yosser atassi
 

En vedette (7)

Jarrar: Propositional Logic Inference Methods
Jarrar: Propositional Logic Inference MethodsJarrar: Propositional Logic Inference Methods
Jarrar: Propositional Logic Inference Methods
 
Chap05
Chap05Chap05
Chap05
 
16 1 predicate resolution
16 1 predicate resolution16 1 predicate resolution
16 1 predicate resolution
 
Inference in first order logic12
Inference in first order logic12Inference in first order logic12
Inference in first order logic12
 
Attacks in MANET
Attacks in MANETAttacks in MANET
Attacks in MANET
 
Artificial Intelligence
Artificial IntelligenceArtificial Intelligence
Artificial Intelligence
 
Deep Learning - The Past, Present and Future of Artificial Intelligence
Deep Learning - The Past, Present and Future of Artificial IntelligenceDeep Learning - The Past, Present and Future of Artificial Intelligence
Deep Learning - The Past, Present and Future of Artificial Intelligence
 

Similaire à Jarrar.lecture notes.aai.2011s.ch9.fol.inference

Exchanging More than Complete Data
Exchanging More than Complete DataExchanging More than Complete Data
Exchanging More than Complete Data
net2-project
 
Nested Quantifiers.pptx
Nested Quantifiers.pptxNested Quantifiers.pptx
Nested Quantifiers.pptx
Jeevan225779
 
introduction to Genifer -- Deduction
introduction to Genifer -- Deductionintroduction to Genifer -- Deduction
introduction to Genifer -- Deduction
Yan Yin
 
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
 

Similaire à Jarrar.lecture notes.aai.2011s.ch9.fol.inference (20)

L03 ai - knowledge representation using logic
L03 ai - knowledge representation using logicL03 ai - knowledge representation using logic
L03 ai - knowledge representation using logic
 
Predicates
PredicatesPredicates
Predicates
 
9.class-notesr9.ppt
9.class-notesr9.ppt9.class-notesr9.ppt
9.class-notesr9.ppt
 
Exchanging More than Complete Data
Exchanging More than Complete DataExchanging More than Complete Data
Exchanging More than Complete Data
 
Fol
FolFol
Fol
 
lect14-semantics.ppt
lect14-semantics.pptlect14-semantics.ppt
lect14-semantics.ppt
 
Nested Quantifiers.pptx
Nested Quantifiers.pptxNested Quantifiers.pptx
Nested Quantifiers.pptx
 
Chapter 01 - p2.pdf
Chapter 01 - p2.pdfChapter 01 - p2.pdf
Chapter 01 - p2.pdf
 
introduction to Genifer -- Deduction
introduction to Genifer -- Deductionintroduction to Genifer -- Deduction
introduction to Genifer -- Deduction
 
lecture-inference-in-first-order-logic.pdf
lecture-inference-in-first-order-logic.pdflecture-inference-in-first-order-logic.pdf
lecture-inference-in-first-order-logic.pdf
 
01bkb04p.ppt
01bkb04p.ppt01bkb04p.ppt
01bkb04p.ppt
 
Math Assignment Help
Math Assignment HelpMath Assignment Help
Math Assignment Help
 
1606751772-ds-lecture-6.ppt
1606751772-ds-lecture-6.ppt1606751772-ds-lecture-6.ppt
1606751772-ds-lecture-6.ppt
 
Discreate structure presentation introduction
Discreate structure presentation introductionDiscreate structure presentation introduction
Discreate structure presentation introduction
 
Per3 logika
Per3 logikaPer3 logika
Per3 logika
 
FOLBUKCFAIZ.pptx
FOLBUKCFAIZ.pptxFOLBUKCFAIZ.pptx
FOLBUKCFAIZ.pptx
 
Cs229 notes8
Cs229 notes8Cs229 notes8
Cs229 notes8
 
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
 
lacl (1)
lacl (1)lacl (1)
lacl (1)
 
Semantics
SemanticsSemantics
Semantics
 

Plus de PalGov

Jarrar.lecture notes.aai.2011s.ch2.intelligentagents
Jarrar.lecture notes.aai.2011s.ch2.intelligentagentsJarrar.lecture notes.aai.2011s.ch2.intelligentagents
Jarrar.lecture notes.aai.2011s.ch2.intelligentagents
PalGov
 
Jarrar.lecture notes.aai.2011s.ontology part5_egovernmentcasestudy
Jarrar.lecture notes.aai.2011s.ontology part5_egovernmentcasestudyJarrar.lecture notes.aai.2011s.ontology part5_egovernmentcasestudy
Jarrar.lecture notes.aai.2011s.ontology part5_egovernmentcasestudy
PalGov
 
Jarrar.lecture notes.aai.2011s.ontology part4_methodologies
Jarrar.lecture notes.aai.2011s.ontology part4_methodologiesJarrar.lecture notes.aai.2011s.ontology part4_methodologies
Jarrar.lecture notes.aai.2011s.ontology part4_methodologies
PalGov
 
Jarrar.lecture notes.aai.2011s.ontology part3_double-articulation
Jarrar.lecture notes.aai.2011s.ontology part3_double-articulationJarrar.lecture notes.aai.2011s.ontology part3_double-articulation
Jarrar.lecture notes.aai.2011s.ontology part3_double-articulation
PalGov
 
Jarrar.lecture notes.aai.2011s.ontology part2_whatisontology
Jarrar.lecture notes.aai.2011s.ontology part2_whatisontologyJarrar.lecture notes.aai.2011s.ontology part2_whatisontology
Jarrar.lecture notes.aai.2011s.ontology part2_whatisontology
PalGov
 
Jarrar.lecture notes.aai.2011s.ontology part1_introduction
Jarrar.lecture notes.aai.2011s.ontology part1_introductionJarrar.lecture notes.aai.2011s.ontology part1_introduction
Jarrar.lecture notes.aai.2011s.ontology part1_introduction
PalGov
 
Jarrar.lecture notes.aai.2011s.descriptionlogic
Jarrar.lecture notes.aai.2011s.descriptionlogicJarrar.lecture notes.aai.2011s.descriptionlogic
Jarrar.lecture notes.aai.2011s.descriptionlogic
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
 
Jarrar.lecture notes.aai.2011s.ch7.p logic
Jarrar.lecture notes.aai.2011s.ch7.p logicJarrar.lecture notes.aai.2011s.ch7.p logic
Jarrar.lecture notes.aai.2011s.ch7.p logic
PalGov
 
Jarrar.lecture notes.aai.2011s.ch6.games
Jarrar.lecture notes.aai.2011s.ch6.gamesJarrar.lecture notes.aai.2011s.ch6.games
Jarrar.lecture notes.aai.2011s.ch6.games
PalGov
 
Jarrar.lecture notes.aai.2011s.ch4.informedsearch
Jarrar.lecture notes.aai.2011s.ch4.informedsearchJarrar.lecture notes.aai.2011s.ch4.informedsearch
Jarrar.lecture notes.aai.2011s.ch4.informedsearch
PalGov
 
Jarrar.lecture notes.aai.2011s.ch3.uniformedsearch
Jarrar.lecture notes.aai.2011s.ch3.uniformedsearchJarrar.lecture notes.aai.2011s.ch3.uniformedsearch
Jarrar.lecture notes.aai.2011s.ch3.uniformedsearch
PalGov
 
Jarrar.lecture notes.aai.2011s.ch2.intelligentagents
Jarrar.lecture notes.aai.2011s.ch2.intelligentagentsJarrar.lecture notes.aai.2011s.ch2.intelligentagents
Jarrar.lecture notes.aai.2011s.ch2.intelligentagents
PalGov
 

Plus de PalGov (13)

Jarrar.lecture notes.aai.2011s.ch2.intelligentagents
Jarrar.lecture notes.aai.2011s.ch2.intelligentagentsJarrar.lecture notes.aai.2011s.ch2.intelligentagents
Jarrar.lecture notes.aai.2011s.ch2.intelligentagents
 
Jarrar.lecture notes.aai.2011s.ontology part5_egovernmentcasestudy
Jarrar.lecture notes.aai.2011s.ontology part5_egovernmentcasestudyJarrar.lecture notes.aai.2011s.ontology part5_egovernmentcasestudy
Jarrar.lecture notes.aai.2011s.ontology part5_egovernmentcasestudy
 
Jarrar.lecture notes.aai.2011s.ontology part4_methodologies
Jarrar.lecture notes.aai.2011s.ontology part4_methodologiesJarrar.lecture notes.aai.2011s.ontology part4_methodologies
Jarrar.lecture notes.aai.2011s.ontology part4_methodologies
 
Jarrar.lecture notes.aai.2011s.ontology part3_double-articulation
Jarrar.lecture notes.aai.2011s.ontology part3_double-articulationJarrar.lecture notes.aai.2011s.ontology part3_double-articulation
Jarrar.lecture notes.aai.2011s.ontology part3_double-articulation
 
Jarrar.lecture notes.aai.2011s.ontology part2_whatisontology
Jarrar.lecture notes.aai.2011s.ontology part2_whatisontologyJarrar.lecture notes.aai.2011s.ontology part2_whatisontology
Jarrar.lecture notes.aai.2011s.ontology part2_whatisontology
 
Jarrar.lecture notes.aai.2011s.ontology part1_introduction
Jarrar.lecture notes.aai.2011s.ontology part1_introductionJarrar.lecture notes.aai.2011s.ontology part1_introduction
Jarrar.lecture notes.aai.2011s.ontology part1_introduction
 
Jarrar.lecture notes.aai.2011s.descriptionlogic
Jarrar.lecture notes.aai.2011s.descriptionlogicJarrar.lecture notes.aai.2011s.descriptionlogic
Jarrar.lecture notes.aai.2011s.descriptionlogic
 
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.ch7.p logic
Jarrar.lecture notes.aai.2011s.ch7.p logicJarrar.lecture notes.aai.2011s.ch7.p logic
Jarrar.lecture notes.aai.2011s.ch7.p logic
 
Jarrar.lecture notes.aai.2011s.ch6.games
Jarrar.lecture notes.aai.2011s.ch6.gamesJarrar.lecture notes.aai.2011s.ch6.games
Jarrar.lecture notes.aai.2011s.ch6.games
 
Jarrar.lecture notes.aai.2011s.ch4.informedsearch
Jarrar.lecture notes.aai.2011s.ch4.informedsearchJarrar.lecture notes.aai.2011s.ch4.informedsearch
Jarrar.lecture notes.aai.2011s.ch4.informedsearch
 
Jarrar.lecture notes.aai.2011s.ch3.uniformedsearch
Jarrar.lecture notes.aai.2011s.ch3.uniformedsearchJarrar.lecture notes.aai.2011s.ch3.uniformedsearch
Jarrar.lecture notes.aai.2011s.ch3.uniformedsearch
 
Jarrar.lecture notes.aai.2011s.ch2.intelligentagents
Jarrar.lecture notes.aai.2011s.ch2.intelligentagentsJarrar.lecture notes.aai.2011s.ch2.intelligentagents
Jarrar.lecture notes.aai.2011s.ch2.intelligentagents
 

Dernier

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
MateoGardella
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
Chris Hunter
 

Dernier (20)

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 

Jarrar.lecture notes.aai.2011s.ch9.fol.inference

  • 1. Dr. Mustafa Jarrar [email_address] www.jarrar.info University of Birzeit Chapter 9 Inference in first-order logic Advanced Artificial Intelligence (SCOM7341) Lecture Notes University of Birzeit 2 nd Semester, 2011
  • 2. Motivation: Knowledge Bases vs. Databases The DB is a set of tuples, and queries are perfromed truth rvaluation. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Wffs : Proof xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Provability Query Answer Knowledge Base System Query Proof Theoretic View Constraints DBMS Transactions i.e insert, update, delete... Query Query Answer Model Theoretic View The KB is a set of formulae and the query evaluation is to prove that the result is provable.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13. Unification Example Unify (p,q) = θ where Subst( θ ,p) = Subset( θ ,q) Suppose we have a query Knows(John,x), we need to unify Knows(John,x) with all sentences in KD. Knows(John,x) Knows(John,Jane) Knows(John,x) Knows(y,Bill) Knows(John,x) Knows(y,Mother(y)) Knows(John,x) Knows(x,Elizabeth) Q P θ
  • 14. Unification Example {x/Jane} Unify (p,q) = θ where Subst( θ ,p) = Subset( θ ,q) Suppose we have a query Knows(John,x), we need to unify Knows(John,x) with all sentences in KD. Knows(John,x) Knows(John,Jane) Knows(John,x) Knows(y,Bill) Knows(John,x) Knows(y,Mother(y)) Knows(John,x) Knows(x,Elizabeth) Q P θ
  • 15. Unification Example {x/Jane} {x/Bill,y/John} Unify (p,q) = θ where Subst( θ ,p) = Subset( θ ,q) Suppose we have a query Knows(John,x), we need to unify Knows(John,x) with all sentences in KD. Knows(John,x) Knows(John,Jane) Knows(John,x) Knows(y,Bill) Knows(John,x) Knows(y,Mother(y)) Knows(John,x) Knows(x,Elizabeth) Q P θ
  • 16. Unification Example {x/Jane} {x/Bill,y/John} {y/John,x/Mother(John)} Unify (p,q) = θ where Subst( θ ,p) = Subset( θ ,q) Suppose we have a query Knows(John,x), we need to unify Knows(John,x) with all sentences in KD. Knows(John,x) Knows(John,Jane) Knows(John,x) Knows(y,Bill) Knows(John,x) Knows(y,Mother(y)) Knows(John,x) Knows(x,Elizabeth) Q P θ
  • 17.
  • 18.
  • 19. Unification Example {x/Jane} {x/Bill,y/John} {y/John,x/Mother(John)} {x/Elizabeth, z 17 /John} Unify (p,q) = θ where Subst( θ ,p) = Subset( θ ,q) Suppose we have a query Knows(John,x), we need to unify Knows(John,x) with all sentences in KD. Knows(John,x) Knows(John,Jane) Knows(John,x) Knows(y,Bill) Knows(John,x) Knows(y,Mother(y)) Knows(John,x) Knows(z 17 ,Elizabeth) Q P θ
  • 20. Unification Example {x/Jane} {x/Bill,y/John} {y/John,x/Mother(John)} {x/Elizabeth, z 17 /John} In the last case, we have two answers: θ = {y/John,x/z}, or θ = {y/John,x/John, z/John} ?? This first unification is more general, as it places fewer restrictions on the values of the variables. Unify (p,q) = θ where Subst( θ ,p) = Subset( θ ,q) Suppose we have a query Knows(John,x), we need to unify Knows(John,x) with all sentences in KD. Knows(John,x) Knows(John,Jane) Knows(John,x) Knows(y,Bill) Knows(John,x) Knows(y,Mother(y)) Knows(John,x) Knows(z 17 ,Elizabeth) Knows(John,x) Knows(y,z) Q P θ
  • 21. Unification Example {x/Jane} {x/Bill,y/John} {y/John,x/Mother(John)} {x/Elizabeth, z 17 /John} For every unifiable pair of expressions, there is a Most General Unifier MGU In the last case, we have two answers: θ = {y/John,x/z}, or θ = {y/John,x/John, z/John} {y/John,x/z} Unify (p,q) = θ where Subst( θ ,p) = Subset( θ ,q) Suppose we have a query Knows(John,x), we need to unify Knows(John,x) with all sentences in KD. Knows(John,x) Knows(John,Jane) Knows(John,x) Knows(y,Bill) Knows(John,x) Knows(y,Mother(y)) Knows(John,x) Knows(z 17 ,Elizabeth) Knows(John,x) Knows(y,z) Q P θ
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
  • 50.
  • 51.
  • 52.
  • 53.
  • 54.
  • 55.
  • 56.
  • 57.
  • 58. Resolution in FOL (Another Example) 1  American(x)   Weapon(y)   Sells(x,y,z)   Hostile(z)  Criminal(x) 2  Missile(x)   Owns(Nono,x)  Sells(West,x,Nano) 3  Enemy(x,America)  Hostile(x) 4  Missile(x)  Weapon(x) 5 Owns(Nono,M 1 ) 6 Missile(M 1 ) 7 American(West) 8 Enemy(Nano,America) 9  Criminal (West)
  • 59. Resolution in FOL (Another Example) 1  American(x)   Weapon(y)   Sells(x,y,z)   Hostile(z)  Criminal(x) 2  Missile(x)   Owns(Nono,x)  Sells(West,x,Nano) 3  Enemy(x,America)  Hostile(x) 4  Missile(x)  Weapon(x) 5 Owns(Nono,M 1 ) 6 Missile(M 1 ) 7 American(West) 8 Enemy(Nano,America) 9  Criminal (West) 10  American(West)   Weapon(y)   Sells(West,y,z)   Hostile(z) 1,9 {x/West} 11  Weapon(y)   Sells(West,y,z)   Hostile(z) 7,10 {x/West} 12  Missile(y)   Sells(West,y,z)   Hostile(z) 4,11 {x/y} 13  Sells(West,M 1 ,z)   Hostile(z) 6,12 {y/M 1 } 14  Missile(M 1 )   Owns(Nono, M 1 )   Hostile(Nano) 2,13 {x/M 1 , z/Nano} 15  Owns(Nono, M 1 )   Hostile(Nano) 6,14 {} 16  Hostile(Nano) 5,15 {} 17  Enemy(Nano,America) 3,16 {x/Nano} 18 . 8,17 {}
  • 60. Resolution in FOL (Another Example) 9 10 11 12 13 14 15 16 17 18 1 7 6 2 6 4 5 3 8 Another representation (as Tree)
  • 61.