BetweennessCentrality

BetweennessCentrality[g]
gives a list of betweenness centralities for the vertices in the graph g.

DetailsDetails

  • BetweennessCentrality will give high centralities to vertices that are on many shortest paths of other vertex pairs.
  • BetweennessCentrality for a vertex in a connected graph is given by , where is the number of shortest paths from to and is the number of shortest paths from to passing through .
  • The ratio is taken to be zero when there is no path from to .

ExamplesExamplesopen allclose all

Basic Examples (2)Basic Examples (2)

Compute betweenness centralities:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=

Highlight:

In[3]:=
Click for copyable input
Out[3]=

Rank vertices. Highest-ranked vertices are on many shortest paths of other vertex pairs:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=
New in 8
New to Mathematica? Find your learning path »
Have a question? Ask support »