This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.

# ClosenessCentrality

 ClosenessCentrality[g] gives a list of closeness centralities for the vertices in the graph g.
• ClosenessCentrality for a graph g is given as 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.
Find the closeness centrality for each vertex in a connected graph:
Closeness is computed separately for each connected component:
Find the closeness centrality for each vertex in a connected graph:
 Out[1]=

Closeness is computed separately for each connected component:
 Out[1]=
 Scope   (3)
ClosenessCentrality for undirected graphs:
Highlight the vertex with highest centrality:
Directed graphs:
Highlight the vertex with highest centrality:
Work with large graphs:
 Applications   (2)
Highlight the closeness centrality for CycleGraph:
An unbalanced tree:
Create a social network:
Find the people with more direct influence on others:
ClosenessCentrality is the inverse of average finite distances to other vertices:
An undirected graph:
A directed graph:
Closeness centrality for isolated vertices is taken to be zero:
Closeness centralities for an undirected graph are equivalent to centralities for each component:
Computing the centralities for each component yields the same result:
New in 8