SlideShare una empresa de Scribd logo
1 de 46
Jarrar © 2013 1
Dr. Mustafa Jarrar
Sina Institute, University of Birzeit
mjarrar@birzeit.edu
www.jarrar.info
Lecture Notes on Inference Methods,
University of Birzeit, Palestine
Spring Semester, 2014
Artificial Intelligence
Section 7.5 (& extra)
Inference Methods
In Propositional Logic
Jarrar © 2013 2
Watch this lecture and download the slides from
http://jarrar-courses.blogspot.com/2011/11/artificial-intelligence-fall-2011.html
Jarrar © 2013 3
This lecture
• Enumeration Method
• Inference rules
• Resolution
• Forward and backward Chaining
Lecture Keywords:
،‫الشكلي‬ ‫المنطق‬ ،‫المنطق‬‫االستنتاج‬‫االستنباط‬ ،،‫االستنتاج‬ ‫قواعد‬ ،
‫ا‬ ‫،صحة‬ ‫االستنتاج‬ ‫طرق‬‫ل‬‫جمل‬،‫المنطقية‬‫التناقض‬ ،‫الحدود‬
Logic, Propositional Logic, Inference Methods, Deduction, Reasoning, Enumeration Method,​ ​Inference
rules,​ ​Resolution, refutation theorem-proving technique, Forward Chaining,​ ​Backward Chaining​, Conjunctive
Normal Form,Horn clauses, entailment, Logical Implication, Soundness, Completeness ،satisfiable,
Unsatisfiable
Information and material largely based on [1]
Jarrar © 2013 4
Inference Methods
• Enumeration Method
• Inference rules
• Resolution
• Forward and backward Chaining
Jarrar © 2013 5
Truth Tables for Inference
Propositional Inference: Enumeration Method
Jarrar © 2013 6
Propositional Inference: Enumeration Method
• Let  = A  B and KB = (A  C)  (B  C)
• Is it the case that KB ╞ 
• Check all possible models,
  must be true wherever KB is true
Jarrar © 2013 7
Propositional Inference: Enumeration Method
• Depth-first enumeration of all models is sound and complete.
• For n symbols, time complexity is O(2n), space complexity is O(n).
Jarrar © 2013 8
Inference Methods
• Enumeration Method
• Inference rules
• Resolution
• Forward and backward Chaining
Jarrar © 2013 9
Inference Rule: Modus Ponens
The rule is written as:   , 

Means, whenever any sentences of the form    and  are
given, then the sentence  can be inferred.
If , then .
.
Therefore, 
For example, if (WumpusAhead  WumpusAlive)  Shoot
and (WumpusAhead  WumpusAlive) are given, then Shoot can be inferred.
Jarrar © 2013 10
More Inference Rules: Logical Equivalences
• Two sentences are logically equivalent iff true in same
models: α ≡ ß iff α╞ β and β╞ α
 All rules are sound if used with search algorithms, but they might be
inadequate to reach a goal (i.e., completeness is not guaranteed).
Jarrar © 2013 11
Inference Methods
• Enumeration Method
• Inference rules
• Resolution
• Forward and backward Chaining
Proof by contradiction, i.e., show KB  α unsatisfiable.
Jarrar © 2013 12
Resolution
Resolution is a rule of inference leading to a refutation (‫)دحض‬ theorem-
proving technique for sentences in propositional logic.
That is, applying the resolution rule in a suitable way allows for telling
whether a propositional formula is satisfiable;
Resolution was introduced by John Alan Robinson in 1965.
Suppose we have a knowledge base in this form:
By resolving (A  B) and (A B), we obtain (AA), which is reduced to A
Notice that this rule applies only when a knowledge base in form of
conjunctions of disjunctions of literals.
A  B, A B
A
Jarrar © 2013 13
Resolution
We first write/convert the formulas into Conjunctive Normal Form (CNF):
conjunction of disjunctions of literals clauses
E.g., (A  B)  (B  C  D)
A literal is a propositional variable or the negation of a propositional variable.
• Resolution inference rule (for CNF):
where li and mj are complementary literals (one is the negation of the other).
E.g.,
 Resolution is sound and complete for propositional logic.
li  …  lk, m1  …  mn
li  …  li-1 li+1  …  lk  m1  …  mj-1  mj+1 ...  mn
P1,3  P2,2, P2,2
P1,3
a  b, a  c
b  c
Jarrar © 2013 14
Conversion to CNF
Any sentence in propositional logic can be transformed into an equivalent
sentence in Conjunctive Normal Form.
Example: B1,1  (P1,2  P2,1)
1. Eliminate , replacing α  β with (α  β)(β  α).
(B1,1  (P1,2  P2,1))  ((P1,2  P2,1)  B1,1)
2. Eliminate , replacing α  β with α  β.
(B1,1  P1,2  P2,1)  ((P1,2  P2,1)  B1,1)
3. Move  inwards using de Morgan's rules and double-negation:
(B1,1  P1,2  P2,1)  ((P1,2  P2,1)  B1,1)
4. Apply distributivity law ( over ) and flatten:
(B1,1  P1,2  P2,1)  (P1,2  B1,1)  (P2,1  B1,1)
Jarrar © 2013 15
Resolution Algorithm
Any sentence in propositional logic can be transformed into an equivalent
sentence in conjunctive normal form.
Steps:
• All sentences in KB and the negation of the sentence to be proved (the conjecture) are
conjunctively connected.
• The resulting sentence is transformed into a conjunctive normal form with the conjuncts
viewed as elements in a set, S, of clauses.
• The resolution rule is applied to all possible pairs of clauses that contain
complementary literals. After each application of the resolution rule, the resulting
sentence is simplified by removing repeated literals. If the sentence contains
complementary literals, it is discarded (as a tautology). If not, and if it is not yet present
in the clause set S, it is added to S, and is considered for further resolution inferences.
• If after applying a resolution rule the empty clause is derived, the complete formula is
unsatisfiable (or contradictory), and hence it can be concluded that the initial conjecture
follows from the axioms.
• If, on the other hand, the empty clause cannot be derived, and the resolution rule
cannot be applied to derive any more new clauses, the conjecture is not a theorem of
the original knowledge base.
[2]
Jarrar © 2013 16
• The resolution algorithm tries to prove:
KB ╞  equivalent to
KB   unsatisfiable
• Generate all new sentences from KB and the query.
• One of two things can happen:
1. We find a case like P  P which is unsatisfiable, which means
we can entail the query.
2. We find no contradiction: there is a model that satisfies the
sentence KB   (non-trivial) and hence we cannot entail the
query.
Resolution Algorithm (in short)
Jarrar © 2013 17
Resolution Algorithm
• Proof by contradiction, i.e., show KB  α unsatisfiable.
[1]
Jarrar © 2013 18
Example
KB = (PQ)  Q
(P  P) R
(R  S)  (S Q)
 = R
Does KB entails  (KB╞ )
P  Q1.
P  R2.
 P  R3.
R  S4.
R  Q5.
S  Q6.
R neg7.
S 4,78.
Q 6,89.
P 1,910.
R 3,1011.
. 7,1112.
Contradiction!
Jarrar © 2013 19
Exercise 1
KB = (B1,1  (P1,2 P2,1)) Breeze in [1,1] iff there is a Pit in [1,2] or [2.1].
 B1,1 There is on Breeze in [1,1]
 = P1,2 No Pit in [1,2]?
Does KB entails  (KB╞ )
KB  
False in
all worldsTrue!
Jarrar © 2013 20
Exercise 2
KB = (B1,1  (P1,2 P2,1)) Breeze in [1,1] iff there is a it is [1,2] or [2.1].
 B1,1 There is on Breeze in [1,1]
 = P1,2 Pit in [1,2]?
Does KB entails  (KB╞ )
Jarrar © 2013 21
Completeness of the Resolution Method
• Self reading from the book
• You should be able to prove the completeness of the resolution
method (at least informally).
Jarrar © 2013 22
Inference Methods
• Enumeration Method
• Inference rules
• Resolution
• Forward and backward Chaining
Jarrar © 2013 23
Horn Clauses
 Resolution can be exponential in space and time.
 If we can reduce all clauses to “Horn clauses” resolution is linear in
space and time.
 A Horn clause has at most 1 positive literal.
e.g. A  B  C
P1  P2  P3 ...  Pn  Q;
~a V b V c V ~d Not a Horn Clause
 Every Horn Clause can be rewritten as an implication with a conjunction
of positive literals in the premises and a single positive literal as a
conclusion. e.g. B  C  A
 Can be used with forward chaining or backward chaining algorithms.
 These algorithms are very natural and run in linear time!
Jarrar © 2013 24
It’s Holiday It’s snowing
I am at home
Heating On
I feel sleepy
I am happy
AND gate
OR gate
Query
 “I am happy”?
Forward chaining example
Idea: fire any rule whose premises are satisfied in the KB,
– add its conclusion to the KB, until query is found
I feel sleepy  I am happy
I am at home  heating On  I feel sleepy
I am at home  It’s snowing  Heating On
Today is Holiday I feel sleepy  I am at home
Today is Holiday  It’s snowing  I am at home
Today is Holiday
It’s snowing
Jarrar © 2013 25
Forward chaining example
It’s Holiday It’s snowing
I am at home
Heating On
I feel sleepy
I am happy
2
2
2 2
1
Idea: fire any rule whose premises are satisfied in the KB,
– add its conclusion to the KB, until query is found
 “I am happy”?
I feel sleepy  I am happy
I am at home  heating On  I feel sleepy
I am at home  It’s snowing  Heating On
Today is Holiday I feel sleepy  I am at home
Today is Holiday  It’s snowing  I am at home
Today is Holiday
It’s snowing
Jarrar © 2013 26
Forward chaining example
It’s Holiday It’s snowing
I am at home
Heating On
I feel sleepy
I am happy
2
2
1 1
1
Idea: fire any rule whose premises are satisfied in the KB,
– add its conclusion to the KB, until query is found
 “I am happy”?
I feel sleepy  I am happy
I am at home  heating On  I feel sleepy
I am at home  It’s snowing  Heating On
Today is Holiday I feel sleepy  I am at home
Today is Holiday  It’s snowing  I am at home
Today is Holiday
It’s snowing
Jarrar © 2013 27
Forward chaining example
It’s Holiday It’s snowing
I am at home
Heating On
I feel sleepy
I am happy
2
1
1 0
1
Idea: fire any rule whose premises are satisfied in the KB,
– add its conclusion to the KB, until query is found
 “I am happy”?
I feel sleepy  I am happy
I am at home  heating On  I feel sleepy
I am at home  It’s snowing  Heating On
Today is Holiday I feel sleepy  I am at home
Today is Holiday  It’s snowing  I am at home
Today is Holiday
It’s snowing
Jarrar © 2013 28
Forward chaining example
It’s Holiday It’s snowing
I am at home
Heating On
I feel sleepy
I am happy
1
0
1 0
1
Idea: fire any rule whose premises are satisfied in the KB,
– add its conclusion to the KB, until query is found
 “I am happy”?
I feel sleepy  I am happy
I am at home  heating On  I feel sleepy
I am at home  It’s snowing  Heating On
Today is Holiday I feel sleepy  I am at home
Today is Holiday  It’s snowing  I am at home
Today is Holiday
It’s snowing
Jarrar © 2013 29
Forward chaining example
It’s Holiday It’s snowing
I am at home
Heating On
I feel sleepy
I am happy
0
0
1 0
1
Idea: fire any rule whose premises are satisfied in the KB,
– add its conclusion to the KB, until query is found
 “I am happy”?
I feel sleepy  I am happy
I am at home  heating On  I feel sleepy
I am at home  It’s snowing  Heating On
Today is Holiday I feel sleepy  I am at home
Today is Holiday  It’s snowing  I am at home
Today is Holiday
It’s snowing
Jarrar © 2013 30
I feel sleepy  I am happy
I am at home  heating On  I feel sleepy
I am at home  It’s snowing  Heating On
Today is Holiday I feel sleepy  I am at home
Today is Holiday  It’s snowing  I am at home
Today is Holiday
It’s snowing
Forward chaining example
It’s Holiday It’s snowing
I am at home
Heating On
I feel sleepy
I am happy
0
0
0 0
0
Idea: fire any rule whose premises are satisfied in the KB,
– add its conclusion to the KB, until query is found
 “I am happy”?
Jarrar © 2013 31
Forward chaining example
It’s Holiday It’s snowing
I am at home
Heating On
I feel sleepy
I am happy
0
0
0 0
0 I feel sleepy  I am happy
I am at home  heating On  I feel sleepy
I am at home  It’s snowing  Heating On
Today is Holiday I feel sleepy  I am at home
Today is Holiday  It’s snowing  I am at home
Today is Holiday
It’s snowing
Idea: fire any rule whose premises are satisfied in the KB,
– add its conclusion to the KB, until query is found
 Forward chaining is sound
and complete for Horn KB
 “I am happy”?
Jarrar © 2013 32
Think about this
Suppose that the goal is to conclude the color of a pet named Fritz,
given that (he croaks and eats flies), and that the Knowledge base
contains the following :
1. If (X croaks and eats flies) - Then (X is a frog)
2. If (X chirps and sings) - Then (X is a canary)
3. If (X is a frog) - Then (X is green)
4. If (X is a canary) - Then (X is yellow)
This Knowledge base would be searched and the first rule would be selected, because its antecedent (If
Fritz croaks and eats flies) matches our given data. Now the consequents (Then X is a frog) is added to
the data. The rule base is again searched and this time the third rule is selected, because its antecedent (If
Fritz is a frog) matches our data that was just confirmed. Now the new consequent (Then Fritz is green) is
added to our data. Nothing more can be inferred from this information, but we have now accomplished our
goal of determining the color of Fritz.
Croaks ‫ينعق‬
Frog ‫ضفدع‬
Chirps ‫يغرد‬
Canary ‫كناري‬
Jarrar © 2013 33
Backward Chaining
p1  p2  …  pn  q
Idea: work backwards from the query q
• check if q is known already, or
• prove by BC all premises of some rule concluding q
• Hence BC maintains a stack of sub-goals that need to be
proved to get to q.
Avoid loops: check if new sub-goal is already on the goal stack
Avoid repeated work: check if new sub-goal
1. has already been proved true, or
2. has already failed
Backward chaining is the basis for “logic programming,”
e.g., Prolog
Jarrar © 2013 34
Backward chaining example
Jarrar © 2013 35
Backward chaining example
Jarrar © 2013 36
Backward chaining example
Jarrar © 2013 37
Backward chaining example
we need P to prove
L and L to prove P.
Jarrar © 2013 38
Backward chaining example
Jarrar © 2013 39
Backward chaining example
Jarrar © 2013 40
Backward chaining example
Jarrar © 2013 41
Backward chaining example
Jarrar © 2013 42
Backward chaining example
Jarrar © 2013 43
Backward chaining example
Jarrar © 2013 44
Forward vs. Backward Chaining
• FC is data-driven, automatic, senseless processing,
– e.g., object recognition, routine decisions
• May do lots of work that is irrelevant to the goal
• BC is goal-driven, (bottom-up reasoning) appropriate for
problem-solving,
– e.g., Where are my keys?
• Complexity of BC can be much less than linear in size of KB
Jarrar © 2013 45
Summary
• Logical agents apply inference to a knowledge base to derive new
information and make decisions.
• Basic concepts of logic:
– syntax: formal structure of sentences
– semantics: truth of sentences wrt models
– entailment: necessary truth of one sentence given another
– inference: deriving sentences from other sentences
– soundness: derivations produce only entailed sentences
– completeness: derivations can produce all entailed sentences
• Resolution is sound and complete for propositional logic
• Forward, backward chaining are linear-time, complete for Horn clauses
• Propositional logic lacks expressive power
Jarrar © 2013 46
References
[1] S. Russell and P. Norvig: Artificial Intelligence: A Modern Approach Prentice Hall, 2003, Second
Edition
[2] Leitsch, Alexander (1997), The resolution calculus, EATCS Monographs in Theoretical Computer
Science, Springer, p. 11, Before applying the inference method itself, we transform the formulas to
quantifier-free conjunctive normal form.

Más contenido relacionado

La actualidad más candente

Bayesian networks in AI
Bayesian networks in AIBayesian networks in AI
Bayesian networks in AIByoung-Hee Kim
 
knowledge representation using rules
knowledge representation using rulesknowledge representation using rules
knowledge representation using rulesHarini Balamurugan
 
Knowledge Representation, Inference and Reasoning
Knowledge Representation, Inference and ReasoningKnowledge Representation, Inference and Reasoning
Knowledge Representation, Inference and ReasoningSagacious IT Solution
 
Learning by analogy
Learning by analogyLearning by analogy
Learning by analogyNitesh Singh
 
Inference in First-Order Logic
Inference in First-Order Logic Inference in First-Order Logic
Inference in First-Order Logic Junya Tanaka
 
Lecture 16 memory bounded search
Lecture 16 memory bounded searchLecture 16 memory bounded search
Lecture 16 memory bounded searchHema Kashyap
 
Lec 3 knowledge acquisition representation and inference
Lec 3  knowledge acquisition representation and inferenceLec 3  knowledge acquisition representation and inference
Lec 3 knowledge acquisition representation and inferenceEyob Sisay
 
Deep Learning Frameworks slides
Deep Learning Frameworks slides Deep Learning Frameworks slides
Deep Learning Frameworks slides Sheamus McGovern
 
Introduction to Machine Learning with Find-S
Introduction to Machine Learning with Find-SIntroduction to Machine Learning with Find-S
Introduction to Machine Learning with Find-SKnoldus Inc.
 
Local search algorithms
Local search algorithmsLocal search algorithms
Local search algorithmsbambangsueb
 
Data preprocessing using Machine Learning
Data  preprocessing using Machine Learning Data  preprocessing using Machine Learning
Data preprocessing using Machine Learning Gopal Sakarkar
 
3. planning in situational calculas
3. planning in situational calculas3. planning in situational calculas
3. planning in situational calculasAnkush Kumar
 
VTU 6th Sem Elective CSE - Module 5 cloud computing
VTU 6th Sem Elective CSE - Module 5 cloud computingVTU 6th Sem Elective CSE - Module 5 cloud computing
VTU 6th Sem Elective CSE - Module 5 cloud computingSachin Gowda
 
Genetic Algorithms - Artificial Intelligence
Genetic Algorithms - Artificial IntelligenceGenetic Algorithms - Artificial Intelligence
Genetic Algorithms - Artificial IntelligenceSahil Kumar
 
Resolution method in AI.pptx
Resolution method in AI.pptxResolution method in AI.pptx
Resolution method in AI.pptxAbdullah251975
 
L2 Intrusion Detection System (IDS)
L2  Intrusion Detection System (IDS)L2  Intrusion Detection System (IDS)
L2 Intrusion Detection System (IDS)Rushdi Shams
 

La actualidad más candente (20)

Backtracking
BacktrackingBacktracking
Backtracking
 
Bayesian networks in AI
Bayesian networks in AIBayesian networks in AI
Bayesian networks in AI
 
knowledge representation using rules
knowledge representation using rulesknowledge representation using rules
knowledge representation using rules
 
Knowledge Representation, Inference and Reasoning
Knowledge Representation, Inference and ReasoningKnowledge Representation, Inference and Reasoning
Knowledge Representation, Inference and Reasoning
 
Learning by analogy
Learning by analogyLearning by analogy
Learning by analogy
 
5. cs8451 daa anna univ question bank unit 5
5. cs8451 daa anna univ question bank unit 55. cs8451 daa anna univ question bank unit 5
5. cs8451 daa anna univ question bank unit 5
 
Inference in First-Order Logic
Inference in First-Order Logic Inference in First-Order Logic
Inference in First-Order Logic
 
Lecture 16 memory bounded search
Lecture 16 memory bounded searchLecture 16 memory bounded search
Lecture 16 memory bounded search
 
Machine learning clustering
Machine learning clusteringMachine learning clustering
Machine learning clustering
 
Lec 3 knowledge acquisition representation and inference
Lec 3  knowledge acquisition representation and inferenceLec 3  knowledge acquisition representation and inference
Lec 3 knowledge acquisition representation and inference
 
Deep Learning Frameworks slides
Deep Learning Frameworks slides Deep Learning Frameworks slides
Deep Learning Frameworks slides
 
Introduction to Machine Learning with Find-S
Introduction to Machine Learning with Find-SIntroduction to Machine Learning with Find-S
Introduction to Machine Learning with Find-S
 
Local search algorithms
Local search algorithmsLocal search algorithms
Local search algorithms
 
Data preprocessing using Machine Learning
Data  preprocessing using Machine Learning Data  preprocessing using Machine Learning
Data preprocessing using Machine Learning
 
3. planning in situational calculas
3. planning in situational calculas3. planning in situational calculas
3. planning in situational calculas
 
Process Management-Process Migration
Process Management-Process MigrationProcess Management-Process Migration
Process Management-Process Migration
 
VTU 6th Sem Elective CSE - Module 5 cloud computing
VTU 6th Sem Elective CSE - Module 5 cloud computingVTU 6th Sem Elective CSE - Module 5 cloud computing
VTU 6th Sem Elective CSE - Module 5 cloud computing
 
Genetic Algorithms - Artificial Intelligence
Genetic Algorithms - Artificial IntelligenceGenetic Algorithms - Artificial Intelligence
Genetic Algorithms - Artificial Intelligence
 
Resolution method in AI.pptx
Resolution method in AI.pptxResolution method in AI.pptx
Resolution method in AI.pptx
 
L2 Intrusion Detection System (IDS)
L2  Intrusion Detection System (IDS)L2  Intrusion Detection System (IDS)
L2 Intrusion Detection System (IDS)
 

Destacado

Jarrar: First Order Logic- Inference Methods
Jarrar: First Order Logic- Inference MethodsJarrar: First Order Logic- Inference Methods
Jarrar: First Order Logic- Inference MethodsMustafa Jarrar
 
Jarrar: First Order Logic
Jarrar: First Order LogicJarrar: First Order Logic
Jarrar: First Order LogicMustafa Jarrar
 
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.inferencePalGov
 
Jarrar: Introduction to logic and Logic Agents
Jarrar: Introduction to logic and Logic Agents Jarrar: Introduction to logic and Logic Agents
Jarrar: Introduction to logic and Logic Agents Mustafa Jarrar
 
Propositional logic & inference
Propositional logic & inferencePropositional logic & inference
Propositional logic & inferenceSlideshare
 
Intro logic ch 4 categorical propositions
Intro logic ch 4 categorical propositionsIntro logic ch 4 categorical propositions
Intro logic ch 4 categorical propositionstemkin abdlkader
 
16 1 predicate resolution
16 1 predicate resolution16 1 predicate resolution
16 1 predicate resolutionTianlu Wang
 
Inference in first order logic12
Inference in first order logic12Inference in first order logic12
Inference in first order logic12yosser atassi
 
Categorical propositions
Categorical propositions Categorical propositions
Categorical propositions anandhjose
 
4.3 Venn Diagrams And The Modern Square Of Opposition
4.3   Venn Diagrams And The Modern Square Of Opposition4.3   Venn Diagrams And The Modern Square Of Opposition
4.3 Venn Diagrams And The Modern Square Of OppositionNicholas Lykins
 
Introduction to Artificial Intelligence
Introduction to Artificial Intelligence Introduction to Artificial Intelligence
Introduction to Artificial Intelligence Mustafa Jarrar
 
Jarrar: Description Logic
Jarrar: Description LogicJarrar: Description Logic
Jarrar: Description LogicMustafa Jarrar
 
Adnan: Introduction to Natural Language Processing
Adnan: Introduction to Natural Language Processing Adnan: Introduction to Natural Language Processing
Adnan: Introduction to Natural Language Processing Mustafa Jarrar
 
Jarrar: Introduction to Information Retrieval
Jarrar: Introduction to Information RetrievalJarrar: Introduction to Information Retrieval
Jarrar: Introduction to Information RetrievalMustafa Jarrar
 
Categorical Propositions- Logic
Categorical Propositions- LogicCategorical Propositions- Logic
Categorical Propositions- LogicKent Sunglao
 

Destacado (20)

Jarrar: First Order Logic- Inference Methods
Jarrar: First Order Logic- Inference MethodsJarrar: First Order Logic- Inference Methods
Jarrar: First Order Logic- Inference Methods
 
Jarrar: First Order Logic
Jarrar: First Order LogicJarrar: First Order Logic
Jarrar: First Order Logic
 
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: Introduction to logic and Logic Agents
Jarrar: Introduction to logic and Logic Agents Jarrar: Introduction to logic and Logic Agents
Jarrar: Introduction to logic and Logic Agents
 
Propositional logic & inference
Propositional logic & inferencePropositional logic & inference
Propositional logic & inference
 
Chap05
Chap05Chap05
Chap05
 
Intro logic ch 4 categorical propositions
Intro logic ch 4 categorical propositionsIntro logic ch 4 categorical propositions
Intro logic ch 4 categorical propositions
 
16 1 predicate resolution
16 1 predicate resolution16 1 predicate resolution
16 1 predicate resolution
 
3 fol examples v2
3 fol examples v23 fol examples v2
3 fol examples v2
 
Inference in first order logic12
Inference in first order logic12Inference in first order logic12
Inference in first order logic12
 
Categorical propositions
Categorical propositions Categorical propositions
Categorical propositions
 
Jarrar: Games
Jarrar: GamesJarrar: Games
Jarrar: Games
 
Complex Event Processing
Complex Event ProcessingComplex Event Processing
Complex Event Processing
 
4.3 Venn Diagrams And The Modern Square Of Opposition
4.3   Venn Diagrams And The Modern Square Of Opposition4.3   Venn Diagrams And The Modern Square Of Opposition
4.3 Venn Diagrams And The Modern Square Of Opposition
 
Introduction to Artificial Intelligence
Introduction to Artificial Intelligence Introduction to Artificial Intelligence
Introduction to Artificial Intelligence
 
Jarrar: Description Logic
Jarrar: Description LogicJarrar: Description Logic
Jarrar: Description Logic
 
Adnan: Introduction to Natural Language Processing
Adnan: Introduction to Natural Language Processing Adnan: Introduction to Natural Language Processing
Adnan: Introduction to Natural Language Processing
 
Categorical propositions
Categorical propositionsCategorical propositions
Categorical propositions
 
Jarrar: Introduction to Information Retrieval
Jarrar: Introduction to Information RetrievalJarrar: Introduction to Information Retrieval
Jarrar: Introduction to Information Retrieval
 
Categorical Propositions- Logic
Categorical Propositions- LogicCategorical Propositions- Logic
Categorical Propositions- Logic
 

Similar a Jarrar: Propositional Logic Inference Methods

unit1rulesofinference-170113152312.pdf
unit1rulesofinference-170113152312.pdfunit1rulesofinference-170113152312.pdf
unit1rulesofinference-170113152312.pdfBhanuCharan9
 
Unit 1 rules of inference
Unit 1  rules of inferenceUnit 1  rules of inference
Unit 1 rules of inferenceraksharao
 
Inference rulesproofmethods
Inference rulesproofmethodsInference rulesproofmethods
Inference rulesproofmethodsRajendran
 
rulesOfInference.ppt
rulesOfInference.pptrulesOfInference.ppt
rulesOfInference.pptssuserf1f9e8
 
Solution tutorial exercise 3 (part 2)
Solution tutorial exercise 3 (part 2)Solution tutorial exercise 3 (part 2)
Solution tutorial exercise 3 (part 2)Hakim Futra
 
rules of inference in discrete structures
rules of inference in discrete structuresrules of inference in discrete structures
rules of inference in discrete structuresZenLooper
 
Top school in delhi ncr
Top school in delhi ncrTop school in delhi ncr
Top school in delhi ncrEdhole.com
 
17 using rules of inference to build arguments
17   using rules of inference to build arguments17   using rules of inference to build arguments
17 using rules of inference to build argumentsAli Saleem
 
Ppt geo-d5-inductive and deductive reasoning
Ppt geo-d5-inductive and deductive reasoningPpt geo-d5-inductive and deductive reasoning
Ppt geo-d5-inductive and deductive reasoningJay Vaughn Pelonio
 
One Problem, Two Structures, Six Solvers and Ten Years of Personnel Schedulin...
One Problem, Two Structures, Six Solvers and Ten Years of Personnel Schedulin...One Problem, Two Structures, Six Solvers and Ten Years of Personnel Schedulin...
One Problem, Two Structures, Six Solvers and Ten Years of Personnel Schedulin...Pierre Schaus
 

Similar a Jarrar: Propositional Logic Inference Methods (16)

AI Lesson 12
AI Lesson 12AI Lesson 12
AI Lesson 12
 
Logic.ppt
Logic.pptLogic.ppt
Logic.ppt
 
unit1rulesofinference-170113152312.pdf
unit1rulesofinference-170113152312.pdfunit1rulesofinference-170113152312.pdf
unit1rulesofinference-170113152312.pdf
 
Unit 1 rules of inference
Unit 1  rules of inferenceUnit 1  rules of inference
Unit 1 rules of inference
 
AI Lesson 17
AI Lesson 17AI Lesson 17
AI Lesson 17
 
Logic agent
Logic agentLogic agent
Logic agent
 
Inference rulesproofmethods
Inference rulesproofmethodsInference rulesproofmethods
Inference rulesproofmethods
 
rulesOfInference.ppt
rulesOfInference.pptrulesOfInference.ppt
rulesOfInference.ppt
 
Solution tutorial exercise 3 (part 2)
Solution tutorial exercise 3 (part 2)Solution tutorial exercise 3 (part 2)
Solution tutorial exercise 3 (part 2)
 
PropositionalLogic.ppt
PropositionalLogic.pptPropositionalLogic.ppt
PropositionalLogic.ppt
 
rules of inference in discrete structures
rules of inference in discrete structuresrules of inference in discrete structures
rules of inference in discrete structures
 
Top school in delhi ncr
Top school in delhi ncrTop school in delhi ncr
Top school in delhi ncr
 
17 using rules of inference to build arguments
17   using rules of inference to build arguments17   using rules of inference to build arguments
17 using rules of inference to build arguments
 
2020CSC4331_Lecture6_1.pdf
2020CSC4331_Lecture6_1.pdf2020CSC4331_Lecture6_1.pdf
2020CSC4331_Lecture6_1.pdf
 
Ppt geo-d5-inductive and deductive reasoning
Ppt geo-d5-inductive and deductive reasoningPpt geo-d5-inductive and deductive reasoning
Ppt geo-d5-inductive and deductive reasoning
 
One Problem, Two Structures, Six Solvers and Ten Years of Personnel Schedulin...
One Problem, Two Structures, Six Solvers and Ten Years of Personnel Schedulin...One Problem, Two Structures, Six Solvers and Ten Years of Personnel Schedulin...
One Problem, Two Structures, Six Solvers and Ten Years of Personnel Schedulin...
 

Más de Mustafa Jarrar

Clustering Arabic Tweets for Sentiment Analysis
Clustering Arabic Tweets for Sentiment AnalysisClustering Arabic Tweets for Sentiment Analysis
Clustering Arabic Tweets for Sentiment AnalysisMustafa Jarrar
 
Classifying Processes and Basic Formal Ontology
Classifying Processes  and Basic Formal OntologyClassifying Processes  and Basic Formal Ontology
Classifying Processes and Basic Formal OntologyMustafa Jarrar
 
Discrete Mathematics Course Outline
Discrete Mathematics Course OutlineDiscrete Mathematics Course Outline
Discrete Mathematics Course OutlineMustafa Jarrar
 
Business Process Implementation
Business Process ImplementationBusiness Process Implementation
Business Process ImplementationMustafa Jarrar
 
Business Process Design and Re-engineering
Business Process Design and Re-engineeringBusiness Process Design and Re-engineering
Business Process Design and Re-engineeringMustafa Jarrar
 
BPMN 2.0 Analytical Constructs
BPMN 2.0 Analytical ConstructsBPMN 2.0 Analytical Constructs
BPMN 2.0 Analytical ConstructsMustafa Jarrar
 
BPMN 2.0 Descriptive Constructs
BPMN 2.0 Descriptive Constructs  BPMN 2.0 Descriptive Constructs
BPMN 2.0 Descriptive Constructs Mustafa Jarrar
 
Introduction to Business Process Management
Introduction to Business Process ManagementIntroduction to Business Process Management
Introduction to Business Process ManagementMustafa Jarrar
 
Customer Complaint Ontology
Customer Complaint Ontology Customer Complaint Ontology
Customer Complaint Ontology Mustafa Jarrar
 
Subset, Equality, and Exclusion Rules
Subset, Equality, and Exclusion RulesSubset, Equality, and Exclusion Rules
Subset, Equality, and Exclusion RulesMustafa Jarrar
 
Schema Modularization in ORM
Schema Modularization in ORMSchema Modularization in ORM
Schema Modularization in ORMMustafa Jarrar
 
On Computer Science Trends and Priorities in Palestine
On Computer Science Trends and Priorities in PalestineOn Computer Science Trends and Priorities in Palestine
On Computer Science Trends and Priorities in PalestineMustafa Jarrar
 
Lessons from Class Recording & Publishing of Eight Online Courses
Lessons from Class Recording & Publishing of Eight Online CoursesLessons from Class Recording & Publishing of Eight Online Courses
Lessons from Class Recording & Publishing of Eight Online CoursesMustafa Jarrar
 
Presentation curras paper-emnlp2014-final
Presentation curras paper-emnlp2014-finalPresentation curras paper-emnlp2014-final
Presentation curras paper-emnlp2014-finalMustafa Jarrar
 
Jarrar: Future Internet in Horizon 2020 Calls
Jarrar: Future Internet in Horizon 2020 CallsJarrar: Future Internet in Horizon 2020 Calls
Jarrar: Future Internet in Horizon 2020 CallsMustafa Jarrar
 
Habash: Arabic Natural Language Processing
Habash: Arabic Natural Language ProcessingHabash: Arabic Natural Language Processing
Habash: Arabic Natural Language ProcessingMustafa Jarrar
 
Riestra: How to Design and engineer Competitive Horizon 2020 Proposals
Riestra: How to Design and engineer Competitive Horizon 2020 ProposalsRiestra: How to Design and engineer Competitive Horizon 2020 Proposals
Riestra: How to Design and engineer Competitive Horizon 2020 ProposalsMustafa Jarrar
 
Bouquet: SIERA Workshop on The Pillars of Horizon2020
Bouquet: SIERA Workshop on The Pillars of Horizon2020Bouquet: SIERA Workshop on The Pillars of Horizon2020
Bouquet: SIERA Workshop on The Pillars of Horizon2020Mustafa Jarrar
 
Jarrar: Sparql Project
Jarrar: Sparql ProjectJarrar: Sparql Project
Jarrar: Sparql ProjectMustafa Jarrar
 
Jarrar: Logical Foundation of Ontology Engineering
Jarrar: Logical Foundation of Ontology EngineeringJarrar: Logical Foundation of Ontology Engineering
Jarrar: Logical Foundation of Ontology EngineeringMustafa Jarrar
 

Más de Mustafa Jarrar (20)

Clustering Arabic Tweets for Sentiment Analysis
Clustering Arabic Tweets for Sentiment AnalysisClustering Arabic Tweets for Sentiment Analysis
Clustering Arabic Tweets for Sentiment Analysis
 
Classifying Processes and Basic Formal Ontology
Classifying Processes  and Basic Formal OntologyClassifying Processes  and Basic Formal Ontology
Classifying Processes and Basic Formal Ontology
 
Discrete Mathematics Course Outline
Discrete Mathematics Course OutlineDiscrete Mathematics Course Outline
Discrete Mathematics Course Outline
 
Business Process Implementation
Business Process ImplementationBusiness Process Implementation
Business Process Implementation
 
Business Process Design and Re-engineering
Business Process Design and Re-engineeringBusiness Process Design and Re-engineering
Business Process Design and Re-engineering
 
BPMN 2.0 Analytical Constructs
BPMN 2.0 Analytical ConstructsBPMN 2.0 Analytical Constructs
BPMN 2.0 Analytical Constructs
 
BPMN 2.0 Descriptive Constructs
BPMN 2.0 Descriptive Constructs  BPMN 2.0 Descriptive Constructs
BPMN 2.0 Descriptive Constructs
 
Introduction to Business Process Management
Introduction to Business Process ManagementIntroduction to Business Process Management
Introduction to Business Process Management
 
Customer Complaint Ontology
Customer Complaint Ontology Customer Complaint Ontology
Customer Complaint Ontology
 
Subset, Equality, and Exclusion Rules
Subset, Equality, and Exclusion RulesSubset, Equality, and Exclusion Rules
Subset, Equality, and Exclusion Rules
 
Schema Modularization in ORM
Schema Modularization in ORMSchema Modularization in ORM
Schema Modularization in ORM
 
On Computer Science Trends and Priorities in Palestine
On Computer Science Trends and Priorities in PalestineOn Computer Science Trends and Priorities in Palestine
On Computer Science Trends and Priorities in Palestine
 
Lessons from Class Recording & Publishing of Eight Online Courses
Lessons from Class Recording & Publishing of Eight Online CoursesLessons from Class Recording & Publishing of Eight Online Courses
Lessons from Class Recording & Publishing of Eight Online Courses
 
Presentation curras paper-emnlp2014-final
Presentation curras paper-emnlp2014-finalPresentation curras paper-emnlp2014-final
Presentation curras paper-emnlp2014-final
 
Jarrar: Future Internet in Horizon 2020 Calls
Jarrar: Future Internet in Horizon 2020 CallsJarrar: Future Internet in Horizon 2020 Calls
Jarrar: Future Internet in Horizon 2020 Calls
 
Habash: Arabic Natural Language Processing
Habash: Arabic Natural Language ProcessingHabash: Arabic Natural Language Processing
Habash: Arabic Natural Language Processing
 
Riestra: How to Design and engineer Competitive Horizon 2020 Proposals
Riestra: How to Design and engineer Competitive Horizon 2020 ProposalsRiestra: How to Design and engineer Competitive Horizon 2020 Proposals
Riestra: How to Design and engineer Competitive Horizon 2020 Proposals
 
Bouquet: SIERA Workshop on The Pillars of Horizon2020
Bouquet: SIERA Workshop on The Pillars of Horizon2020Bouquet: SIERA Workshop on The Pillars of Horizon2020
Bouquet: SIERA Workshop on The Pillars of Horizon2020
 
Jarrar: Sparql Project
Jarrar: Sparql ProjectJarrar: Sparql Project
Jarrar: Sparql Project
 
Jarrar: Logical Foundation of Ontology Engineering
Jarrar: Logical Foundation of Ontology EngineeringJarrar: Logical Foundation of Ontology Engineering
Jarrar: Logical Foundation of Ontology Engineering
 

Último

Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 

Último (20)

Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 

Jarrar: Propositional Logic Inference Methods

  • 1. Jarrar © 2013 1 Dr. Mustafa Jarrar Sina Institute, University of Birzeit mjarrar@birzeit.edu www.jarrar.info Lecture Notes on Inference Methods, University of Birzeit, Palestine Spring Semester, 2014 Artificial Intelligence Section 7.5 (& extra) Inference Methods In Propositional Logic
  • 2. Jarrar © 2013 2 Watch this lecture and download the slides from http://jarrar-courses.blogspot.com/2011/11/artificial-intelligence-fall-2011.html
  • 3. Jarrar © 2013 3 This lecture • Enumeration Method • Inference rules • Resolution • Forward and backward Chaining Lecture Keywords: ،‫الشكلي‬ ‫المنطق‬ ،‫المنطق‬‫االستنتاج‬‫االستنباط‬ ،،‫االستنتاج‬ ‫قواعد‬ ، ‫ا‬ ‫،صحة‬ ‫االستنتاج‬ ‫طرق‬‫ل‬‫جمل‬،‫المنطقية‬‫التناقض‬ ،‫الحدود‬ Logic, Propositional Logic, Inference Methods, Deduction, Reasoning, Enumeration Method,​ ​Inference rules,​ ​Resolution, refutation theorem-proving technique, Forward Chaining,​ ​Backward Chaining​, Conjunctive Normal Form,Horn clauses, entailment, Logical Implication, Soundness, Completeness ،satisfiable, Unsatisfiable Information and material largely based on [1]
  • 4. Jarrar © 2013 4 Inference Methods • Enumeration Method • Inference rules • Resolution • Forward and backward Chaining
  • 5. Jarrar © 2013 5 Truth Tables for Inference Propositional Inference: Enumeration Method
  • 6. Jarrar © 2013 6 Propositional Inference: Enumeration Method • Let  = A  B and KB = (A  C)  (B  C) • Is it the case that KB ╞  • Check all possible models,   must be true wherever KB is true
  • 7. Jarrar © 2013 7 Propositional Inference: Enumeration Method • Depth-first enumeration of all models is sound and complete. • For n symbols, time complexity is O(2n), space complexity is O(n).
  • 8. Jarrar © 2013 8 Inference Methods • Enumeration Method • Inference rules • Resolution • Forward and backward Chaining
  • 9. Jarrar © 2013 9 Inference Rule: Modus Ponens The rule is written as:   ,   Means, whenever any sentences of the form    and  are given, then the sentence  can be inferred. If , then . . Therefore,  For example, if (WumpusAhead  WumpusAlive)  Shoot and (WumpusAhead  WumpusAlive) are given, then Shoot can be inferred.
  • 10. Jarrar © 2013 10 More Inference Rules: Logical Equivalences • Two sentences are logically equivalent iff true in same models: α ≡ ß iff α╞ β and β╞ α  All rules are sound if used with search algorithms, but they might be inadequate to reach a goal (i.e., completeness is not guaranteed).
  • 11. Jarrar © 2013 11 Inference Methods • Enumeration Method • Inference rules • Resolution • Forward and backward Chaining Proof by contradiction, i.e., show KB  α unsatisfiable.
  • 12. Jarrar © 2013 12 Resolution Resolution is a rule of inference leading to a refutation (‫)دحض‬ theorem- proving technique for sentences in propositional logic. That is, applying the resolution rule in a suitable way allows for telling whether a propositional formula is satisfiable; Resolution was introduced by John Alan Robinson in 1965. Suppose we have a knowledge base in this form: By resolving (A  B) and (A B), we obtain (AA), which is reduced to A Notice that this rule applies only when a knowledge base in form of conjunctions of disjunctions of literals. A  B, A B A
  • 13. Jarrar © 2013 13 Resolution We first write/convert the formulas into Conjunctive Normal Form (CNF): conjunction of disjunctions of literals clauses E.g., (A  B)  (B  C  D) A literal is a propositional variable or the negation of a propositional variable. • Resolution inference rule (for CNF): where li and mj are complementary literals (one is the negation of the other). E.g.,  Resolution is sound and complete for propositional logic. li  …  lk, m1  …  mn li  …  li-1 li+1  …  lk  m1  …  mj-1  mj+1 ...  mn P1,3  P2,2, P2,2 P1,3 a  b, a  c b  c
  • 14. Jarrar © 2013 14 Conversion to CNF Any sentence in propositional logic can be transformed into an equivalent sentence in Conjunctive Normal Form. Example: B1,1  (P1,2  P2,1) 1. Eliminate , replacing α  β with (α  β)(β  α). (B1,1  (P1,2  P2,1))  ((P1,2  P2,1)  B1,1) 2. Eliminate , replacing α  β with α  β. (B1,1  P1,2  P2,1)  ((P1,2  P2,1)  B1,1) 3. Move  inwards using de Morgan's rules and double-negation: (B1,1  P1,2  P2,1)  ((P1,2  P2,1)  B1,1) 4. Apply distributivity law ( over ) and flatten: (B1,1  P1,2  P2,1)  (P1,2  B1,1)  (P2,1  B1,1)
  • 15. Jarrar © 2013 15 Resolution Algorithm Any sentence in propositional logic can be transformed into an equivalent sentence in conjunctive normal form. Steps: • All sentences in KB and the negation of the sentence to be proved (the conjecture) are conjunctively connected. • The resulting sentence is transformed into a conjunctive normal form with the conjuncts viewed as elements in a set, S, of clauses. • The resolution rule is applied to all possible pairs of clauses that contain complementary literals. After each application of the resolution rule, the resulting sentence is simplified by removing repeated literals. If the sentence contains complementary literals, it is discarded (as a tautology). If not, and if it is not yet present in the clause set S, it is added to S, and is considered for further resolution inferences. • If after applying a resolution rule the empty clause is derived, the complete formula is unsatisfiable (or contradictory), and hence it can be concluded that the initial conjecture follows from the axioms. • If, on the other hand, the empty clause cannot be derived, and the resolution rule cannot be applied to derive any more new clauses, the conjecture is not a theorem of the original knowledge base. [2]
  • 16. Jarrar © 2013 16 • The resolution algorithm tries to prove: KB ╞  equivalent to KB   unsatisfiable • Generate all new sentences from KB and the query. • One of two things can happen: 1. We find a case like P  P which is unsatisfiable, which means we can entail the query. 2. We find no contradiction: there is a model that satisfies the sentence KB   (non-trivial) and hence we cannot entail the query. Resolution Algorithm (in short)
  • 17. Jarrar © 2013 17 Resolution Algorithm • Proof by contradiction, i.e., show KB  α unsatisfiable. [1]
  • 18. Jarrar © 2013 18 Example KB = (PQ)  Q (P  P) R (R  S)  (S Q)  = R Does KB entails  (KB╞ ) P  Q1. P  R2.  P  R3. R  S4. R  Q5. S  Q6. R neg7. S 4,78. Q 6,89. P 1,910. R 3,1011. . 7,1112. Contradiction!
  • 19. Jarrar © 2013 19 Exercise 1 KB = (B1,1  (P1,2 P2,1)) Breeze in [1,1] iff there is a Pit in [1,2] or [2.1].  B1,1 There is on Breeze in [1,1]  = P1,2 No Pit in [1,2]? Does KB entails  (KB╞ ) KB   False in all worldsTrue!
  • 20. Jarrar © 2013 20 Exercise 2 KB = (B1,1  (P1,2 P2,1)) Breeze in [1,1] iff there is a it is [1,2] or [2.1].  B1,1 There is on Breeze in [1,1]  = P1,2 Pit in [1,2]? Does KB entails  (KB╞ )
  • 21. Jarrar © 2013 21 Completeness of the Resolution Method • Self reading from the book • You should be able to prove the completeness of the resolution method (at least informally).
  • 22. Jarrar © 2013 22 Inference Methods • Enumeration Method • Inference rules • Resolution • Forward and backward Chaining
  • 23. Jarrar © 2013 23 Horn Clauses  Resolution can be exponential in space and time.  If we can reduce all clauses to “Horn clauses” resolution is linear in space and time.  A Horn clause has at most 1 positive literal. e.g. A  B  C P1  P2  P3 ...  Pn  Q; ~a V b V c V ~d Not a Horn Clause  Every Horn Clause can be rewritten as an implication with a conjunction of positive literals in the premises and a single positive literal as a conclusion. e.g. B  C  A  Can be used with forward chaining or backward chaining algorithms.  These algorithms are very natural and run in linear time!
  • 24. Jarrar © 2013 24 It’s Holiday It’s snowing I am at home Heating On I feel sleepy I am happy AND gate OR gate Query  “I am happy”? Forward chaining example Idea: fire any rule whose premises are satisfied in the KB, – add its conclusion to the KB, until query is found I feel sleepy  I am happy I am at home  heating On  I feel sleepy I am at home  It’s snowing  Heating On Today is Holiday I feel sleepy  I am at home Today is Holiday  It’s snowing  I am at home Today is Holiday It’s snowing
  • 25. Jarrar © 2013 25 Forward chaining example It’s Holiday It’s snowing I am at home Heating On I feel sleepy I am happy 2 2 2 2 1 Idea: fire any rule whose premises are satisfied in the KB, – add its conclusion to the KB, until query is found  “I am happy”? I feel sleepy  I am happy I am at home  heating On  I feel sleepy I am at home  It’s snowing  Heating On Today is Holiday I feel sleepy  I am at home Today is Holiday  It’s snowing  I am at home Today is Holiday It’s snowing
  • 26. Jarrar © 2013 26 Forward chaining example It’s Holiday It’s snowing I am at home Heating On I feel sleepy I am happy 2 2 1 1 1 Idea: fire any rule whose premises are satisfied in the KB, – add its conclusion to the KB, until query is found  “I am happy”? I feel sleepy  I am happy I am at home  heating On  I feel sleepy I am at home  It’s snowing  Heating On Today is Holiday I feel sleepy  I am at home Today is Holiday  It’s snowing  I am at home Today is Holiday It’s snowing
  • 27. Jarrar © 2013 27 Forward chaining example It’s Holiday It’s snowing I am at home Heating On I feel sleepy I am happy 2 1 1 0 1 Idea: fire any rule whose premises are satisfied in the KB, – add its conclusion to the KB, until query is found  “I am happy”? I feel sleepy  I am happy I am at home  heating On  I feel sleepy I am at home  It’s snowing  Heating On Today is Holiday I feel sleepy  I am at home Today is Holiday  It’s snowing  I am at home Today is Holiday It’s snowing
  • 28. Jarrar © 2013 28 Forward chaining example It’s Holiday It’s snowing I am at home Heating On I feel sleepy I am happy 1 0 1 0 1 Idea: fire any rule whose premises are satisfied in the KB, – add its conclusion to the KB, until query is found  “I am happy”? I feel sleepy  I am happy I am at home  heating On  I feel sleepy I am at home  It’s snowing  Heating On Today is Holiday I feel sleepy  I am at home Today is Holiday  It’s snowing  I am at home Today is Holiday It’s snowing
  • 29. Jarrar © 2013 29 Forward chaining example It’s Holiday It’s snowing I am at home Heating On I feel sleepy I am happy 0 0 1 0 1 Idea: fire any rule whose premises are satisfied in the KB, – add its conclusion to the KB, until query is found  “I am happy”? I feel sleepy  I am happy I am at home  heating On  I feel sleepy I am at home  It’s snowing  Heating On Today is Holiday I feel sleepy  I am at home Today is Holiday  It’s snowing  I am at home Today is Holiday It’s snowing
  • 30. Jarrar © 2013 30 I feel sleepy  I am happy I am at home  heating On  I feel sleepy I am at home  It’s snowing  Heating On Today is Holiday I feel sleepy  I am at home Today is Holiday  It’s snowing  I am at home Today is Holiday It’s snowing Forward chaining example It’s Holiday It’s snowing I am at home Heating On I feel sleepy I am happy 0 0 0 0 0 Idea: fire any rule whose premises are satisfied in the KB, – add its conclusion to the KB, until query is found  “I am happy”?
  • 31. Jarrar © 2013 31 Forward chaining example It’s Holiday It’s snowing I am at home Heating On I feel sleepy I am happy 0 0 0 0 0 I feel sleepy  I am happy I am at home  heating On  I feel sleepy I am at home  It’s snowing  Heating On Today is Holiday I feel sleepy  I am at home Today is Holiday  It’s snowing  I am at home Today is Holiday It’s snowing Idea: fire any rule whose premises are satisfied in the KB, – add its conclusion to the KB, until query is found  Forward chaining is sound and complete for Horn KB  “I am happy”?
  • 32. Jarrar © 2013 32 Think about this Suppose that the goal is to conclude the color of a pet named Fritz, given that (he croaks and eats flies), and that the Knowledge base contains the following : 1. If (X croaks and eats flies) - Then (X is a frog) 2. If (X chirps and sings) - Then (X is a canary) 3. If (X is a frog) - Then (X is green) 4. If (X is a canary) - Then (X is yellow) This Knowledge base would be searched and the first rule would be selected, because its antecedent (If Fritz croaks and eats flies) matches our given data. Now the consequents (Then X is a frog) is added to the data. The rule base is again searched and this time the third rule is selected, because its antecedent (If Fritz is a frog) matches our data that was just confirmed. Now the new consequent (Then Fritz is green) is added to our data. Nothing more can be inferred from this information, but we have now accomplished our goal of determining the color of Fritz. Croaks ‫ينعق‬ Frog ‫ضفدع‬ Chirps ‫يغرد‬ Canary ‫كناري‬
  • 33. Jarrar © 2013 33 Backward Chaining p1  p2  …  pn  q Idea: work backwards from the query q • check if q is known already, or • prove by BC all premises of some rule concluding q • Hence BC maintains a stack of sub-goals that need to be proved to get to q. Avoid loops: check if new sub-goal is already on the goal stack Avoid repeated work: check if new sub-goal 1. has already been proved true, or 2. has already failed Backward chaining is the basis for “logic programming,” e.g., Prolog
  • 34. Jarrar © 2013 34 Backward chaining example
  • 35. Jarrar © 2013 35 Backward chaining example
  • 36. Jarrar © 2013 36 Backward chaining example
  • 37. Jarrar © 2013 37 Backward chaining example we need P to prove L and L to prove P.
  • 38. Jarrar © 2013 38 Backward chaining example
  • 39. Jarrar © 2013 39 Backward chaining example
  • 40. Jarrar © 2013 40 Backward chaining example
  • 41. Jarrar © 2013 41 Backward chaining example
  • 42. Jarrar © 2013 42 Backward chaining example
  • 43. Jarrar © 2013 43 Backward chaining example
  • 44. Jarrar © 2013 44 Forward vs. Backward Chaining • FC is data-driven, automatic, senseless processing, – e.g., object recognition, routine decisions • May do lots of work that is irrelevant to the goal • BC is goal-driven, (bottom-up reasoning) appropriate for problem-solving, – e.g., Where are my keys? • Complexity of BC can be much less than linear in size of KB
  • 45. Jarrar © 2013 45 Summary • Logical agents apply inference to a knowledge base to derive new information and make decisions. • Basic concepts of logic: – syntax: formal structure of sentences – semantics: truth of sentences wrt models – entailment: necessary truth of one sentence given another – inference: deriving sentences from other sentences – soundness: derivations produce only entailed sentences – completeness: derivations can produce all entailed sentences • Resolution is sound and complete for propositional logic • Forward, backward chaining are linear-time, complete for Horn clauses • Propositional logic lacks expressive power
  • 46. Jarrar © 2013 46 References [1] S. Russell and P. Norvig: Artificial Intelligence: A Modern Approach Prentice Hall, 2003, Second Edition [2] Leitsch, Alexander (1997), The resolution calculus, EATCS Monographs in Theoretical Computer Science, Springer, p. 11, Before applying the inference method itself, we transform the formulas to quantifier-free conjunctive normal form.