# Transportation Geography and Network Science/Centrality

## SummaryEdit

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 centralityEdit

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 centralityEdit

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 [1].

### Betweenness centralityEdit

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 experimentEdit

Which centrality measures will you use for answering the following questions? [2].

• 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 DiscussionEdit

Adapted from Wikipedia article on Centrality

Within w:graph theory and w: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 w:social network, or, in the theory of w:space syntax, how important a room is within a building or how well-used a road is within an w: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)[3].

### Degree centralityEdit

Main page: Degree (graph theory)

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 w:indegree and w: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 w:adjacency matrix representation of the graph, and for edges $E$ in a graph takes $\Theta(E)$ in a w: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 w: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 centralityEdit

Hue (from red=0 to blue=max) shows the node betweenness.

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:[4]

$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 w:Floyd–Warshall algorithm, modified to not only find one but count all shortest paths between two nodes. On a sparse graph, w: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[5].

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[5].

### Closeness centralityEdit

In w: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 w: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 w: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 w: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[6].

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[7]:

$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[8].

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[9].

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[10]:

$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)[11].

### Eigenvector centralityEdit

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. w:Google's w:PageRank is a variant of the Eigenvector centrality measure.

#### Using the adjacency matrix to find eigenvector centralityEdit

Let $x_i$ denote the score of the $i^{th}$ node. Let $A_{i,j}$ be the w: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 w: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 w:eigenvector equation $\mathbf{Ax} = {\lambda}\mathbf{x}$

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

## Notes and referencesEdit

1. Centrality measures http://en.wikipedia.org/wiki/Centrality
2. An introduction to centrality measures. http://sites.google.com/site/networkanalysisacourse/schedule/an-introduction-to-centrality-measures
3. Opsahl, Tore; Agneessens, Filip; Skvoretz, John (2010). "Node centrality in weighted networks: Generalizing degree and shortest paths". Social Networks 32: 245. doi:10.1016/j.socnet.2010.03.006.
4. Template:Cite thesis
5. a b Ulrik Brandes (PDF). A faster algorithm for betweenness centrality.
6. Newman, MEJ, 2003, Arxiv preprint cond-mat/0309045.
7. Sabidussi, G. (1966) The centrality index of a graph. Psychometrika 31, 581--603.
8. J. D. Noh and H. Rieger, Phys. Rev. Lett. 92, 118701 (2004).
9. Stephenson, K. A. and Zelen, M., 1989. Rethinking centrality: Methods and examples. Social Networks 11, 1–37.
10. Dangalchev Ch., Residual Closeness in Networks, Phisica A 365, 556 (2006).
11. M. E. J. Newman (PDF). The mathematics of networks. Retrieved 2006-11-09.