ClosenessCentrality

ClosenessCentrality[g]
gives a list of closeness centralities for the vertices in the graph g.

DetailsDetails

  • ClosenessCentrality will give high centralities to vertices that are at a short average distance to every other reachable vertex.
  • ClosenessCentrality for a graph is given by , where is the average distance from vertex to all other vertices connected to .
  • If is the distance matrix, then the average distance from vertex to all connected vertices is given by , where the sum is taken over all finite and is the number of vertices connected to .
  • The closeness centrality for isolated vertices is taken to be zero.

ExamplesExamplesopen allclose all

Basic Examples (2)Basic Examples (2)

Compute closeness 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 at a short average distance to every other vertex:

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