Examples of network centralities

The examples show images only for undirected networks.

Centrality degree

Image of a network with a node without connections

The maximum value of the degree that a node can have is n-1, where n is the number of nodes in the network. This happens when that particular node is connected with all others. In the image below 2 two vertices are connected with all the others nodes.

Image of a network, with a form of a square and an added diagonal

Centrality closeness

The maximum value that the summation can have in the process of adding nodes is when the distance keeps growing; this happens with the sum of 1+2+3+4+5+…+k, and that means creating a chain graph.

So the closeness for the nodes at the extremes of a chain graph is 2/(n*(n-1)). In the case of the image below, n is 5, so the closeness is 0.1.

Image of a chain graph labelled with closeness centrality

The minimum farness and the highest value of closeness happens when a node is adjacent to all the others. In a complete graph, all the nodes have maximum closeness. In a star graph, like the one shown below, the central node has the highest value.

Image of a star graph

Centrality Betweenness

Image of a star graph, the leaf have betweenness equals to zero and the central node has maximum betweenness

Below there is the image of the Zachary graph, labeled with betweenness.

Image of the Zachary graph labelled with betweenness

R code for the images

library(igraph)
library(ggraph)
set_graph_style()#degree
D_min = graph_from_data_frame(d = data.frame(from =c(“1”, “3”, “3”, “4”),
to = c(“2”, “1”, “4”, “1”) ),
vertices = data.frame( name = c(“1”, “2”, “3”, “4”, “5”)),
directed = F)
plot( D_min, vertex.label = degree(D_min) )D_max = make_graph( c(1,2, 2,3, 3,4, 4,1, 1,3), directed = F)
plot(D_max, vertex.label = degree(D_max))
D_full = make_full_graph(6)
plot(D_full, vertex.label = degree(D_full))
#closeness
C_chain = make_graph( c(1,2, 2,3, 3,4, 4,5), directed = F )
plot(C_chain, vertex.label = round(closeness(C_chain), digits = 2))
C_star = make_star(6, mode = “undirected”)
plot(C_star, vertex.label = round(closeness(C_star), digits = 2))
#betweenness
B = make_star(6, mode = “undirected”)
plot(B, vertex.label = round(betweenness(B), digits = 2))
Z = make_graph("Zachary")
plot(Z, layout = layout_with_fr(Z),
vertex.label = round(betweenness(Z), digits = 1))

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store