問題文
A team plans to use the A* shortest path algorithm on their route graph. What does the implementation require of the data?
選択肢
- Node properties holding longitudes and latitudes, since the heuristic function is the haversine formula, and relationship weights that represent distance on the same scale.
- Nothing beyond positive relationship weights, since the heuristic is derived from the structure of the projected graph and the weights that it carries.
- A relationship property holding the estimated remaining cost for each relationship, which the algorithm combines with the distance already computed when it decides which node to continue the search from.
- A node property holding the exact distance to the target, so the heuristic can read it at each step of the search it performs.