NETWORK Procedure

Example 2.3 Betweenness and Closeness Centrality for Computer Network Topology

Consider a small network of 10 computers spread out across an office. Let a node represent a computer, and let a link represent a direct connection between the machines. For this example, consider the links as Ethernet connections that enable data to transfer between computers. If two computers are not connected directly, then the information must flow through other connected machines. Consider a topology as shown in Figure 221. This is an example of the well-known kite network, which was popularized by Krackhardt (1990) for better understanding of social networks in the workplace.

Figure 221: Office Computer Network

Office Computer Network


Define the links data table as follows:

data mylib.LinkSetInCompNet;
   input from $ to $ @@;
   datalines;
A B  A C  A D  B C  B D
B E  C D  C F  C H  D E
D F  D G  E F  E G  F G
F H  H I  I J
;

To better understand the topology of the computer network, calculate the degree, closeness, and betweenness centrality. It is also interesting to look for articulation points in the computer network to identify places of vulnerability.

proc network
   links      = mylib.LinkSetInCompNet
   outLinks   = mylib.LinkSetOut
   outNodes   = mylib.NodeSetOutCentr;
   centrality
      degree  = unweight
      close   = unweight
      between = unweight;
run;
proc network
   links      = mylib.LinkSetInCompNet
   outNodes   = mylib.NodeSetOutBiCC;
   biconnectedComponents;
run;
data mylib.NodeSetOut;
   merge mylib.NodeSetOutCentr mylib.NodeSetOutBiCC;
   by node;
run;
%put &_NETWORK_;

Output 2.3.1 shows the resulting nodes data table mylib.NodeSetOut sorted by closeness.

Output 2.3.1: Node Closeness and Betweenness Centrality, Sorted by Closeness

nodecentr_degree_outcentr_close_unwtcentr_between_unwtartpoint
C50.642860.231480
F50.642860.231480
D60.600000.101850
H30.600000.388891
B40.529410.023150
E40.529410.023150
A30.500000.000000
G30.500000.000000
I20.428570.222221
J10.310340.000000


Output 2.3.2 shows the resulting nodes data table (mylib.NodeSetOut) sorted by node betweenness.

Output 2.3.2: Node Closeness and Betweenness Centrality, Sorted by Betweenness

nodecentr_degree_outcentr_close_unwtcentr_between_unwtartpoint
H30.600000.388891
F50.642860.231480
C50.642860.231480
I20.428570.222221
D60.600000.101850
B40.529410.023150
E40.529410.023150
A30.500000.000000
G30.500000.000000
J10.310340.000000


Output 2.3.3 shows the resulting links data table (mylib.LinkSetOut) sorted by link betweenness.

Output 2.3.3: Link Betweenness Centrality, Sorted by Betweenness

fromtocentr_between_unwt
HI0.35556
CH0.23333
FH0.23333
IJ0.20000
BC0.10370
EF0.10370
AC0.10000
FG0.10000
CD0.07407
DF0.07407
AD0.06667
DG0.06667
BE0.05926
CF0.05926
BD0.04074
DE0.04074
AB0.03333
EG0.03333


The computers that have the highest closeness centrality are C and F, because they have the average shortest paths to all the other nodes. These computers are key to the efficient distribution of information across the network. Assuming that the entire office has some centralized data that should be shared with all computers, machines C and F would be the best candidates for storing the data on their local hard drives. The computer that has the highest betweenness centrality is H. Although machine H has only three connections, it is one of the most important machines in the office because it serves as the only way to reach computers I and J from the other machines in the office. Notice also that machine H is an articulation point, because removing it would disconnect the office network. In this setting, computers with high betweenness should be carefully maintained and secured with UPS (uninterruptible power supply) systems to ensure that they are always online.

Last updated: August 07, 2026