SlideShare a Scribd company logo
1 of 24
Download to read offline
Resolution, Forward and
Backward Chaining
Example 2
J. Annrose
AP/IT
SXCCE
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
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
4
1. Team(India)
2. Team(Australia)
3. Team(India) Λ Team(Australia)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)) → wins(x, match)
6. ∀x , ∀y : Team(x) Λ Team(y) Λ Score( x, y, equal(runs)) Λ lost(x, min(wickets)) →
wins(x, match)
added predicates
7. Score(India, runs(350)) Λ Score(Australia, runs(350)) → Score( India, Australia,
equal(runs))
8. lost(India, wickets(5)) Λ lost(Australia, wickets(7)) → lost(India, min(wickets))
To Prove
wins( India, match)
4/28/2020 J. Annrose
Step-1: Conversion of Facts into FOL
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
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
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
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
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
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
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
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
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
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
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
16
1. Team(India)
2. Team(Australia)
3. Team(India) Λ Team(Australia)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)) → wins(x, match)
6. ∀x , ∀y : Team(x) Λ Team(y) Λ Score( x, y, equal(runs)) Λ lost(x, min(wickets))
→ wins(x, match)
added predicates
7. Score(India, runs(350)) Λ Score(Australia, runs(350)) → Score( India, Australia,
equal(runs))
8. lost(India, wickets(5)) Λ lost(Australia, wickets(7)) → lost(India, min(wickets))
To Prove
wins( India, match)
4/28/2020 J. Annrose
Step-1: Conversion of Facts into FOL
17
4/28/2020 J. Annrose
Forward Chaining
Team(India) Team(Australia)
Score(India, runs(350)) Score(Australia, runs(350))
lost(India, wickets(5)) lost(Australia, wickets(7))
18
4/28/2020 J. Annrose
Forward Chaining
Team(India)
Team(Australia)
Score(India, runs(350)) Score(Australia, runs(350))
Score( India, Australia, equal(runs))
lost(India, wickets(5)) lost(Australia, wickets(7))
19
4/28/2020 J. Annrose
Forward Chaining
Score(India, runs(350)) Score(Australia, runs(350))
Team(India)
lost(India, wickets(5))
Team(Australia)
Score( India, Australia, equal(runs))
lost(Australia, wickets(7))
lost(India, min(wickets))
20
4/28/2020 J. Annrose
Forward Chaining
Team(India)
Score(Australia, runs(350))Score(India, runs(350))
lost(India, wickets(5))
Team(Australia)
Score( India, Australia, equal(runs))
lost(Australia, wickets(7))
lost(India, min(wickets))
wins( India, match)
21
4/28/2020 J. Annrose
Backward Chaining
wins(India, match)
22
4/28/2020 J. Annrose
Backward Chaining
Team(x) Team(y) Score( x, y, equal(runs)) lost(x, min(wickets))
wins(India, match)
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
4/28/2020 J. Annrose
References
Stuart Russell, Peter Norvig, ―Artificial
Intelligence: A Modern Approach‖, Third Edition,
Pearson Education / Prentice Hall of India, 2010.

More Related Content

Recently uploaded

Artificial intelligence presentation2-171219131633.pdf
Artificial intelligence presentation2-171219131633.pdfArtificial intelligence presentation2-171219131633.pdf
Artificial intelligence presentation2-171219131633.pdf
Kira Dess
 
21P35A0312 Internship eccccccReport.docx
21P35A0312 Internship eccccccReport.docx21P35A0312 Internship eccccccReport.docx
21P35A0312 Internship eccccccReport.docx
rahulmanepalli02
 

Recently uploaded (20)

Basics of Relay for Engineering Students
Basics of Relay for Engineering StudentsBasics of Relay for Engineering Students
Basics of Relay for Engineering Students
 
CLOUD COMPUTING SERVICES - Cloud Reference Modal
CLOUD COMPUTING SERVICES - Cloud Reference ModalCLOUD COMPUTING SERVICES - Cloud Reference Modal
CLOUD COMPUTING SERVICES - Cloud Reference Modal
 
Artificial intelligence presentation2-171219131633.pdf
Artificial intelligence presentation2-171219131633.pdfArtificial intelligence presentation2-171219131633.pdf
Artificial intelligence presentation2-171219131633.pdf
 
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTUUNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
 
Filters for Electromagnetic Compatibility Applications
Filters for Electromagnetic Compatibility ApplicationsFilters for Electromagnetic Compatibility Applications
Filters for Electromagnetic Compatibility Applications
 
Diploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdfDiploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdf
 
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdflitvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
 
Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdf
Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdfInstruct Nirmaana 24-Smart and Lean Construction Through Technology.pdf
Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdf
 
UNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptxUNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptx
 
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdfInvolute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
 
History of Indian Railways - the story of Growth & Modernization
History of Indian Railways - the story of Growth & ModernizationHistory of Indian Railways - the story of Growth & Modernization
History of Indian Railways - the story of Growth & Modernization
 
21P35A0312 Internship eccccccReport.docx
21P35A0312 Internship eccccccReport.docx21P35A0312 Internship eccccccReport.docx
21P35A0312 Internship eccccccReport.docx
 
Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)
 
Adsorption (mass transfer operations 2) ppt
Adsorption (mass transfer operations 2) pptAdsorption (mass transfer operations 2) ppt
Adsorption (mass transfer operations 2) ppt
 
21scheme vtu syllabus of visveraya technological university
21scheme vtu syllabus of visveraya technological university21scheme vtu syllabus of visveraya technological university
21scheme vtu syllabus of visveraya technological university
 
Working Principle of Echo Sounder and Doppler Effect.pdf
Working Principle of Echo Sounder and Doppler Effect.pdfWorking Principle of Echo Sounder and Doppler Effect.pdf
Working Principle of Echo Sounder and Doppler Effect.pdf
 
analog-vs-digital-communication (concept of analog and digital).pptx
analog-vs-digital-communication (concept of analog and digital).pptxanalog-vs-digital-communication (concept of analog and digital).pptx
analog-vs-digital-communication (concept of analog and digital).pptx
 
Augmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptxAugmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptx
 
Independent Solar-Powered Electric Vehicle Charging Station
Independent Solar-Powered Electric Vehicle Charging StationIndependent Solar-Powered Electric Vehicle Charging Station
Independent Solar-Powered Electric Vehicle Charging Station
 
Autodesk Construction Cloud (Autodesk Build).pptx
Autodesk Construction Cloud (Autodesk Build).pptxAutodesk Construction Cloud (Autodesk Build).pptx
Autodesk Construction Cloud (Autodesk Build).pptx
 

Featured

Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Featured (20)

AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 

Inference Resolution, Forward and backward chaining example:India wins thematch resolution,fbc

  • 1. Resolution, Forward and Backward Chaining Example 2 J. Annrose AP/IT SXCCE
  • 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
  • 4. 4 1. Team(India) 2. Team(Australia) 3. Team(India) Λ Team(Australia)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)) → wins(x, match) 6. ∀x , ∀y : Team(x) Λ Team(y) Λ Score( x, y, equal(runs)) Λ lost(x, min(wickets)) → wins(x, match) added predicates 7. Score(India, runs(350)) Λ Score(Australia, runs(350)) → Score( India, Australia, equal(runs)) 8. lost(India, wickets(5)) Λ lost(Australia, wickets(7)) → lost(India, min(wickets)) To Prove wins( India, match) 4/28/2020 J. Annrose Step-1: Conversion of Facts into FOL
  • 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
  • 16. 16 1. Team(India) 2. Team(Australia) 3. Team(India) Λ Team(Australia)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)) → wins(x, match) 6. ∀x , ∀y : Team(x) Λ Team(y) Λ Score( x, y, equal(runs)) Λ lost(x, min(wickets)) → wins(x, match) added predicates 7. Score(India, runs(350)) Λ Score(Australia, runs(350)) → Score( India, Australia, equal(runs)) 8. lost(India, wickets(5)) Λ lost(Australia, wickets(7)) → lost(India, min(wickets)) To Prove wins( India, match) 4/28/2020 J. Annrose Step-1: Conversion of Facts into FOL
  • 17. 17 4/28/2020 J. Annrose Forward Chaining Team(India) Team(Australia) Score(India, runs(350)) Score(Australia, runs(350)) lost(India, wickets(5)) lost(Australia, wickets(7))
  • 18. 18 4/28/2020 J. Annrose Forward Chaining Team(India) Team(Australia) Score(India, runs(350)) Score(Australia, runs(350)) Score( India, Australia, equal(runs)) lost(India, wickets(5)) lost(Australia, wickets(7))
  • 19. 19 4/28/2020 J. Annrose Forward Chaining Score(India, runs(350)) Score(Australia, runs(350)) Team(India) lost(India, wickets(5)) Team(Australia) Score( India, Australia, equal(runs)) lost(Australia, wickets(7)) lost(India, min(wickets))
  • 20. 20 4/28/2020 J. Annrose Forward Chaining Team(India) Score(Australia, runs(350))Score(India, runs(350)) lost(India, wickets(5)) Team(Australia) Score( India, Australia, equal(runs)) lost(Australia, wickets(7)) lost(India, min(wickets)) wins( India, match)
  • 21. 21 4/28/2020 J. Annrose Backward Chaining wins(India, match)
  • 22. 22 4/28/2020 J. Annrose Backward Chaining Team(x) Team(y) Score( x, y, equal(runs)) lost(x, min(wickets)) wins(India, match)
  • 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.