SlideShare a Scribd company logo
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

More Related Content

What's hot

Dijkstra's Algorithm
Dijkstra's Algorithm Dijkstra's Algorithm
Dijkstra's Algorithm
Rashik Ishrak Nahian
 
Hill climbing algorithm
Hill climbing algorithmHill climbing algorithm
Hill climbing algorithm
Dr. C.V. Suresh Babu
 
Local search algorithms
Local search algorithmsLocal search algorithms
Local search algorithms
bambangsueb
 
Dijkstra's algorithm presentation
Dijkstra's algorithm presentationDijkstra's algorithm presentation
Dijkstra's algorithm presentation
Subid Biswas
 
I.BEST FIRST SEARCH IN AI
I.BEST FIRST SEARCH IN AII.BEST FIRST SEARCH IN AI
I.BEST FIRST SEARCH IN AI
vikas dhakane
 
Travelling salesman dynamic programming
Travelling salesman dynamic programmingTravelling salesman dynamic programming
Travelling salesman dynamic programming
maharajdey
 
UNIT - I PROBLEM SOLVING AGENTS and EXAMPLES.pptx.pdf
UNIT - I PROBLEM SOLVING AGENTS and EXAMPLES.pptx.pdfUNIT - I PROBLEM SOLVING AGENTS and EXAMPLES.pptx.pdf
UNIT - I PROBLEM SOLVING AGENTS and EXAMPLES.pptx.pdf
JenishaR1
 
Graph coloring problem
Graph coloring problemGraph coloring problem
Graph coloring problem
V.V.Vanniaperumal College for Women
 
A Star Search
A Star SearchA Star Search
A Star Search
Computing Cage
 
Artificial Intelligence Searching Techniques
Artificial Intelligence Searching TechniquesArtificial Intelligence Searching Techniques
Artificial Intelligence Searching Techniques
Dr. C.V. Suresh Babu
 
Graph coloring problem(DAA).pptx
Graph coloring problem(DAA).pptxGraph coloring problem(DAA).pptx
Graph coloring problem(DAA).pptx
Home
 
Breadth First Search & Depth First Search
Breadth First Search & Depth First SearchBreadth First Search & Depth First Search
Breadth First Search & Depth First Search
Kevin Jadiya
 
strassen matrix multiplication algorithm
strassen matrix multiplication algorithmstrassen matrix multiplication algorithm
strassen matrix multiplication algorithm
evil eye
 
Informed search
Informed searchInformed search
Informed search
Amit Kumar Rathi
 
A* Search Algorithm
A* Search AlgorithmA* Search Algorithm
A* Search Algorithm
vikas dhakane
 
9. chapter 8 np hard and np complete problems
9. chapter 8   np hard and np complete problems9. chapter 8   np hard and np complete problems
9. chapter 8 np hard and np complete problems
Jyotsna Suryadevara
 
Shortest Path in Graph
Shortest Path in GraphShortest Path in Graph
Shortest Path in Graph
Dr Sandeep Kumar Poonia
 
A star algorithms
A star algorithmsA star algorithms
A star algorithms
sandeep54552
 
Red black tree
Red black treeRed black tree
Red black tree
Rajendran
 

What's hot (20)

Dijkstra's Algorithm
Dijkstra's Algorithm Dijkstra's Algorithm
Dijkstra's Algorithm
 
Hill climbing algorithm
Hill climbing algorithmHill climbing algorithm
Hill climbing algorithm
 
Local search algorithms
Local search algorithmsLocal search algorithms
Local search algorithms
 
Dijkstra's algorithm presentation
Dijkstra's algorithm presentationDijkstra's algorithm presentation
Dijkstra's algorithm presentation
 
I.BEST FIRST SEARCH IN AI
I.BEST FIRST SEARCH IN AII.BEST FIRST SEARCH IN AI
I.BEST FIRST SEARCH IN AI
 
Travelling salesman dynamic programming
Travelling salesman dynamic programmingTravelling salesman dynamic programming
Travelling salesman dynamic programming
 
UNIT - I PROBLEM SOLVING AGENTS and EXAMPLES.pptx.pdf
UNIT - I PROBLEM SOLVING AGENTS and EXAMPLES.pptx.pdfUNIT - I PROBLEM SOLVING AGENTS and EXAMPLES.pptx.pdf
UNIT - I PROBLEM SOLVING AGENTS and EXAMPLES.pptx.pdf
 
Graph coloring problem
Graph coloring problemGraph coloring problem
Graph coloring problem
 
A Star Search
A Star SearchA Star Search
A Star Search
 
Artificial Intelligence Searching Techniques
Artificial Intelligence Searching TechniquesArtificial Intelligence Searching Techniques
Artificial Intelligence Searching Techniques
 
Backtracking
BacktrackingBacktracking
Backtracking
 
Graph coloring problem(DAA).pptx
Graph coloring problem(DAA).pptxGraph coloring problem(DAA).pptx
Graph coloring problem(DAA).pptx
 
Breadth First Search & Depth First Search
Breadth First Search & Depth First SearchBreadth First Search & Depth First Search
Breadth First Search & Depth First Search
 
strassen matrix multiplication algorithm
strassen matrix multiplication algorithmstrassen matrix multiplication algorithm
strassen matrix multiplication algorithm
 
Informed search
Informed searchInformed search
Informed search
 
A* Search Algorithm
A* Search AlgorithmA* Search Algorithm
A* Search Algorithm
 
9. chapter 8 np hard and np complete problems
9. chapter 8   np hard and np complete problems9. chapter 8   np hard and np complete problems
9. chapter 8 np hard and np complete problems
 
Shortest Path in Graph
Shortest Path in GraphShortest Path in Graph
Shortest Path in Graph
 
A star algorithms
A star algorithmsA star algorithms
A star algorithms
 
Red black tree
Red black treeRed black tree
Red black tree
 

Viewers also liked

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)
Mohanlal Sukhadia University (MLSU)
 
Polygon filling
Polygon fillingPolygon filling
Risc & cisk
Risc & ciskRisc & cisk
Modular programming
Modular programmingModular programming
Protection
ProtectionProtection
Knapsack problem using fixed tuple
Knapsack problem using fixed tupleKnapsack problem using fixed tuple
Knapsack problem using fixed tuple
Mohanlal Sukhadia University (MLSU)
 

Viewers also liked (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
 

Similar to 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) Questions
RESHAN 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.docx
whittemorelucilla
 
Algorithm Homework Help
Algorithm Homework HelpAlgorithm Homework Help
Algorithm Homework Help
Programming Homework Help
 
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* Search
IOSR 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.docx
gilpinleeanna
 
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 2x2
MuradAmn
 
Answers withexplanations
Answers withexplanationsAnswers withexplanations
Answers withexplanations
Gopi Saiteja
 
Sorting2
Sorting2Sorting2
Sorting2
Saurabh Mishra
 
Network Design Assignment Help
Network Design Assignment HelpNetwork Design Assignment Help
Network Design Assignment Help
Computer Network 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
appasami
 
Graphs
GraphsGraphs
preTEST2A MAT225 Multivariable Calculus
preTEST2A MAT225 Multivariable CalculuspreTEST2A MAT225 Multivariable Calculus
preTEST2A MAT225 Multivariable Calculus
A Jorge Garcia
 
2020 preTEST2A
2020 preTEST2A2020 preTEST2A
2020 preTEST2A
A Jorge Garcia
 
test pre
test pretest pre
test pre
farazch
 
preTEST2A Solution MAT225 Multivariable Calculus
preTEST2A Solution MAT225 Multivariable CalculuspreTEST2A Solution MAT225 Multivariable Calculus
preTEST2A Solution MAT225 Multivariable Calculus
A Jorge Garcia
 
preTEST3A Double Integrals
preTEST3A Double IntegralspreTEST3A Double Integrals
preTEST3A Double Integrals
A Jorge Garcia
 

Similar to 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
 

Recently uploaded

Orion Air Quality Monitoring Systems - CWS
Orion Air Quality Monitoring Systems - CWSOrion Air Quality Monitoring Systems - CWS
Orion Air Quality Monitoring Systems - CWS
Columbia Weather Systems
 
Comparative structure of adrenal gland in vertebrates
Comparative structure of adrenal gland in vertebratesComparative structure of adrenal gland in vertebrates
Comparative structure of adrenal gland in vertebrates
sachin783648
 
Leaf Initiation, Growth and Differentiation.pdf
Leaf Initiation, Growth and Differentiation.pdfLeaf Initiation, Growth and Differentiation.pdf
Leaf Initiation, Growth and Differentiation.pdf
RenuJangid3
 
Hemoglobin metabolism_pathophysiology.pptx
Hemoglobin metabolism_pathophysiology.pptxHemoglobin metabolism_pathophysiology.pptx
Hemoglobin metabolism_pathophysiology.pptx
muralinath2
 
EY - Supply Chain Services 2018_template.pptx
EY - Supply Chain Services 2018_template.pptxEY - Supply Chain Services 2018_template.pptx
EY - Supply Chain Services 2018_template.pptx
AlguinaldoKong
 
insect taxonomy importance systematics and classification
insect taxonomy importance systematics and classificationinsect taxonomy importance systematics and classification
insect taxonomy importance systematics and classification
anitaento25
 
What is greenhouse gasses and how many gasses are there to affect the Earth.
What is greenhouse gasses and how many gasses are there to affect the Earth.What is greenhouse gasses and how many gasses are there to affect the Earth.
What is greenhouse gasses and how many gasses are there to affect the Earth.
moosaasad1975
 
Nucleic Acid-its structural and functional complexity.
Nucleic Acid-its structural and functional complexity.Nucleic Acid-its structural and functional complexity.
Nucleic Acid-its structural and functional complexity.
Nistarini College, Purulia (W.B) India
 
Cancer cell metabolism: special Reference to Lactate Pathway
Cancer cell metabolism: special Reference to Lactate PathwayCancer cell metabolism: special Reference to Lactate Pathway
Cancer cell metabolism: special Reference to Lactate Pathway
AADYARAJPANDEY1
 
Body fluids_tonicity_dehydration_hypovolemia_hypervolemia.pptx
Body fluids_tonicity_dehydration_hypovolemia_hypervolemia.pptxBody fluids_tonicity_dehydration_hypovolemia_hypervolemia.pptx
Body fluids_tonicity_dehydration_hypovolemia_hypervolemia.pptx
muralinath2
 
PRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATION
PRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATIONPRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATION
PRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATION
ChetanK57
 
Citrus Greening Disease and its Management
Citrus Greening Disease and its ManagementCitrus Greening Disease and its Management
Citrus Greening Disease and its Management
subedisuryaofficial
 
(May 29th, 2024) Advancements in Intravital Microscopy- Insights for Preclini...
(May 29th, 2024) Advancements in Intravital Microscopy- Insights for Preclini...(May 29th, 2024) Advancements in Intravital Microscopy- Insights for Preclini...
(May 29th, 2024) Advancements in Intravital Microscopy- Insights for Preclini...
Scintica Instrumentation
 
ESR_factors_affect-clinic significance-Pathysiology.pptx
ESR_factors_affect-clinic significance-Pathysiology.pptxESR_factors_affect-clinic significance-Pathysiology.pptx
ESR_factors_affect-clinic significance-Pathysiology.pptx
muralinath2
 
In silico drugs analogue design: novobiocin analogues.pptx
In silico drugs analogue design: novobiocin analogues.pptxIn silico drugs analogue design: novobiocin analogues.pptx
In silico drugs analogue design: novobiocin analogues.pptx
AlaminAfendy1
 
Hemostasis_importance& clinical significance.pptx
Hemostasis_importance& clinical significance.pptxHemostasis_importance& clinical significance.pptx
Hemostasis_importance& clinical significance.pptx
muralinath2
 
Seminar of U.V. Spectroscopy by SAMIR PANDA
 Seminar of U.V. Spectroscopy by SAMIR PANDA Seminar of U.V. Spectroscopy by SAMIR PANDA
Seminar of U.V. Spectroscopy by SAMIR PANDA
SAMIR PANDA
 
Richard's entangled aventures in wonderland
Richard's entangled aventures in wonderlandRichard's entangled aventures in wonderland
Richard's entangled aventures in wonderland
Richard Gill
 
NuGOweek 2024 Ghent - programme - final version
NuGOweek 2024 Ghent - programme - final versionNuGOweek 2024 Ghent - programme - final version
NuGOweek 2024 Ghent - programme - final version
pablovgd
 
general properties of oerganologametal.ppt
general properties of oerganologametal.pptgeneral properties of oerganologametal.ppt
general properties of oerganologametal.ppt
IqrimaNabilatulhusni
 

Recently uploaded (20)

Orion Air Quality Monitoring Systems - CWS
Orion Air Quality Monitoring Systems - CWSOrion Air Quality Monitoring Systems - CWS
Orion Air Quality Monitoring Systems - CWS
 
Comparative structure of adrenal gland in vertebrates
Comparative structure of adrenal gland in vertebratesComparative structure of adrenal gland in vertebrates
Comparative structure of adrenal gland in vertebrates
 
Leaf Initiation, Growth and Differentiation.pdf
Leaf Initiation, Growth and Differentiation.pdfLeaf Initiation, Growth and Differentiation.pdf
Leaf Initiation, Growth and Differentiation.pdf
 
Hemoglobin metabolism_pathophysiology.pptx
Hemoglobin metabolism_pathophysiology.pptxHemoglobin metabolism_pathophysiology.pptx
Hemoglobin metabolism_pathophysiology.pptx
 
EY - Supply Chain Services 2018_template.pptx
EY - Supply Chain Services 2018_template.pptxEY - Supply Chain Services 2018_template.pptx
EY - Supply Chain Services 2018_template.pptx
 
insect taxonomy importance systematics and classification
insect taxonomy importance systematics and classificationinsect taxonomy importance systematics and classification
insect taxonomy importance systematics and classification
 
What is greenhouse gasses and how many gasses are there to affect the Earth.
What is greenhouse gasses and how many gasses are there to affect the Earth.What is greenhouse gasses and how many gasses are there to affect the Earth.
What is greenhouse gasses and how many gasses are there to affect the Earth.
 
Nucleic Acid-its structural and functional complexity.
Nucleic Acid-its structural and functional complexity.Nucleic Acid-its structural and functional complexity.
Nucleic Acid-its structural and functional complexity.
 
Cancer cell metabolism: special Reference to Lactate Pathway
Cancer cell metabolism: special Reference to Lactate PathwayCancer cell metabolism: special Reference to Lactate Pathway
Cancer cell metabolism: special Reference to Lactate Pathway
 
Body fluids_tonicity_dehydration_hypovolemia_hypervolemia.pptx
Body fluids_tonicity_dehydration_hypovolemia_hypervolemia.pptxBody fluids_tonicity_dehydration_hypovolemia_hypervolemia.pptx
Body fluids_tonicity_dehydration_hypovolemia_hypervolemia.pptx
 
PRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATION
PRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATIONPRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATION
PRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATION
 
Citrus Greening Disease and its Management
Citrus Greening Disease and its ManagementCitrus Greening Disease and its Management
Citrus Greening Disease and its Management
 
(May 29th, 2024) Advancements in Intravital Microscopy- Insights for Preclini...
(May 29th, 2024) Advancements in Intravital Microscopy- Insights for Preclini...(May 29th, 2024) Advancements in Intravital Microscopy- Insights for Preclini...
(May 29th, 2024) Advancements in Intravital Microscopy- Insights for Preclini...
 
ESR_factors_affect-clinic significance-Pathysiology.pptx
ESR_factors_affect-clinic significance-Pathysiology.pptxESR_factors_affect-clinic significance-Pathysiology.pptx
ESR_factors_affect-clinic significance-Pathysiology.pptx
 
In silico drugs analogue design: novobiocin analogues.pptx
In silico drugs analogue design: novobiocin analogues.pptxIn silico drugs analogue design: novobiocin analogues.pptx
In silico drugs analogue design: novobiocin analogues.pptx
 
Hemostasis_importance& clinical significance.pptx
Hemostasis_importance& clinical significance.pptxHemostasis_importance& clinical significance.pptx
Hemostasis_importance& clinical significance.pptx
 
Seminar of U.V. Spectroscopy by SAMIR PANDA
 Seminar of U.V. Spectroscopy by SAMIR PANDA Seminar of U.V. Spectroscopy by SAMIR PANDA
Seminar of U.V. Spectroscopy by SAMIR PANDA
 
Richard's entangled aventures in wonderland
Richard's entangled aventures in wonderlandRichard's entangled aventures in wonderland
Richard's entangled aventures in wonderland
 
NuGOweek 2024 Ghent - programme - final version
NuGOweek 2024 Ghent - programme - final versionNuGOweek 2024 Ghent - programme - final version
NuGOweek 2024 Ghent - programme - final version
 
general properties of oerganologametal.ppt
general properties of oerganologametal.pptgeneral properties of oerganologametal.ppt
general properties of oerganologametal.ppt
 

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