Reweighting a graph for faster shortest paths(11011110.livejournal.com) |
Reweighting a graph for faster shortest paths(11011110.livejournal.com) |
f(n) = g(n) + h(n)
where g(n) is the actual traversed distance from the start to n, and h(n) is an (optimistic) approximation of the distance from n to the goal. Now, without making any other modifications to the algorithm, if we substitute g(n) = 0
what we get is the greedy "best-first" search [1]. If, on the other hand, we select h(n) = 0
we get a single-goal variant of Dijkstra's algorithm [2].http://research.microsoft.com/en-us/people/goldberg/erice.pd...
There are example with maps overlaid with the nodes visited by each algorithm before finding the solution. The difference between Dijkstra, A* and landmarks-based algorithms is impressive!