Answered step by step
Verified Expert Solution
Question
1 Approved Answer
2 . 4 . 4 . Sometimes the number of decisions is not the appropriate measure to use in looking for a goal. For example,
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
a Explain how a search graph can be constructed where the vertices are intersections 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 b all goals labeled c a cost for each edge equal to mileage, and d the aim of finding that path from the root to a for which the sum of the edge weights is a minimum. We can associate with each vertex a cost that equals the sum of the edge weights on the path from the root to The path is unique since we are in a tree.
c We can generalize the previous part to a search tree in which each vertex 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 and do not check whether a vertex is a goal until you remove it from
d 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 to Expert-Tailored 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