In
graph theory
In mathematics, graph theory is the study of '' graphs'', which are mathematical structures used to model pairwise relations between objects. A graph in this context is made up of '' vertices'' (also called ''nodes'' or ''points'') which are conn ...
, a biconnected component (sometimes known as a 2-connected component) is a maximal
biconnected subgraph. Any
connected graph decomposes into a
tree
In botany, a tree is a perennial plant with an elongated stem, or trunk, usually supporting branches and leaves. In some usages, the definition of a tree may be narrower, including only woody plants with secondary growth, plants that are ...
of biconnected components called the block-cut tree of the graph. The blocks are attached to each other at shared
vertices called cut vertices or separating vertices or articulation points. Specifically, a cut vertex is any vertex whose removal increases the number of
connected components.
Algorithms
Linear time depth-first search
The classic
sequential algorithm for computing biconnected components in a connected
undirected graph is due to
John Hopcroft and
Robert Tarjan
Robert Endre Tarjan (born April 30, 1948) is an American computer scientist and mathematician. He is the discoverer of several graph algorithms, including Tarjan's off-line lowest common ancestors algorithm, and co-inventor of both splay trees a ...
(1973). It runs in
linear time
In computer science, the time complexity is the computational complexity that describes the amount of computer time it takes to run an algorithm. Time complexity is commonly estimated by counting the number of elementary operations performed by t ...
, and is based on
depth-first search
Depth-first search (DFS) is an algorithm for traversing or searching tree or graph data structures. The algorithm starts at the root node (selecting some arbitrary node as the root node in the case of a graph) and explores as far as possible alo ...
. This algorithm is also outlined as Problem 22-2 of
Introduction to Algorithms
''Introduction to Algorithms'' is a book on computer programming by Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein. The book has been widely used as the textbook for algorithms courses at many universities and is ...
(both 2nd and 3rd editions).
The idea is to run a depth-first search while maintaining the following information:
# the depth of each vertex in the depth-first-search tree (once it gets visited), and
# for each vertex , the lowest depth of neighbors of all descendants of (including itself) in the depth-first-search tree, called the .
The depth is standard to maintain during a depth-first search. The low point of can be computed after visiting all descendants of (i.e., just before gets popped off the depth-first-search
stack
Stack may refer to:
Places
* Stack Island, an island game reserve in Bass Strait, south-eastern Australia, in Tasmania’s Hunter Island Group
* Blue Stack Mountains, in Co. Donegal, Ireland
People
* Stack (surname) (including a list of people ...
) as the minimum of the depth of , the depth of all neighbors of (other than the parent of in the depth-first-search tree) and the lowpoint of all children of in the depth-first-search tree.
The key fact is that a nonroot vertex is a cut vertex (or articulation point) separating two biconnected components if and only if there is a child of such that . This property can be tested once the depth-first search returned from every child of (i.e., just before gets popped off the depth-first-search stack), and if true, separates the graph into different biconnected components. This can be represented by computing one biconnected component out of every such (a component which contains will contain the subtree of , plus ), and then erasing the subtree of from the tree.
The root vertex must be handled separately: it is a cut vertex if and only if it has at least two children in the DFS tree. Thus, it suffices to simply build one component out of each child subtree of the root (including the root).
Pseudocode
GetArticulationPoints(i, d)
visited
:= true
depth
:= d
low
:= d
childCount := 0
isArticulation := false
for each ni in adj
do
if not visited
ithen
parent
i:= i
GetArticulationPoints(ni, d + 1)
childCount := childCount + 1
if low
i≥ depth
then
isArticulation := true
low
:= Min (low
low
i
else if ni ≠ parent
then
low
:= Min (low
depth
i
if (parent
≠ null and isArticulation) or (parent
= null and childCount > 1) then
Output i as articulation point
Note that the terms child and parent denote the relations in the DFS tree, not the original graph.
Other algorithms
A simple alternative to the above algorithm uses
chain decompositions, which are special ear decompositions depending on
DFS DFS may refer to:
Brands and enterprises
* Dancer Fitzgerald Sample, advertising agency, now Saatchi & Saatchi
* DFS Furniture, a furniture retailer in the United Kingdom and Ireland
* DFS Group (Duty Free Shoppers), Hong Kong
* DFS Program Excha ...
-trees.
[.] Chain decompositions can be computed in linear time by this
traversing rule. Let be a chain decomposition of . Then is 2-vertex-connected if and only if has minimum
degree
Degree may refer to:
As a unit of measurement
* Degree (angle), a unit of angle measurement
** Degree of geographical latitude
** Degree of geographical longitude
* Degree symbol (°), a notation used in science, engineering, and mathemati ...
2 and is the only
cycle
Cycle, cycles, or cyclic may refer to:
Anthropology and social sciences
* Cyclic history, a theory of history
* Cyclical theory, a theory of American political history associated with Arthur Schlesinger, Sr.
* Social cycle, various cycles in soc ...
in . This gives immediately a linear-time 2-connectivity test and can be extended to list all cut vertices of in linear time using the following statement: A vertex in a connected graph (with minimum degree 2) is a cut vertex if and only if is incident to a
bridge
A bridge is a structure built to span a physical obstacle (such as a body of water, valley, road, or rail) without blocking the way underneath. It is constructed for the purpose of providing passage over the obstacle, which is usually somethi ...
or is the first vertex of a cycle in . The list of cut vertices can be used to create the
block-cut tree of in linear time.
In the
online
In computer technology and telecommunications, online indicates a state of connectivity and offline indicates a disconnected state. In modern terminology, this usually refers to an Internet connection, but (especially when expressed "on line" o ...
version of the problem, vertices and edges are added (but not removed) dynamically, and a data structure must maintain the biconnected components.
Jeffery Westbrook Jeffery may refer to:
* Jeffery (name), including a list of people with the name
* Jeffery (automobile), an early American automobile manufacturer
* Thomas B. Jeffery Company
* Jeffery Boulevard, a major north–south street on the South Side of Ch ...
and
Robert Tarjan
Robert Endre Tarjan (born April 30, 1948) is an American computer scientist and mathematician. He is the discoverer of several graph algorithms, including Tarjan's off-line lowest common ancestors algorithm, and co-inventor of both splay trees a ...
(1992) developed an efficient data structure for this problem based on
disjoint-set data structure
In computer science, a disjoint-set data structure, also called a union–find data structure or merge–find set, is a data structure that stores a collection of Disjoint sets, disjoint (non-overlapping) Set (mathematics), sets. Equivalently ...
s. Specifically, it processes vertex additions and edge additions in total time, where is the
inverse Ackermann function
In computability theory, the Ackermann function, named after Wilhelm Ackermann, is one of the simplest and earliest-discovered examples of a total computable function that is not primitive recursive. All primitive recursive functions are total ...
. This time bound is proved to be optimal.
Uzi Vishkin
Uzi Vishkin (born 1953) is a computer scientist at the University of Maryland, College Park, where he is Professor of Electrical and Computer Engineering at the University of Maryland Institute for Advanced Computer Studies (UMIACS). Uzi Vishkin ...
and
Robert Tarjan
Robert Endre Tarjan (born April 30, 1948) is an American computer scientist and mathematician. He is the discoverer of several graph algorithms, including Tarjan's off-line lowest common ancestors algorithm, and co-inventor of both splay trees a ...
(1985) designed a
parallel algorithm
In computer science, a parallel algorithm, as opposed to a traditional serial algorithm, is an algorithm which can do multiple operations in a given time. It has been a tradition of computer science to describe serial algorithms in abstract machine ...
on CRCW
PRAM
Pram or PRAM may refer to: a bulbous growth on senior canines, varying in size, usually benign and painless. If it bursts, it will ooze pus and blood.
Places
* Pram, Austria, a municipality in the district of Grieskirchen in the Austrian state of ...
that runs in time with processors.
Related structures
Equivalence relation
One can define a
binary relation
In mathematics, a binary relation associates elements of one set, called the ''domain'', with elements of another set, called the ''codomain''. A binary relation over Set (mathematics), sets and is a new set of ordered pairs consisting of ele ...
on the edges of an arbitrary undirected graph, according to which two edges and are related if and only if either or the graph contains a
simple cycle through both and . Every edge is related to itself, and an edge is related to another edge if and only if is related in the same way to . Less obviously, this is a
transitive relation
In mathematics, a relation on a set is transitive if, for all elements , , in , whenever relates to and to , then also relates to . Each partial order as well as each equivalence relation needs to be transitive.
Definition
A hom ...
: if there exists a simple cycle containing edges and , and another simple cycle containing edges and , then one can combine these two cycles to find a simple cycle through and . Therefore, this is an
equivalence relation
In mathematics, an equivalence relation is a binary relation that is reflexive, symmetric and transitive. The equipollence relation between line segments in geometry is a common example of an equivalence relation.
Each equivalence relatio ...
, and it can be used to partition the edges into equivalence classes, subsets of edges with the property that two edges are related to each other if and only if they belong to the same equivalence class. The subgraphs formed by the edges in each equivalence class are the biconnected components of the given graph. Thus, the biconnected components partition the edges of the graph; however, they may share vertices with each other.
Block graph
The block graph of a given graph is the
intersection graph
In graph theory, an intersection graph is a graph that represents the pattern of intersections of a family of sets. Any graph can be represented as an intersection graph, but some important special classes of graphs can be defined by the types of ...
of its blocks. Thus, it has one vertex for each block of , and an edge between two vertices whenever the corresponding two blocks share a vertex.
A graph is the block graph of another graph exactly when all the blocks of are complete subgraphs. The graphs with this property are known as the
block graph
In graph theory, a branch of combinatorial mathematics, a block graph or clique tree.
is a type of undirected graph in which every biconnected component (block) is a clique.
Block graphs are sometimes erroneously called Husimi trees (after ...
s.
Block-cut tree
A cutpoint, cut vertex, or articulation point of a graph is a vertex that is shared by two or more blocks. The structure of the blocks and cutpoints of a connected graph can be described by a
tree
In botany, a tree is a perennial plant with an elongated stem, or trunk, usually supporting branches and leaves. In some usages, the definition of a tree may be narrower, including only woody plants with secondary growth, plants that are ...
called the block-cut tree or BC-tree. This tree has a vertex for each block and for each articulation point of the given graph. There is an edge in the block-cut tree for each pair of a block and an articulation point that belongs to that block.
[, p. 36.]
See also
*
Triconnected component
In graph theory, a branch of mathematics, the triconnected components of a biconnected graph are a system of smaller graphs that describe all of the 2-vertex cuts in the graph. An SPQR tree is a tree data structure used in computer science
...
*
Bridge (graph theory)
In graph theory, a bridge, isthmus, cut-edge, or cut arc is an edge of a graph whose deletion increases the graph's number of connected components. Equivalently, an edge is a bridge if and only if it is not contained in any cycle. For a connec ...
*
Single-entry single-exit In mathematics graph theory, a single-entry single-exit (SESE) region in a given graph is an ordered edge pair.
For example, with the ordered edge pair, (''a'', ''b'') of distinct control-flow edges ''a'' and ''b'' where:
#''a'' dominates ''b ...
Counter part of biconnected components in directed graphs
Notes
References
*
External links
C++ implementation of Biconnected Components
{{DEFAULTSORT:Biconnected Component
Graph connectivity
Articles with example pseudocode