SlideShare ist ein Scribd-Unternehmen logo
1 von 28
SUBMITTED TO: SUBMITTED BY:
MR. RAVI KHATWAL KRATI KATYAL
MCA 5TH SEM
AO* ALGORITHM &
PROBLEM REDUCTION
Topic Covered
 AND/OR Graph
 AO* Problem Reduction Algorithm
 Forward Chaining
 Backward Chaining
 Proof Tree Generated by Forward/Backward Chaining
 References
AND/OR graphs
 Some problems are best represented as achieving subgoals, some of which
achieved simultaneously and independently (AND)
 Up to now, only dealt with OR options
Complete Assignment
Copy Assignment Study Topic Do Assignment
Searching AND/OR graphs
 A solution in an AND-OR tree is a sub tree whose leafs are included in the goal
set
 Cost function: sum of costs in AND node
f(n) = f(n1) + f(n2) + …. + f(nk)
 How can we extend A* to search AND/OR trees? The AO* algorithm.
AND/OR search
 We must examine several nodes simultaneously when choosing the next move
A
B C D(3)
(4)
(5)
(9)
A
B C D
38
E F G H I J
17 9 27
(5) (10) (3) (4) (15) (10)
AND/OR Best-First-Search
 Traverse the graph (from the initial node) following the best current path.
 Pick one of the unexpanded nodes on that path and expand it. Add its
successors to the graph and compute f for each of them
 Change the expanded node’s f value to reflect its successors. Propagate the
change up the graph.
 Reconsider the current best solution and repeat until a solution is found
AND/OR Best-First-Search example
AND/OR Best-First-Search example
A Longer path may be better
AO* algorithm
1. Let G be a graph with only starting node INIT.
2. Repeat the followings until INIT is labeled SOLVED or
h(INIT) > FUTILITY
a) Select an unexpanded node from the most promising path from
INIT (call it NODE)
b) Generate successors of NODE. If there are none, set h(NODE) =
FUTILITY (i.e., NODE is unsolvable); otherwise for each
SUCCESSOR that is not an ancestor of NODE do the following:
i. Add SUCCESSSOR to G.
ii. If SUCCESSOR is a terminal node, label it SOLVED and set
h(SUCCESSOR) = 0.
iii. If SUCCESSPR is not a terminal node, compute its h
AO* algorithm (Cont.)
c) Propagate the newly discovered information up the graph by doing the
following: let S be set of SOLVED nodes or nodes whose h values have
been changed and need to have values propagated back to their parents.
Initialize S to Node. Until S is empty repeat the followings:
i. Remove a node from S and call it CURRENT.
ii. Compute the cost of each of the arcs emerging from CURRENT. Assign
minimum cost of its successors as its h.
iii. Mark the best path out of CURRENT by marking the arc that had the
minimum cost in step ii
iv. Mark CURRENT as SOLVED if all of the nodes connected to it through
new labeled arc have been labeled SOLVED
v. If CURRENT has been labeled SOLVED or its cost was just changed,
propagate its new cost back up through the graph. So add all of the
ancestors of CURRENT to S.
An Example
An Example
An Example
An Example
Proof Tree Generated by
Forward/Backward Chaining
Consider The Following Sentences
1. It is a crime for an American to sell weapons to hostile Nations.
2. Pakistan has some missiles.
3. All of its(Paksitan’s) missiles were sold to it by Colonel West.
4. Missiles are weapons
5. Enemy of America counts as “hostile”.
6. West is American.
7. The country Pakistan is an enemy of America.
a) Translate these sentenses into Formula in Predicate Logic.
b) Prove that “West is criminal” using forward chaining.
c) Prove that “West is criminal” using Backward chaining.
Solution A:
1. ∀X, Y, Z american(X) ⋀ weapon(Y) ⋀ sells(X,Y,Z) ⋀ hostile(Z) → criminal(X)
2. ∃X owns(pakistan, X) ⋀ missile(X)
3. ∀X missile(X) ⋀ owns(pakistan, X) → sells(west, X, pakistan)
4. Missile(X) → weapon(X)
5. Enemy(X, america) → hostile(X)
6. American(west)
7. Enemy(pakistan,america)
Solution B:
 Own(pakistan,m1)⋀missile(m1) ⋀ american(west) ⋀ enemy(pakistan, america)
↓ Rule(3) and {m1/X}
 Own(pakistan,m1)⋀missile(m1) ⋀ sells(west,m1, pakistan) ⋀ american(west)
⋀enemy(pakistan, america)
↓ Rule(4) and {m1/X}
 Own(pakistan,m1) ⋀ missile(m1) ⋀ weapon(m1) ⋀ sells(west, m1, pakistan,) ⋀
enemy(pakistan, america) ⋀ american(west)
↓ Rule(5) and {pakistan/X}
 Own(pakistan,missile(m1) ⋀weapon(m1) ⋀ sells(west, m1, pakistan) ⋀
hostile(pakistan) ⋀ enemy(pakistan,america) ⋀ american(west)
↓ Rule(1) {west/X, Y/m1, Z/pakistan}
 criminal (west)
Showing Procedure Using AND/OR Graph
Solution C:
 Here, we start with our goal as given in figure
 Criminal(west)
 ↑ Rule(1) & {west/X}
 american(west) ⋀ weapon(Y) ⋀ sells(wet, Y, Z) ⋀ hostile(Z)
 ↑ Rule(6)
 weapon(Y) ⋀ sells(west, Y, Z) ⋀ hostile(Z)
 ↑ Rule(5) & {Z/X}
 weapon(Y) ⋀ sells(west, Y, Z) ⋀ enemy(Z, America)
 ↑ Rule(7) & {pakistan/Z}
 weapon(Y) ⋀ sells(west, Y, pakistan)
 ↑ Rule(4) & {Y/X}
 missile(Y) ⋀ sells(west, Y, pakistan)
 ↑ Rule(2,b) and {Y/m1}
 sells(west, Y, pakistan)
 ↑ Rule(3) {Y/X}
 missile(Y) ⋀ owns(pakistan, Y)
 ↑ Rule(2, a)and (2, b) and {Y/m1}
 Nil
Showing Procedure Using AND/OR Graph
References
 Book Reference
 Artificial Intelligence – Amit Barjatiya & Dinesh Diggiwal
 Artificial Intelligence – Russell & Norvig
 Web Reference
 www.wikipedia.org
 artificialintelligence-notes.blogspot.in
And or graph problem reduction using predicate logic

Weitere ähnliche Inhalte

Was ist angesagt?

Problem reduction AND OR GRAPH & AO* algorithm.ppt
Problem reduction AND OR GRAPH & AO* algorithm.pptProblem reduction AND OR GRAPH & AO* algorithm.ppt
Problem reduction AND OR GRAPH & AO* algorithm.pptarunsingh660
 
Unit3:Informed and Uninformed search
Unit3:Informed and Uninformed searchUnit3:Informed and Uninformed search
Unit3:Informed and Uninformed searchTekendra Nath Yogi
 
Informed search (heuristics)
Informed search (heuristics)Informed search (heuristics)
Informed search (heuristics)Bablu Shofi
 
Lecture 14 Heuristic Search-A star algorithm
Lecture 14 Heuristic Search-A star algorithmLecture 14 Heuristic Search-A star algorithm
Lecture 14 Heuristic Search-A star algorithmHema Kashyap
 
Asymptotic notations
Asymptotic notationsAsymptotic notations
Asymptotic notationsNikhil Sharma
 
Lecture 26 local beam search
Lecture 26 local beam searchLecture 26 local beam search
Lecture 26 local beam searchHema Kashyap
 
Time and space complexity
Time and space complexityTime and space complexity
Time and space complexityAnkit Katiyar
 
Solving problems by searching
Solving problems by searchingSolving problems by searching
Solving problems by searchingLuigi Ceccaroni
 
Heuristic Search in Artificial Intelligence | Heuristic Function in AI | Admi...
Heuristic Search in Artificial Intelligence | Heuristic Function in AI | Admi...Heuristic Search in Artificial Intelligence | Heuristic Function in AI | Admi...
Heuristic Search in Artificial Intelligence | Heuristic Function in AI | Admi...RahulSharma4566
 
Hill climbing algorithm in artificial intelligence
Hill climbing algorithm in artificial intelligenceHill climbing algorithm in artificial intelligence
Hill climbing algorithm in artificial intelligencesandeep54552
 
Elements of dynamic programming
Elements of dynamic programmingElements of dynamic programming
Elements of dynamic programmingTafhim Islam
 
1.7. eqivalence of nfa and dfa
1.7. eqivalence of nfa and dfa1.7. eqivalence of nfa and dfa
1.7. eqivalence of nfa and dfaSampath Kumar S
 
Artificial Intelligence Searching Techniques
Artificial Intelligence Searching TechniquesArtificial Intelligence Searching Techniques
Artificial Intelligence Searching TechniquesDr. C.V. Suresh Babu
 

Was ist angesagt? (20)

Problem reduction AND OR GRAPH & AO* algorithm.ppt
Problem reduction AND OR GRAPH & AO* algorithm.pptProblem reduction AND OR GRAPH & AO* algorithm.ppt
Problem reduction AND OR GRAPH & AO* algorithm.ppt
 
Informed search
Informed searchInformed search
Informed search
 
Unit3:Informed and Uninformed search
Unit3:Informed and Uninformed searchUnit3:Informed and Uninformed search
Unit3:Informed and Uninformed search
 
Hill climbing algorithm
Hill climbing algorithmHill climbing algorithm
Hill climbing algorithm
 
Informed search (heuristics)
Informed search (heuristics)Informed search (heuristics)
Informed search (heuristics)
 
Lecture 14 Heuristic Search-A star algorithm
Lecture 14 Heuristic Search-A star algorithmLecture 14 Heuristic Search-A star algorithm
Lecture 14 Heuristic Search-A star algorithm
 
AI Lecture 4 (informed search and exploration)
AI Lecture 4 (informed search and exploration)AI Lecture 4 (informed search and exploration)
AI Lecture 4 (informed search and exploration)
 
Asymptotic notations
Asymptotic notationsAsymptotic notations
Asymptotic notations
 
Lecture 26 local beam search
Lecture 26 local beam searchLecture 26 local beam search
Lecture 26 local beam search
 
Time and space complexity
Time and space complexityTime and space complexity
Time and space complexity
 
Problem Solving
Problem Solving Problem Solving
Problem Solving
 
Solving problems by searching
Solving problems by searchingSolving problems by searching
Solving problems by searching
 
String matching algorithms
String matching algorithmsString matching algorithms
String matching algorithms
 
Planning
Planning Planning
Planning
 
Heuristic Search in Artificial Intelligence | Heuristic Function in AI | Admi...
Heuristic Search in Artificial Intelligence | Heuristic Function in AI | Admi...Heuristic Search in Artificial Intelligence | Heuristic Function in AI | Admi...
Heuristic Search in Artificial Intelligence | Heuristic Function in AI | Admi...
 
AI Lecture 3 (solving problems by searching)
AI Lecture 3 (solving problems by searching)AI Lecture 3 (solving problems by searching)
AI Lecture 3 (solving problems by searching)
 
Hill climbing algorithm in artificial intelligence
Hill climbing algorithm in artificial intelligenceHill climbing algorithm in artificial intelligence
Hill climbing algorithm in artificial intelligence
 
Elements of dynamic programming
Elements of dynamic programmingElements of dynamic programming
Elements of dynamic programming
 
1.7. eqivalence of nfa and dfa
1.7. eqivalence of nfa and dfa1.7. eqivalence of nfa and dfa
1.7. eqivalence of nfa and dfa
 
Artificial Intelligence Searching Techniques
Artificial Intelligence Searching TechniquesArtificial Intelligence Searching Techniques
Artificial Intelligence Searching Techniques
 

Andere mochten auch (6)

Shortest path (Dijkistra's Algorithm) & Spanning Tree (Prim's Algorithm)
Shortest path (Dijkistra's Algorithm) & Spanning Tree (Prim's Algorithm)Shortest path (Dijkistra's Algorithm) & Spanning Tree (Prim's Algorithm)
Shortest path (Dijkistra's Algorithm) & Spanning Tree (Prim's Algorithm)
 
Polygon filling
Polygon fillingPolygon filling
Polygon filling
 
Risc & cisk
Risc & ciskRisc & cisk
Risc & cisk
 
Modular programming
Modular programmingModular programming
Modular programming
 
Protection
ProtectionProtection
Protection
 
Knapsack problem using fixed tuple
Knapsack problem using fixed tupleKnapsack problem using fixed tuple
Knapsack problem using fixed tuple
 

Ähnlich wie And or graph problem reduction using predicate logic

Jarrar.lecture notes.aai.2011s.ch4.informedsearch
Jarrar.lecture notes.aai.2011s.ch4.informedsearchJarrar.lecture notes.aai.2011s.ch4.informedsearch
Jarrar.lecture notes.aai.2011s.ch4.informedsearchPalGov
 
DSA (Data Structure and Algorithm) Questions
DSA (Data Structure and Algorithm) QuestionsDSA (Data Structure and Algorithm) Questions
DSA (Data Structure and Algorithm) QuestionsRESHAN FARAZ
 
graphin-c1.pnggraphin-c1.txt1 22 3 83 44 5.docx
graphin-c1.pnggraphin-c1.txt1 22 3 83 44 5.docxgraphin-c1.pnggraphin-c1.txt1 22 3 83 44 5.docx
graphin-c1.pnggraphin-c1.txt1 22 3 83 44 5.docxwhittemorelucilla
 
Monad presentation scala as a category
Monad presentation   scala as a categoryMonad presentation   scala as a category
Monad presentation scala as a categorysamthemonad
 
Heuristic Searching: A* Search
Heuristic Searching: A* SearchHeuristic Searching: A* Search
Heuristic Searching: A* SearchIOSR Journals
 
MTH 2001 Project 2Instructions• Each group must choos.docx
MTH 2001 Project 2Instructions• Each group must choos.docxMTH 2001 Project 2Instructions• Each group must choos.docx
MTH 2001 Project 2Instructions• Each group must choos.docxgilpinleeanna
 
Real World Haskell: Lecture 5
Real World Haskell: Lecture 5Real World Haskell: Lecture 5
Real World Haskell: Lecture 5Bryan O'Sullivan
 
04 greedyalgorithmsii 2x2
04 greedyalgorithmsii 2x204 greedyalgorithmsii 2x2
04 greedyalgorithmsii 2x2MuradAmn
 
Answers withexplanations
Answers withexplanationsAnswers withexplanations
Answers withexplanationsGopi Saiteja
 
Cs6660 compiler design november december 2016 Answer key
Cs6660 compiler design november december 2016 Answer keyCs6660 compiler design november december 2016 Answer key
Cs6660 compiler design november december 2016 Answer keyappasami
 
preTEST2A MAT225 Multivariable Calculus
preTEST2A MAT225 Multivariable CalculuspreTEST2A MAT225 Multivariable Calculus
preTEST2A MAT225 Multivariable CalculusA Jorge Garcia
 
test pre
test pretest pre
test prefarazch
 
preTEST2A Solution MAT225 Multivariable Calculus
preTEST2A Solution MAT225 Multivariable CalculuspreTEST2A Solution MAT225 Multivariable Calculus
preTEST2A Solution MAT225 Multivariable CalculusA Jorge Garcia
 
preTEST3A Double Integrals
preTEST3A Double IntegralspreTEST3A Double Integrals
preTEST3A Double IntegralsA Jorge Garcia
 

Ähnlich wie And or graph problem reduction using predicate logic (20)

Jarrar.lecture notes.aai.2011s.ch4.informedsearch
Jarrar.lecture notes.aai.2011s.ch4.informedsearchJarrar.lecture notes.aai.2011s.ch4.informedsearch
Jarrar.lecture notes.aai.2011s.ch4.informedsearch
 
DSA (Data Structure and Algorithm) Questions
DSA (Data Structure and Algorithm) QuestionsDSA (Data Structure and Algorithm) Questions
DSA (Data Structure and Algorithm) Questions
 
graphin-c1.pnggraphin-c1.txt1 22 3 83 44 5.docx
graphin-c1.pnggraphin-c1.txt1 22 3 83 44 5.docxgraphin-c1.pnggraphin-c1.txt1 22 3 83 44 5.docx
graphin-c1.pnggraphin-c1.txt1 22 3 83 44 5.docx
 
Algorithm Homework Help
Algorithm Homework HelpAlgorithm Homework Help
Algorithm Homework Help
 
Monad presentation scala as a category
Monad presentation   scala as a categoryMonad presentation   scala as a category
Monad presentation scala as a category
 
Heuristic Searching: A* Search
Heuristic Searching: A* SearchHeuristic Searching: A* Search
Heuristic Searching: A* Search
 
MTH 2001 Project 2Instructions• Each group must choos.docx
MTH 2001 Project 2Instructions• Each group must choos.docxMTH 2001 Project 2Instructions• Each group must choos.docx
MTH 2001 Project 2Instructions• Each group must choos.docx
 
Unit ii-ppt
Unit ii-pptUnit ii-ppt
Unit ii-ppt
 
Real World Haskell: Lecture 5
Real World Haskell: Lecture 5Real World Haskell: Lecture 5
Real World Haskell: Lecture 5
 
04 greedyalgorithmsii 2x2
04 greedyalgorithmsii 2x204 greedyalgorithmsii 2x2
04 greedyalgorithmsii 2x2
 
Answers withexplanations
Answers withexplanationsAnswers withexplanations
Answers withexplanations
 
Sorting2
Sorting2Sorting2
Sorting2
 
Network Design Assignment Help
Network Design Assignment HelpNetwork Design Assignment Help
Network Design Assignment Help
 
Cs6660 compiler design november december 2016 Answer key
Cs6660 compiler design november december 2016 Answer keyCs6660 compiler design november december 2016 Answer key
Cs6660 compiler design november december 2016 Answer key
 
Graphs
GraphsGraphs
Graphs
 
preTEST2A MAT225 Multivariable Calculus
preTEST2A MAT225 Multivariable CalculuspreTEST2A MAT225 Multivariable Calculus
preTEST2A MAT225 Multivariable Calculus
 
2020 preTEST2A
2020 preTEST2A2020 preTEST2A
2020 preTEST2A
 
test pre
test pretest pre
test pre
 
preTEST2A Solution MAT225 Multivariable Calculus
preTEST2A Solution MAT225 Multivariable CalculuspreTEST2A Solution MAT225 Multivariable Calculus
preTEST2A Solution MAT225 Multivariable Calculus
 
preTEST3A Double Integrals
preTEST3A Double IntegralspreTEST3A Double Integrals
preTEST3A Double Integrals
 

Kürzlich hochgeladen

SOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptxSOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptxkessiyaTpeter
 
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...Lokesh Kothari
 
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...ssifa0344
 
Botany 4th semester series (krishna).pdf
Botany 4th semester series (krishna).pdfBotany 4th semester series (krishna).pdf
Botany 4th semester series (krishna).pdfSumit Kumar yadav
 
Disentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOSTDisentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOSTSérgio Sacani
 
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...anilsa9823
 
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |aasikanpl
 
Botany krishna series 2nd semester Only Mcq type questions
Botany krishna series 2nd semester Only Mcq type questionsBotany krishna series 2nd semester Only Mcq type questions
Botany krishna series 2nd semester Only Mcq type questionsSumit Kumar yadav
 
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...Sérgio Sacani
 
Nanoparticles synthesis and characterization​ ​
Nanoparticles synthesis and characterization​  ​Nanoparticles synthesis and characterization​  ​
Nanoparticles synthesis and characterization​ ​kaibalyasahoo82800
 
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...Sérgio Sacani
 
Natural Polymer Based Nanomaterials
Natural Polymer Based NanomaterialsNatural Polymer Based Nanomaterials
Natural Polymer Based NanomaterialsAArockiyaNisha
 
G9 Science Q4- Week 1-2 Projectile Motion.ppt
G9 Science Q4- Week 1-2 Projectile Motion.pptG9 Science Q4- Week 1-2 Projectile Motion.ppt
G9 Science Q4- Week 1-2 Projectile Motion.pptMAESTRELLAMesa2
 
Unlocking the Potential: Deep dive into ocean of Ceramic Magnets.pptx
Unlocking  the Potential: Deep dive into ocean of Ceramic Magnets.pptxUnlocking  the Potential: Deep dive into ocean of Ceramic Magnets.pptx
Unlocking the Potential: Deep dive into ocean of Ceramic Magnets.pptxanandsmhk
 
Biopesticide (2).pptx .This slides helps to know the different types of biop...
Biopesticide (2).pptx  .This slides helps to know the different types of biop...Biopesticide (2).pptx  .This slides helps to know the different types of biop...
Biopesticide (2).pptx .This slides helps to know the different types of biop...RohitNehra6
 
Boyles law module in the grade 10 science
Boyles law module in the grade 10 scienceBoyles law module in the grade 10 science
Boyles law module in the grade 10 sciencefloriejanemacaya1
 
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Sérgio Sacani
 
Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )aarthirajkumar25
 
Pests of cotton_Sucking_Pests_Dr.UPR.pdf
Pests of cotton_Sucking_Pests_Dr.UPR.pdfPests of cotton_Sucking_Pests_Dr.UPR.pdf
Pests of cotton_Sucking_Pests_Dr.UPR.pdfPirithiRaju
 

Kürzlich hochgeladen (20)

SOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptxSOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
 
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
 
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
 
CELL -Structural and Functional unit of life.pdf
CELL -Structural and Functional unit of life.pdfCELL -Structural and Functional unit of life.pdf
CELL -Structural and Functional unit of life.pdf
 
Botany 4th semester series (krishna).pdf
Botany 4th semester series (krishna).pdfBotany 4th semester series (krishna).pdf
Botany 4th semester series (krishna).pdf
 
Disentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOSTDisentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOST
 
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
 
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
 
Botany krishna series 2nd semester Only Mcq type questions
Botany krishna series 2nd semester Only Mcq type questionsBotany krishna series 2nd semester Only Mcq type questions
Botany krishna series 2nd semester Only Mcq type questions
 
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
 
Nanoparticles synthesis and characterization​ ​
Nanoparticles synthesis and characterization​  ​Nanoparticles synthesis and characterization​  ​
Nanoparticles synthesis and characterization​ ​
 
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
 
Natural Polymer Based Nanomaterials
Natural Polymer Based NanomaterialsNatural Polymer Based Nanomaterials
Natural Polymer Based Nanomaterials
 
G9 Science Q4- Week 1-2 Projectile Motion.ppt
G9 Science Q4- Week 1-2 Projectile Motion.pptG9 Science Q4- Week 1-2 Projectile Motion.ppt
G9 Science Q4- Week 1-2 Projectile Motion.ppt
 
Unlocking the Potential: Deep dive into ocean of Ceramic Magnets.pptx
Unlocking  the Potential: Deep dive into ocean of Ceramic Magnets.pptxUnlocking  the Potential: Deep dive into ocean of Ceramic Magnets.pptx
Unlocking the Potential: Deep dive into ocean of Ceramic Magnets.pptx
 
Biopesticide (2).pptx .This slides helps to know the different types of biop...
Biopesticide (2).pptx  .This slides helps to know the different types of biop...Biopesticide (2).pptx  .This slides helps to know the different types of biop...
Biopesticide (2).pptx .This slides helps to know the different types of biop...
 
Boyles law module in the grade 10 science
Boyles law module in the grade 10 scienceBoyles law module in the grade 10 science
Boyles law module in the grade 10 science
 
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
 
Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )
 
Pests of cotton_Sucking_Pests_Dr.UPR.pdf
Pests of cotton_Sucking_Pests_Dr.UPR.pdfPests of cotton_Sucking_Pests_Dr.UPR.pdf
Pests of cotton_Sucking_Pests_Dr.UPR.pdf
 

And or graph problem reduction using predicate logic

  • 1. SUBMITTED TO: SUBMITTED BY: MR. RAVI KHATWAL KRATI KATYAL MCA 5TH SEM AO* ALGORITHM & PROBLEM REDUCTION
  • 2. Topic Covered  AND/OR Graph  AO* Problem Reduction Algorithm  Forward Chaining  Backward Chaining  Proof Tree Generated by Forward/Backward Chaining  References
  • 3. AND/OR graphs  Some problems are best represented as achieving subgoals, some of which achieved simultaneously and independently (AND)  Up to now, only dealt with OR options Complete Assignment Copy Assignment Study Topic Do Assignment
  • 4. Searching AND/OR graphs  A solution in an AND-OR tree is a sub tree whose leafs are included in the goal set  Cost function: sum of costs in AND node f(n) = f(n1) + f(n2) + …. + f(nk)  How can we extend A* to search AND/OR trees? The AO* algorithm.
  • 5. AND/OR search  We must examine several nodes simultaneously when choosing the next move A B C D(3) (4) (5) (9) A B C D 38 E F G H I J 17 9 27 (5) (10) (3) (4) (15) (10)
  • 6. AND/OR Best-First-Search  Traverse the graph (from the initial node) following the best current path.  Pick one of the unexpanded nodes on that path and expand it. Add its successors to the graph and compute f for each of them  Change the expanded node’s f value to reflect its successors. Propagate the change up the graph.  Reconsider the current best solution and repeat until a solution is found
  • 9. A Longer path may be better
  • 10. AO* algorithm 1. Let G be a graph with only starting node INIT. 2. Repeat the followings until INIT is labeled SOLVED or h(INIT) > FUTILITY a) Select an unexpanded node from the most promising path from INIT (call it NODE) b) Generate successors of NODE. If there are none, set h(NODE) = FUTILITY (i.e., NODE is unsolvable); otherwise for each SUCCESSOR that is not an ancestor of NODE do the following: i. Add SUCCESSSOR to G. ii. If SUCCESSOR is a terminal node, label it SOLVED and set h(SUCCESSOR) = 0. iii. If SUCCESSPR is not a terminal node, compute its h
  • 11. AO* algorithm (Cont.) c) Propagate the newly discovered information up the graph by doing the following: let S be set of SOLVED nodes or nodes whose h values have been changed and need to have values propagated back to their parents. Initialize S to Node. Until S is empty repeat the followings: i. Remove a node from S and call it CURRENT. ii. Compute the cost of each of the arcs emerging from CURRENT. Assign minimum cost of its successors as its h. iii. Mark the best path out of CURRENT by marking the arc that had the minimum cost in step ii iv. Mark CURRENT as SOLVED if all of the nodes connected to it through new labeled arc have been labeled SOLVED v. If CURRENT has been labeled SOLVED or its cost was just changed, propagate its new cost back up through the graph. So add all of the ancestors of CURRENT to S.
  • 16.
  • 17.
  • 18.
  • 19. Proof Tree Generated by Forward/Backward Chaining Consider The Following Sentences 1. It is a crime for an American to sell weapons to hostile Nations. 2. Pakistan has some missiles. 3. All of its(Paksitan’s) missiles were sold to it by Colonel West. 4. Missiles are weapons 5. Enemy of America counts as “hostile”. 6. West is American. 7. The country Pakistan is an enemy of America.
  • 20. a) Translate these sentenses into Formula in Predicate Logic. b) Prove that “West is criminal” using forward chaining. c) Prove that “West is criminal” using Backward chaining.
  • 21. Solution A: 1. ∀X, Y, Z american(X) ⋀ weapon(Y) ⋀ sells(X,Y,Z) ⋀ hostile(Z) → criminal(X) 2. ∃X owns(pakistan, X) ⋀ missile(X) 3. ∀X missile(X) ⋀ owns(pakistan, X) → sells(west, X, pakistan) 4. Missile(X) → weapon(X) 5. Enemy(X, america) → hostile(X) 6. American(west) 7. Enemy(pakistan,america)
  • 22. Solution B:  Own(pakistan,m1)⋀missile(m1) ⋀ american(west) ⋀ enemy(pakistan, america) ↓ Rule(3) and {m1/X}  Own(pakistan,m1)⋀missile(m1) ⋀ sells(west,m1, pakistan) ⋀ american(west) ⋀enemy(pakistan, america) ↓ Rule(4) and {m1/X}  Own(pakistan,m1) ⋀ missile(m1) ⋀ weapon(m1) ⋀ sells(west, m1, pakistan,) ⋀ enemy(pakistan, america) ⋀ american(west) ↓ Rule(5) and {pakistan/X}  Own(pakistan,missile(m1) ⋀weapon(m1) ⋀ sells(west, m1, pakistan) ⋀ hostile(pakistan) ⋀ enemy(pakistan,america) ⋀ american(west) ↓ Rule(1) {west/X, Y/m1, Z/pakistan}  criminal (west)
  • 23. Showing Procedure Using AND/OR Graph
  • 24. Solution C:  Here, we start with our goal as given in figure  Criminal(west)  ↑ Rule(1) & {west/X}  american(west) ⋀ weapon(Y) ⋀ sells(wet, Y, Z) ⋀ hostile(Z)  ↑ Rule(6)  weapon(Y) ⋀ sells(west, Y, Z) ⋀ hostile(Z)  ↑ Rule(5) & {Z/X}  weapon(Y) ⋀ sells(west, Y, Z) ⋀ enemy(Z, America)  ↑ Rule(7) & {pakistan/Z}  weapon(Y) ⋀ sells(west, Y, pakistan)  ↑ Rule(4) & {Y/X}
  • 25.  missile(Y) ⋀ sells(west, Y, pakistan)  ↑ Rule(2,b) and {Y/m1}  sells(west, Y, pakistan)  ↑ Rule(3) {Y/X}  missile(Y) ⋀ owns(pakistan, Y)  ↑ Rule(2, a)and (2, b) and {Y/m1}  Nil
  • 26. Showing Procedure Using AND/OR Graph
  • 27. References  Book Reference  Artificial Intelligence – Amit Barjatiya & Dinesh Diggiwal  Artificial Intelligence – Russell & Norvig  Web Reference  www.wikipedia.org  artificialintelligence-notes.blogspot.in