24.5 Exercises
Last updated
Last updated
Questions 1 and 2, suppose we run Dijkstra's from A. Break ties alphabetically. Breaking ties alphabetically means that if we insert B into the fringe, and C is in the fringe with the same priority, we have a tie! To break this tie, we will do so alphabetically, putting B before C.
What is the order that vertices are visited? Please separate vertices with spaces, e.g. A B C ....
Select all the edges in the shortest paths tree. *
For questions 3-5, suppose we run A* from A to D. Break ties alphabetically
What is the order that vertices are visited? Note that not all vertices need be visited. Please separate vertices with spaces, e.g. A B C ....
Select all the edges in the shortest path from A -> D, as determined by A*. Note that this may not be the correct shortest path. Also note that we are NOT finding the shortest path tree, but just the edges on the shortest path!
In the previous question, you probably noticed that the actual shortest path from A -> D was not found! The reason for this is because the value of one heuristic is too high. Determine which heuristic this is, and what is the maximum its value can be so that A* returns the correct shortest path.