1. AI3391 ARTIFICAL INTELLIGENCE
(II YEAR (III Sem))
Department of Artificial Intelligence and Data
Science
Session 28
by
Asst.Prof.M.Gokilavani
NIET
1/24/2024 Department of AI & DS 1
2. TEXTBOOK:
• Artificial Intelligence A modern Approach, Third Edition,
Stuart Russell and Peter Norvig, Pearson Education.
REFERENCES:
• Artificial Intelligence, 3rd Edn, E. Rich and K.Knight
(TMH).
• Artificial Intelligence, 3rd Edn, Patrick Henny Winston,
Pearson Education.
• Artificial Intelligence, Shivani Goel, Pearson Education.
• Artificial Intelligence and Expert Systems- Patterson,
Pearson Education.
1/24/2024 Department of AI & DS 2
3. Topics covered in session 28
• Logical Reasoning: Knowledge-Based Agents
• Propositional Logic
• Propositional Theorem Proving
• Effective Propositional Model Checking
• Agents Based on Propositional Logic
• First order logic
• Syntax and semantics
• Knowledge representation and engineering
• Inference and first order logic
• Forward and backward chaining
• Inference
1/24/2024 Department of AI & DS 3
4. Resolution
• Resolution is a theorem proving technique that proceeds
by building refutation proofs, i.e., proofs by
contradictions.
• Resolution is used, if there are various statements are
given, and we need to prove a conclusion of those
statements.
• Unification is a key concept in proofs by resolutions.
1/24/2024 4
Department of AI & DS
5. Resolution
• Resolution is a single inference rule which can
efficiently operate on the conjunctive normal form
or clausal form.
• Clause: Disjunction of literals (an atomic sentence) is
called a clause. It is also known as a unit clause.
• Conjunctive Normal Form: A sentence represented
as a conjunction of clauses is said to be conjunctive
normal form or CNF.
1/24/2024 5
Department of AI & DS
6. The Resolution Inference Rule
• The propositional rule is just a lifted version of the
resolution rule for first-order logic.
• If two clauses include complementary literals that are
expected to be standardized apart so that they share no
variables, resolution can resolve them.
1/24/2024 6
Department of AI & DS
Where li and mj are complementary literals, there is a
resolution in FOL.
Because it only resolves perfectly, this rule is also known as
the binary resolution rule .
7. Example 1
We can determine two clauses which are given below:
[Animal (g(x) V Loves (f(x), x)] and [¬ Loves(a, b)
V ¬Kills(a, b)]
Sol: Two complimentary literals are:
Loves (f(x), x) and ¬ Loves (a, b).
These literals could be unified with
unifier θ= [a/f(x), and b/x] ,
and it will bring about a resolvent clause:
[Animal (g(x) V ¬ Kills(f(x), x)].
1/24/2024 7
Department of AI & DS
8. Steps for Resolution
• Conversion of facts into first-order logic
• Convert FOL statements into CNF
• Negate the statement which needs to prove (proof
by contradiction)
• Draw resolution graph (unification)
To better comprehend all of the preceding phases, we
shall use resolution as an example.
1/24/2024 8
Department of AI & DS
9. Conversion to Clausal form or Conjunctive Normal Form (CNF)
1. Eliminate logical implications, ⇒, using the fact that A ⇒ B is equivalent to ¬A ∨
B.
2. Reduce the scope of each negation to a single term, using the following facts:
¬(¬P) = P
¬(A ∨ B) = ¬A ∧ ¬B
¬(A ∧ B) = ¬A V ¬B
¬∀x: P(x) = ∃x: ¬P(x)
¬∃x: P(x) = ∀x: ¬P(x)
3. Standardize variables so that each quantifier binds a unique variable.
4. Move all quantifiers to the left, maintaining their order.
5. Eliminate existential quantifiers, using Skolem functions (functions of the
preceding universally quantified variables).
6. Drop the prefix; assume universal quantification.
7. Convert the matrix into a conjunction of disjunctions. [(a &b) or c=(a or c) & (b or
c)
8. Create a separate clause corresponding to each conjunction.
9. Standardize apart the variables in the clauses.
1/24/2024 Department of AI & DS 9
11. Example
1/24/2024 11
Department of AI & DS
John likes all kind of food.
Apple and vegetable are food
Anything anyone eats and not killed is food.
Anil eats peanuts and still alive
Harry eats everything that Anil eats.
Prove by resolution that:
John likes peanuts.
13. Step-2: Conversion of FOL into CNF
• Converting FOL to CNF is essential in first-order logic
resolution because CNF makes resolution proofs easier.
i. Eliminate all implication (→) and rewrite:
1/24/2024 13
Department of AI & DS
14. ii. Move negation (¬)inwards and rewrite
1/24/2024 Department of AI & DS 14
16. Eliminate existential instantiation
quantifier by elimination.
• We will eliminate existential quantifiers in this step,
which is referred to as Skolemization.
• However, because there is no existential quantifier in
this example problem, all of the assertions in this
phase will be the same.
1/24/2024 Department of AI & DS 16
17. Drop Universal quantifiers
• We'll remove all universal quantifiers ∃ in this phase
because none of the statements are implicitly
quantified, therefore we don't need them.
1/24/2024 Department of AI & DS 17
19. Step 3: Reverse the statement that needs
to be proven.
1/24/2024 Department of AI & DS 19
We will use negation to write the conclusion
assertions in this statement, which will be written
as "likes" (John, Peanuts)
21. Step 4: Create a graph of resolution
• First step: ¬likes(John, Peanuts) , and likes(John,
x) get resolved(canceled) by substitution of
{Peanuts/x}, and we are left with ¬ food(Peanuts)
• Second step: ¬ food(Peanuts) , and food(z) get
resolved (canceled) by substitution of { Peanuts/z}, and
we are left with¬ eats(y, Peanuts) V killed(y) .
• Third step: ¬ eats(y, Peanuts) and eats (Anil,
Peanuts) get resolved by substitution {Anil/y}, and we
are left with Killed(Anil).
• Fourth step: Killed(Anil) and ¬ killed(k) get resolve by
substitution {Anil/k}, and we are left with ¬
alive(Anil) .
• Last step:¬ alive(Anil) and alive(Anil) get resolve
1/24/2024 Department of AI & DS 21
22. Topics to be covered in next session 29
• Forward and Backward chaining
Thank you!!!
1/24/2024 Department of AI & DS 22