Answered step by step
Verified Expert Solution
Question
00
1 Approved Answer
Sometimes the number of decisions is not the appropriate measure to use in looking for a goal. For example, suppose we have a map of
Sometimes the number of decisions is not the appropriate measure to use in looking for a goal. For example, suppose we have a map of highways with mileages between highway intersections. The goal is to find the shortest route between intersections A and Ba Explainhowasearchgraphcanbeconstructedwheretheverticesarein tersections and each edge has a cost equal to the number of miles.b Show how this leads to a search tree with a the root labeled Ab all goals labeled Bc a cost for each edge equal to mileage, and d the aim of finding that path from the root to a B for which the sum of the edge weights is a minimum. We can associate with each vertex v a cost Cv that equals the sum of the edge weights on the path from the root to vThe path is unique since we are in a tree.c We can generalize the previous part to a search tree in which each vertex v has an associated cost and costs increase as we move downward. Modify the breadthfirst algorithm to produce a bestfirst algorithm that finds the leastcost goal.Hint. Always remove the vertex with the least cost from A and do not check whether a vertex is a goal until you remove it from Ad Prove that the algorithm you have given does in fact find the least cost goaL
Sometimes the number of decisions is not the appropriate measure to use in looking for a goal. For example, suppose we have a map of highways with mileages between highway intersections. The goal is to find the shortest route between intersections A and Ba Explainhowasearchgraphcanbeconstructedwheretheverticesarein tersections and each edge has a cost equal to the number of miles.b Show how this leads to a search tree with a the root labeled Ab all goals labeled Bc a cost for each edge equal to mileage, and d the aim of finding that path from the root to a B for which the sum of the edge weights is a minimum. We can associate with each vertex v a cost Cv that equals the sum of the edge weights on the path from the root to vThe path is unique since we are in a tree.c We can generalize the previous part to a search tree in which each vertex v has an associated cost and costs increase as we move downward. Modify the breadthfirst algorithm to produce a bestfirst algorithm that finds the leastcost goal.Hint. Always remove the vertex with the least cost from A and do not check whether a vertex is a goal until you remove it from Ad Prove that the algorithm you have given does in fact find the least cost goaL
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started