Brandes Algorithm

I read about the "Center of Interdependence" based on the Brandes algorithm . I have some questions regarding the algorithm

  • Does this algorithm determine exact centrality or approximation? When I run BC on Sage, which is based on the Brandes algorithm , it did not give an exact value. For example, instead of 14, I got 13.9956 ......

  • Can someone explain the section “Accumulation of steam dependencies” in simpler terms?

  • What to do when for "We need to maintain a dependency for each vertex and lists of predecessors." Is this done when executing Dijkstra's algorithm?

  • What to do for weighted charts?

+6
source share
1 answer
  • Brandes' algorithm gives the exact centrality of each vertex. I do not know which implementation of the algorithm is used in Sage, but most likely this is a problem of accuracy.

  • The accumulation of part of the algorithm is probably the most difficult. When you reach this part, you will get in sigma the number of shortest paths from the current vertex s to the remaining vertices. In addition, in Pred, you have for each vertex a list of vertices that reach them along the shortest path. The delta of the dependence will be equal to the magnitude of the internode, which will contribute to the rest of the vertices (from 0 to N-2), i.e. Depends on s of each vertex.

    The vertex w is deduced from S to empty, starting with the farthest of s and ending with s itself (remember that the vertex was added to S when it was reached in the shortest path for calculating the algorithm), For each v in the list of predecessors w ( Pred [w]) a new value is calculated for the dependencies and that (for me) is the hard part.

    The expression says that delta [v] = delta [v] + (sigma [v] / sigma [w]) * (1 + delta [w]), or, in other words, the new dependence for v is the dependence on what it already has a plus (sigma [v] / sigma [w]) * (1 + delta [w]). Well, first of all, note that when the vertex w is knocked out of S, its entire dependence delta [w] is calculated, because there will be no more future nodes w, therefore it cannot be in the middle of any other shortest path. Then it should be clear that (sigma [v] / sigma [w]) is the dependence of the pair (s, w) on v, i.e. Depends on the fact that the vertices s and w of v remain connected (since this is the fraction of the shortest paths from s to w passing through v). But (and this is the less obvious part, I think), the vertex v is not only in the shortest paths between s and w, but also in all the shortest paths in which w! Thus, if there was a short path from s to some vertex x passing through w, then there should be a path from s to x passing through v. Simply put, s would be more dependent on v if it depended on w. Thus, the coefficient (1 + delta [w]) is explained as follows: 1 for the dependence of v of the pair (s, w) and delta [w] on the dependence v of each pair (s, & lt, any vertex outside w>).

    Finally, delta [w] is added to its total difference Cb [w] (if w == s, since s is not considered to be dependent on itself).

    As I said, this is not a simple algorithm to understand at a glance. Do not rush and comment if you still have doubts.

  • I'm not quite sure what you mean here. If you ask how you can get a list of predecessors from the output of Dijkstra's algorithm, well, you cannot, at least not directly. If you want to implement this algorithm using the pre-existing Dijkstra algorithm, you cannot, unless this algorithm allows someone to visit during its execution, for example, the implementation of the Boost Graph Dijkstra library. Btw, this library already implements this algorithm ( see here ) and even the distributed / parallel version ( here and here ) if you are interested.

  • There are (at least) two ways of estimating the weight in calculating the internode (I assume that you mean the edge weight): as a “length”, so it affects the calculation of the shortest paths and as “importance” or “multiplicity” (for example, the number of times a link appears). Brandes himself offers several options for these and other cases on his paper on options for the centrality of the shortest path and their general calculations , algorithms 10 (for "length") and 11 (for "multiplicity"). Note that there is an error in algorithm 11 of this article, which is explained in the Brandes publications page (find the title of the article in the list).

+6
source

All Articles