Transportation Geography and Network Science/Centrality

Summary
There are a variety of networks in transportation geography, such as the airline networks, road networks, and canal networks. One important question is how to measure these networks. If we focus on properties of the nodes, the questions can be: how important are certain nodes? And how to quantify their importance?

Centrality measures are often used to measure a node's importance. There are three major categories: degree centrality, closeness centrality, and betweenness centrality.

Degree centrality
Degree centrality measures the importance of a node by the number of edges (degree) the node has. The idea is that a node with more edges is more important. Mathematically, for node j, its degree centrality is calculated as the number of its degrees divided by n-1, where n is the total number of edges in the graph.

Closeness centrality
Closeness centrality measures the importance of a node by its geodesic distance to other nodes. The idea is that the closer a node is to other nodes, the important the node is. Mathematically it is calculated as the reciprocal of the sum of geodesic distances to all other nodes.

Betweenness centrality
Betweenness centrality measures the importance of a node by its proportion of paths between other nodes. The idea is that a node that plays the roles of connecting more other nodes is more important. Mathematically, the betweenness centrality of node j is calculated as the proportion of shortest paths from one node s to another node node t that passes through j.

A thought experiment
Which centrality measures will you use for answering the following questions? .


 * If I need to recruit 10 people for my newly found organization, whom should I consider?
 * If I am to pass on a message to three people in this network so that they in turn convey it to their friends and so on. Which three people should I select?
 * If I am to rank all my friends based on how "central" they are in this network, how would I go about?
 * If I am to nominate a leader for this team of 500, whom should I pick?

Technical Discussion
Adapted from Wikipedia article on Centrality

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. For a review as well as generalizations to weighted networks, see Opsahl et al. (2010).

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.

For a graph $$G:=(V,E)$$ with n vertices, the degree centrality $$C_D(v)$$ for vertex $$v$$ is:


 * $$C_D(v)= \frac{\text{deg}(v)}{n-1}$$

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

The definition of centrality can be extended to graphs. Let $$v*$$ be the node with highest degree centrality in $$G$$. Let $$X:=(Y,Z)$$ be the $$n$$ node connected graph that maximizes the following quantity (with $$y*$$ being the node with highest degree centrality in $$X$$):


 * $$H= \displaystyle{\sum^{|Y|}_{j=1}{C_D(y*)-C_D(y_j)}}$$

Then the degree centrality of the graph $$G$$ is defined as follows:


 * $$C_D(G)= \frac{\displaystyle{\sum^{|V|}_{i=1}{[C_D(v*)-C_D(v_i)]}}}{H}$$

$$H$$ is maximized when the graph $$X$$ contains one node that is connected to all other nodes and all other nodes are connected only to this one central node (a star graph). In this case
 * $$H=(n-1)(1-\frac{1}{n-1})=n-2$$

so the degree centrality of $$G$$ reduces to:
 * $$C_D(G)= \frac{\displaystyle{\sum^{|V|}_{i=1}{[C_D(v*)-C_D(v_i)]}}}{n-2}$$

Betweenness centrality


Betweenness is a centrality measure of a vertex within a graph (there is also edge betweenness, which is not discussed here). Vertices that occur on many shortest paths between other vertices have higher betweenness than those that do not.

For a graph $$G:=(V,E)$$ with n vertices, the betweenness $$C_B(v)$$ for vertex $$v$$ is computed as follows:

1. For each pair of vertices (s,t), compute all shortest paths between them.

2. For each pair of vertices (s,t), determine the fraction of shortest paths that pass through the vertex in question (here, vertex v).

3. Sum this fraction over all pairs of vertices (s,t).

Or, more succinctly:


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

where $$\sigma_{st}$$ is the number of shortest paths from s to t, and $$\sigma_{st}(v)$$ is the number of shortest paths from s to t that pass through a vertex v. This may be normalized by dividing through the number of paths that are examined, which is $$(n-1)(n-2).$$ For undirected graphs, only one of the directions between each pair of vertices has to be examined, so only $$(n-1)(n-2)/2$$ paths in total, which is also the number of pairs of vertices not including v. For example, in an undirected star graph, the center vertex (which is contained in every possible shortest path) would have a betweenness of $$(n-1)(n-2)/2$$ (1, if normalised) while the leaves (which are contained in no shortest paths) would have a betweenness of 0.

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(V^3)$ time with the Floyd–Warshall algorithm, modified to not only find one but count all shortest paths between two nodes. On a sparse graph, Johnson's algorithm may be more efficient, taking $O(V^2 \log V + V E)$ time. On unweighted graphs, calculating betweenness centrality takes $O(V E)$ time using Brandes' algorithm.

In calculating betweenness and closeness centralities of all vertices in a graph, it is assumed that graphs are undirected and connected with the allowance of loops and multiple edges. When specifically dealing with network graphs, oftentimes graphs are without loops or multiple edges to maintain simple relationships (where edges represent connections between two people or vertices). In this case, using Brandes' algorithm will divide final centrality scores by 2 to account for each shortest path being counted twice.

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{\displaystyle \sum_{t \in V\setminus v}d_G(v,t)}{n-1}$$

where $$n\ge 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 way the information communicated is the same (this time estimating the speed instead of the timespan). The closeness $$C_C(v)$$ for a vertex $$v$$ is the reciprocal of the sum of geodesic distances to all other vertices of V :


 * $$C_C(v)=\frac{1}{\sum_{t \in V\setminus v}d_G(v,t)}.$$

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(v)=\sum_{t \in V\setminus v}2^{-d_G(v,t)}.$$

An extension to networks with disconnected components has been proposed by Opsahl (2010).

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 $$i^{th}$$ node. Let $$A_{i,j}$$ be the adjacency matrix of the network. Hence $$A_{i,j} = 1$$ if the $$i^{th}$$ node is adjacent to the $$j^{th}$$ node, and $$A_{i,j} = 0$$ otherwise. More generally, the entries in A can be real numbers representing connection strengths, as in a stochastic matrix.

For the $$i^{th}$$ 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{1}{\lambda} \sum_{j \in M(i)}x_j = \frac{1}{\lambda} \sum_{j = 1}^N A_{i,j}x_j$$

where $$M(i)$$ is the set of nodes that are connected to the $$i^{th}$$ node, N is the total number of nodes and $$\lambda$$ is a constant. In vector notation this can be rewritten as
 * $$\mathbf{x} = \frac{1}{\lambda}\mathbf{Ax}$$, or as the eigenvector equation $$\mathbf{Ax} = {\lambda}\mathbf{x}$$

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^{th}$$ component of the related eigenvector then gives the centrality score of the $$i^{th}$$ node in the network. Power iteration is one of many eigenvalue algorithms that may be used to find this dominant eigenvector.