I am currently working on the following problem: for a given graph G = (V, E), I use the Dijkstra Algorithm to find the shortest distance d i for each node v i β V from startnode v 0 .
Now I want to find node * v ** for which the sum of all nodes of the shortest distances Ξ£d i from this node is minimized.
In the following example, startnode v 0 is yellow and obviously has a distance of 0. The shortest distances are given for all other nodes.

In the first figure (the initial level in the lower left corner), the sum of all shortest distances is
Ξ£d i = 1 + 2 + 2 + 2 + 3 + 3 + 3 = 16

In the second figure (starting number in the middle), the sum of all shortest distances is
Ξ£d i = 1 + 1 + 1 + 2 + 2 + 2 + 2 = 11
The edge-weights are floats, in the example for simplicity they are chosen equal to 1.
Honestly, I could try each node to find the minimum, but this, of course, is too slow. I canβt wait for you to hear your ideas !:-)
source share