Definitions

Centrality

[sen-tral-i-tee]
Within graph theory and network analysis, there are various measures of the centrality of a vertex within a graph that determine the relative importance of a vertex within the graph (for example, how important a person is within a social network, or, in the theory of space syntax, how important a room is within a building or how well-used a road is within an urban network).

There are four measures of centrality that are widely used in network analysis: degree centrality, betweenness, closeness, and eigenvector centrality.

Degree centrality

The first, and simplest, is degree centrality. Degree centrality is defined as the number of links incident upon a node (i.e., the number of ties that a node has). Degree is often interpreted in terms of the immediate risk of node for catching whatever is flowing through the network (such as a virus, or some information). If the network is directed (meaning that ties have direction), then we usually define two separate measures of degree centrality, namely indegree and outdegree. Indegree is a count of the number of ties directed to the node, and outdegree is the number of ties that the node directs to others. For positive relations such as friendship or advice, we normally interpret indegree as a form of popularity, and outdegree as gregariousness.

Calculating degree centrality for all nodes $V$ in a graph takes $Theta\left(V^2\right)$ in a dense adjacency matrix representation of the graph, and for edges $E$ in a graph takes $Theta\left(E\right)$ in a sparse matrix representation.

Betweenness centrality

Betweenness is a centrality measure of a vertex within a graph. Vertices that occur on many shortest paths between other vertices have higher betweenness than those that do not.

For a graph $G:=\left(V,E\right)$ with n vertices, the betweenness $C_B\left(v\right)$ for vertex $v$ is:

$C_B\left(v\right)= sum_\left\{s neq v neq t in V atop s neq t\right\}frac\left\{sigma_\left\{st\right\}\left(v\right)\right\}\left\{sigma_\left\{st\right\}\right\}$

where $sigma_\left\{st\right\}$ is the number of shortest geodesic paths from s to t, and $sigma_\left\{st\right\}\left(v\right)$ is the number of shortest geodesic paths from s to t that pass through a vertex v. This may be normalised by dividing through by the number of pairs of vertices not including v, which is $\left(n-1\right)\left(n-2\right)$.

Calculating the betweenness and closeness centralities of all the vertices in a graph involves calculating the shortest paths between all pairs of vertices on a graph. This takes $Theta\left(V^3\right)$ time with the Floyd–Warshall algorithm. On a sparse graph, Johnson's algorithm may be more efficient, taking $O\left(V^2 log V + V E\right)$ time.

Closeness centrality

In topology and related areas in mathematics, closeness is one of the basic concepts in a topological space. Intuitively we say two sets are close if they are arbitrarily near to each other. The concept can be defined naturally in a metric space where a notion of distance between elements of the space is defined, but it can be generalized to topological spaces where we have no concrete way to measure distances.

In graph theory closeness is a centrality measure of a vertex within a graph. Vertices that are 'shallow' to other vertices (that is, those that tend to have short geodesic distances to other vertices with in the graph) have higher closeness. Closeness is preferred in network analysis to mean shortest-path length, as it gives higher values to more central vertices, and so is usually positively associated with other measures such as degree.

In the network theory, closeness is a sophisticated measure of centrality. It is defined as the mean geodesic distance (i.e the shortest path) between a vertex v and all other vertices reachable from it:

$frac\left\{displaystyle sum_\left\{t in Vsetminus v\right\}d_G\left(v,t\right)\right\}\left\{n-1\right\}$

where $nge 2$ is the size of the network's 'connectivity component' V reachable from v. Closeness can be regarded as a measure of how long it will take information to spread from a given vertex to other reachable vertices in the network.

Some define closeness to be the reciprocal of this quantity, but either ways the information communicated is the same (this time estimating the speed instead of the timespan). The closeness $C_C\left(v\right)$ for a vertex $v$ is the reciprocal of the sum of geodesic distances to all other vertices of V:

$C_C\left(v\right)=frac\left\{1\right\}\left\{sum_\left\{t in Vsetminus v\right\}d_G\left(v,t\right)\right\}.$

Different methods and algorithms can be introduced to measure closeness, like the random-walk centrality introduced by Noh and Rieger (2003) that is a measure of the speed with which randomly walking messages reach a vertex from elsewhere in the network—a sort of random-walk version of closeness centrality.

The information centrality of Stephenson and Zelen (1989) is another closeness measure, which bears some similarity to that of Noh and Rieger. In essence it measures the harmonic mean length of paths ending at a vertex i, which is smaller if i has many short paths connecting it to other vertices.

Dangalchev (2006), in order to measure the network vulnerability, modifies the definition for closeness so it can be used for disconnected graphs and the total closeness is easier to calculate :

$C_C\left(v\right)=sum_\left\{t in Vsetminus v\right\}2^\left\{-d_G\left(v,t\right)\right\}.$

Eigenvector centrality

Eigenvector centrality is a measure of the importance of a node in a network. It assigns relative scores to all nodes in the network based on the principle that connections to high-scoring nodes contribute more to the score of the node in question than equal connections to low-scoring nodes. Google's PageRank is a variant of the Eigenvector centrality measure.

Using the adjacency matrix to find eigenvector centrality

Let $x_i$ denote the score of the ith node. Let $A_\left\{i,j\right\}$ be the adjacency matrix of the network. Hence $A_\left\{i,j\right\} = 1$ if the ith node is adjacent to the jth node, and $A_\left\{i,j\right\} = 0$ otherwise. More generally, the entries in A can be real numbers representing connection strengths.

For the $i^\left\{th\right\}$ node, let the centrality score be proportional to the sum of the scores of all nodes which are connected to it. Hence

$x_i = frac\left\{1\right\}\left\{lambda\right\} sum_\left\{j in M\left(i\right)\right\}x_j = frac\left\{1\right\}\left\{lambda\right\} sum_\left\{j = 1\right\}^N A_\left\{i,j\right\}x_j$

where $M\left(i\right)$ is the set of nodes that are connected to the $i^\left\{th\right\}$ node, N is the total number of nodes and $lambda$ is a constant. In vector notation this can be rewritten as

$mathbf\left\{x\right\} = frac\left\{1\right\}\left\{lambda\right\}Amathbf\left\{x\right\}$, or as the eigenvector equation $Amathbf\left\{x\right\} = \left\{lambda\right\}mathbf\left\{x\right\}$

In general, there will be many different eigenvalues $lambda$ for which an eigenvector solution exists. However, the additional requirement that all the entries in the eigenvector be positive implies (by the Perron–Frobenius theorem) that only the greatest eigenvalue results in the desired centrality measure. The $i^\left\{th\right\}$ component of the related eigenvector then gives the centrality score of the $i^\left\{th\right\}$ node in the network. Power iteration is one of many eigenvalue algorithms that may be used to find this dominant eigenvector.