1

In this question the author asked what algorithms compute directions from point A to point B on a map and the answer was

Dijkstra's does work, with a couple of modifications

But I am also curious about the algorithms used in naming the different alternatives. In this example you can see that the each of the three alternatives got distinct descriptive name. I am curious here how did they get the names? did they just choose the road with the biggest covered distance?

Community
  • 1
  • 1
m.awad
  • 187
  • 2
  • 13

1 Answers1

0

I am not an expert and didn't work at a mapping company like Nick Johnson (from the accepted answer in the question you linked) did. But I think there is nothing more complex here.

In addition to the modifications Nick described, it is also possible to generalize Dijkstra in order to get the K shortest path routing.

The naming of the routes is probably done simply by adding names to the edges of the input graph. Then, you just need to look at the highest layers (as Nick described) in order to get the main path names.

If you want the differences between the three you can always do some kind of subtraction between routes in order to find the sub-route the differ one from the others.

A. Sarid
  • 3,916
  • 2
  • 31
  • 56
  • 1
    That is what I also thought that there is nothing more complex here. But since stackoverflow exists its nice to see if someone out there thinks otherwise. – m.awad Sep 25 '16 at 16:46