This document provides an example of using resolution to prove a logical statement through forward and backward chaining. It first converts facts into first-order logic statements. It then uses forward chaining, starting with atomic predicates and chaining implications to reach the conclusion. It also uses backward chaining, starting with the conclusion and chaining backwards through implications to verify the starting facts. The document includes the steps of converting to CNF, drawing a resolution graph, and unifying variables to resolve the statement and prove it.
2. 1. Conversion of facts into first-order logic.
2. Convert FOL statements into CNF
3. Negate the statement which needs to
prove (proof by contradiction)
4. Draw resolution graph (unification).
Steps for Resolution
2
4/28/2020 J. Annrose
3. 3
1. India is a Team
2. Australia is a Team
3. Match between India and Australia
4. India scores 350 runs and Australia scores 350 runs, India lost by 5
wickets and Australia lost by 7 wickets
5. The team which scored the maximum runs wins
6. If the scores are then the team which lost minimum wickets wins
the match
Prove by resolution that:
India wins the match
4/28/2020 J. Annrose
Example
5. 5
2.1 Eliminate all implication (→) and rewrite
1. Team(India)
2. Team(Australia)
3. ¬ (Team(India) Λ Team(Australia) ) V Match(India, Australia)
4. Score(India, runs(350)) Λ Score(Australia, runs(350)) Λ lost(India, wickets(5)) Λ
lost(Australia, wickets(7))
5. ∀x : ¬ ( Team(x) Λ Score(x, max(runs))) V wins(x, match)
6. ∀x , ∀y : ¬ ( Team(x) Λ Team(y) Λ Score( x, y, equal(runs)) Λ lost(x, min(wickets))) V wins(x,
match)
added predicates
7. ¬ ( Score(India, runs(350)) Λ Score(Australia, runs(350))) V Score( India, Australia, equal(runs))
8. ¬ ( lost(India, wickets(5)) Λ lost(Australia, wickets(7))) V lost(India, min(wickets))
To prove
wins( India, match)
4/28/2020 J. Annrose
Step-2: Conversion of FOL into CNF
P—>Q= ¬P V Q
6. 6
2.2 Move negation (¬)inwards and rewrite
1. Team(India)
2. Team(Australia)
3. ¬ Team(India) V ¬ Team(Australia) V Match(India, Australia)
4. Score(India, runs(350)) Λ Score(Australia, runs(350)) Λ lost(India, wickets(5)) Λ
lost(Australia, wickets(7))
5. ∀x : ¬ Team(x) V ¬ Score(x, max(runs)) V wins(x, match)
6. ∀x , ∀y : ¬ Team(x) V ¬ Team(y) V ¬ Score( x, y, equal(runs)) V ¬ lost(x, min(wickets)) V
wins(x, match)
added predicates
7. ¬ Score(India, runs(350)) V ¬ Score(Australia, runs(350)) V Score( India, Australia, equal(runs))
8. ¬ lost(India, wickets(5)) V ¬ lost(Australia, wickets(7)) V lost(India, min(wickets))
To prove
wins( India, match)
4/28/2020 J. Annrose
Step-2: Conversion of FOL into CNF
7. 7
2.3 Rename variables or standardize variables
1. Team(India)
2. Team(Australia)
3. ¬ Team(India) V ¬ Team(Australia) V Match(India, Australia)
4. Score(India, runs(350)) Λ Score(Australia, runs(350)) Λ lost(India, wickets(5)) Λ
lost(Australia, wickets(7))
5. ∀x : ¬ Team(x) V ¬ Score(x, max(runs)) V wins(x, match)
6. ∀x , ∀y : ¬ Team(x) V ¬ Team(y) V ¬ Score( x, y, equal(runs)) V ¬ lost(x, min(wickets)) V
wins(x, match)
added predicates
7. ¬ Score(India, runs(350)) V ¬ Score(Australia, runs(350)) V Score( India, Australia, equal(runs))
8. ¬ lost(India, wickets(5)) V ¬ lost(Australia, wickets(7)) V lost(India, min(wickets))
To prove
wins( India, match)
4/28/2020 J. Annrose
Step-2: Conversion of FOL into CNF
8. 8
2.4 Eliminate existential instantiation quantifier by elimination.
2.5 Drop Universal quantifiers.
1. Team(India)
2. Team(Australia)
3. ¬ Team(India) V ¬ Team(Australia) V Match(India, Australia)
4. Score(India, runs(350)) Λ Score(Australia, runs(350)) Λ lost(India, wickets(5)) Λ lost(Australia,
wickets(7))
5. ¬ Team(x) V ¬ Score(x, max(runs)) V wins(x, match)
6. ¬ Team(x) V ¬ Team(y) V ¬ Score( x, y, equal(runs)) V ¬ lost(x, min(wickets)) V wins(x, match)
added predicates
7. ¬ Score(India, runs(350)) V ¬ Score(Australia, runs(350)) V Score( India, Australia, equal(runs))
8. ¬ lost(India, wickets(5)) V ¬ lost(Australia, wickets(7)) V lost(India, min(wickets))
To prove
wins( India, match)
2.6 Distribute conjunction ∧ over disjunction ¬.
4/28/2020 J. Annrose
Step-2: Conversion of FOL into CNF
9. 9
Apply negation to the conclusion statements,
which will be written as
¬wins( India, match)
4/28/2020 J. Annrose
Step-3: Negate the statement to be proved
10. 10
4/28/2020 J. Annrose
Step-4: Draw Resolution graph
¬wins( India, match)
¬ Team(x) V ¬ Team(y) V ¬ Score( x, y, equal(runs)) V ¬ lost(x, min(wickets)) V wins(x, match) (6)
¬ Team(India) V ¬ Team(y) V ¬ Score( India, y, equal(runs)) V ¬ lost(India, min(wickets))
x/India
11. 11
4/28/2020 J. Annrose
Step-4: Draw Resolution graph
¬wins( India, match) ¬ Team(x) V ¬ Team(y) V ¬ Score( x, y, equal(runs)) V ¬ lost(x, min(wickets)) V wins(x, match)
¬ Team(India) V ¬ Team(y) V ¬ Score( India, y, equal(runs)) V ¬ lost(India, min(wickets))
¬ lost(India, wickets(5)) V ¬ lost(Australia, wickets(7)) V lost(India, min(wickets)) (8)
¬ Team(India) V ¬ Team(y) V ¬ Score( India, y, equal(runs)) ¬ lost(India, wickets(5)) V ¬ lost(Australia, wickets(7))
x/India
12. 12
4/28/2020 J. Annrose
Step-4: Draw Resolution graph
¬wins( India, match) ¬ Team(x) V ¬ Team(y) V ¬ Score( x, y, equal(runs)) V ¬ lost(x, min(wickets)) V wins(x, match) (6)
¬ Team(India) V ¬ Team(y) V ¬ Score( India, y, equal(runs)) V ¬ lost(India, min(wickets))
¬ lost(India, wickets(5)) V ¬ lost(Australia, wickets(7)) V lost(India, min(wickets)) (8)
¬ Team(India) V ¬ Team(y) V ¬ Score( India, y, equal(runs)) ¬ lost(India, wickets(5)) V ¬ lost(Australia, wickets(7))
(7) ¬ Score(India, runs(350)) V ¬ Score(Australia, runs(350)) V Score( India, Australia, equal(runs))
¬ Team(India) V ¬ Team(Australia) V ¬ lost(India, wickets(5)) V ¬ lost(Australia, wickets(7)) ¬ Score(India, runs(350)) V ¬
Score(Australia, runs(350))
x/India
y/ Australia
13. 13
4/28/2020 J. Annrose
Step-4: Draw Resolution graph
¬wins( India, match) ¬ Team(x) V ¬ Team(y) V ¬ Score( x, y, equal(runs)) V ¬ lost(x, min(wickets)) V wins(x, match) (6)
¬ Team(India) V ¬ Team(y) V ¬ Score( India, y, equal(runs)) V ¬ lost(India, min(wickets))
¬ lost(India, wickets(5)) V ¬ lost(Australia, wickets(7)) V lost(India, min(wickets)) (8)
¬ Team(India) V ¬ Team(y) V ¬ Score( India, y, equal(runs)) ¬ lost(India, wickets(5)) V ¬ lost(Australia, wickets(7))
(7)¬ Score(India, runs(350)) V ¬ Score(Australia, runs(350)) V Score( India, Australia, equal(runs))
¬ Team(India) V ¬ Team(Australia) V ¬ lost(India, wickets(5)) V ¬ lost(Australia, wickets(7)) ¬ Score(India, runs(350)) V ¬
Score(Australia, runs(350))
Team(India) (1)
¬ Team(Australia) V ¬ lost(India, wickets(5)) V ¬ lost(Australia, wickets(7)) ¬ Score(India, runs(350)) V ¬ Score(Australia, runs(350))
Team(Australia (2)
¬ lost(India, wickets(5)) V ¬ lost(Australia, wickets(7)) ¬ Score(India, runs(350)) V ¬ Score(Australia, runs(350))
(4) lost(India, wickets(5)) V lost(Australia, wickets(7)) V Score(India, runs(350)) V Score(Australia, runs(350))
{ }
x/India
y/ Australia
14. 14
4/28/2020 J. Annrose
Step-4: Draw Resolution graph
¬wins( India, match) 6
¬ Team(India) V ¬ Team(y) V ¬ Score( India, y, equal(runs)) V ¬ lost(India, min(wickets)) 8
7 ¬ Team(India) V ¬ Team(y) V ¬ Score( India, y, equal(runs)) ¬ lost(India, wickets(5)) V ¬ lost(Australia, wickets(7))
¬ Team(India) V ¬ Team(Australia) V ¬ lost(India, wickets(5)) V ¬ lost(Australia, wickets(7)) ¬ Score(India, runs(350)) V ¬
Score(Australia, runs(350)) 1
2 ¬ Team(Australia) V ¬ lost(India, wickets(5)) V ¬ lost(Australia, wickets(7)) ¬ core(India, runs(350)) V ¬
Score(Australia, runs(350))
¬ lost(India, wickets(5)) V ¬ lost(Australia, wickets(7)) ¬ Score(India, runs(350)) V ¬ Score(Australia, runs(350)) 4
x/India
y/ Australia
15. 1. Conversion of facts into first-order logic.
2. Forward Chaining starts with
atomic predicates
3. Backward Chaining starts with
conclusion part
Steps for Forward and Backward chaining
15
4/28/2020 J. Annrose
23. 23
4/28/2020 J. Annrose
Backward Chaining
wins(India, match)
Team(x)
Team(India)
x/India
lost(Australia, wickets(7))Team(Australia)
Team(y) Score( x, y, equal(runs)) lost(x, min(wickets))
Score(India, runs(350)) Score(Australia, runs(350))
lost(India, wickets(5))
y/ Australia x/India
y/ Australia
x/India
24. 24
4/28/2020 J. Annrose
References
Stuart Russell, Peter Norvig, ―Artificial
Intelligence: A Modern Approach‖, Third Edition,
Pearson Education / Prentice Hall of India, 2010.