A biconnected component of a graph is a connected subgraph that cannot be broken into disconnected pieces by deleting any single node (and its incident links). An articulation point is a node of a graph whose removal would cause an increase in the number of connected components. Articulation points can be important when you analyze any graph that represents a communications network. Consider an articulation point which, if removed, disconnects the graph into two components and . All paths in G between some nodes in and some nodes in must pass through node i. In this sense, articulation points are critical to communication. Examples of where articulation points are important are airline hubs, electric circuits, network wires, protein bonds, traffic routers, and numerous other industrial applications.
In the network solver, you can find biconnected components and articulation points of an input graph by invoking the BICONCOMP option. This algorithm works only with undirected graphs.
The results for the biconnected components algorithm are written to the link-indexed numeric array that is specified in the BICONCOMP= suboption of the OUT= option. For each link in the links array, the value in this array identifies its component. The component identifiers are numbered sequentially starting from 1. The articulation points are written to the set that is specified in the ARTPOINTS= suboption of the OUT= option.
The algorithm that the network solver uses to compute biconnected components is a variant of depth-first search (Tarjan 1972). This algorithm runs in time and therefore should scale to very large graphs.
This section illustrates the use of the biconnected components algorithm on the simple undirected graph G that is shown in Figure 9.13.
The undirected graph G can be represented by the links data set LinkSetInBiCC
as follows:
data LinkSetInBiCC; input from $ to $ @@; datalines; A B A F A G B C B D B E C D E F G I G H H I ;
The following statements calculate the biconnected components and articulation points and output the results in the data sets
LinkSetOut
and NodeSetOut
:
proc optmodel; set<str,str> LINKS; read data LinkSetInBiCC into LINKS=[from to]; set NODES = union{<i,j> in LINKS} {i,j}; num bicomponent{LINKS}; set<str> ARTPOINTS; solve with NETWORK / loglevel = moderate links = (include=LINKS) biconcomp out = (biconcomp=bicomponent artpoints=ARTPOINTS) ; print bicomponent; put ARTPOINTS; create data LinkSetOut from [from to] biconcomp=bicomponent; create data NodeSetOut from [node]=ARTPOINTS artpoint=1; quit;
The data set LinkSetOut
now contains the biconnected components of the input graph, as shown in Figure 9.14.
In addition, the data set NodeSetOut
contains the articulation points of the input graph, as shown in Figure 9.15.
The biconnected components are shown graphically in Figure 9.16 and Figure 9.17.
For a more detailed example, see Example 9.1 Articulation Points in a Terrorist Network.