0% found this document useful (0 votes)
19 views

27-1. Connected Components Biconnected Components

The document discusses connected and biconnected components in graphs, explaining the concepts of connectivity, articulation points, and the conditions for a graph to be biconnected. It details how to identify articulation points and biconnected components using depth-first search and outlines their significance in network vulnerabilities. Additionally, it highlights the applications of these concepts in networking, particularly in identifying critical routers in a network.

Uploaded by

Rohan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

27-1. Connected Components Biconnected Components

The document discusses connected and biconnected components in graphs, explaining the concepts of connectivity, articulation points, and the conditions for a graph to be biconnected. It details how to identify articulation points and biconnected components using depth-first search and outlines their significance in network vulnerabilities. Additionally, it highlights the applications of these concepts in networking, particularly in identifying critical routers in a network.

Uploaded by

Rohan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 21

Connected Components and

Biconnected Components

1
Connected Component
 Connectivity in an undirected graph means that every vertex can reach every
other vertex via any path. If the graph is not connected the graph can be
broken down into Connected Components.
 Strong Connectivity applies only to directed graphs. A directed graph is
strongly connected if there is a directed path from any vertex to every other
vertex. This is same as connectivity in an undirected graph, the only
difference being strong connectivity applies to directed graphs and there
should be directed paths instead of just paths. Like connected components, a
directed graph can be broken down into Strongly Connected Components.
 A connected component of an undirected graph
is a maximal connected subgraph.
 A tree is a graph that is connected and acyclic.
 A directed graph is strongly connected if there
is a directed path from vi to vj and also
from vj to vi.

2
*Figure 6.5: A graph with two connected components
connected component (connected subgraph)

H1 0 H2 4

2 1 5

3 6

G4 (not connected)
3
*Figure 6.6: Strongly connected components of G3

strongly connected component


not strongly connected (strongly connected subgraph)

0
0

1
2
G3

4
Connected Component
Strong connectivity and equivalence relations

In undirected graphs, two vertices are connected if they have a path connecting them. How should we define
connected in a directed graph? We say that a vertex a is strongly connected to b if there exist two paths, one from
a to b and another from b to a. Note that we allow the two paths to share vertices or even to share edges. We will
use a ~ b as shorthand for "a is strongly connected to b". We will allow very short paths, with one vertex and no
edges, so that any vertex is strongly connected to itself.
Recall that a relation is another word for a collection of pairs of objects (if you like, you can think of a relation as
being a directed graph, but not the same one we're using to define connectivity). An equivalence relation a # b is a
relation that satisfies three simple properties:
•Reflexive property: For all a, a # a. Any vertex is strongly connected to itself, by definition.
•Symmetric property: If a # b, then b # a. For strong connectivity, this follows from the symmetry of the
definition. The same two paths (one from a to b and another from b to a) that show that a ~ b, looked at in the
other order (one from b to a and another from a to b) show that b ~ a.
•Transitive property: If a # b and b # c, then a # c. Let's expand this out for strong connectivity: if a ~ b and b ~
c, we have four paths: a-b, b-a, b-c, and c-b. Concatenating them in pairs a-b-c and c-b-a produces two paths
connecting a-c and c-a, so a ~ c, showing that the transitive property holds for strong connectivity.
5
Since all three properties are true of strong connectivity, strong connectivity is an equivalence relation.
Connected Components

adjacency list: O(n+e) 6


adjacency matrix: O(n2)
Articulation Point
In a graph, a vertex is called an articulation point if removing it
and all the edges associated with it results in the increase of the
number of connected components in the graph. For example
consider the graph given in following figure.

If in the above graph, vertex 1 and all the edges associated with
it, i.e. the edges 1-0, 1-2 and 1-3 are removed, there will be no
path to reach any of the vertices 2, 3 or 4 from the vertices 0 and
5, that means the graph will split into two separate components. 7
One consisting of the vertices 0 and 5 and another one consisting
of the vertices 2, 3 and 4 as shown in the following figure.
Articulation Point
• Likewise removing the vertex 0 will disconnect the vertex 5
from all other vertices. Hence the given graph has two
articulation points: 0 and 1.

• Articulation Points represents vulnerabilities in a network. In


order to find all the articulation points in a given graph, the
brute force approach is to check for every vertex if it is an
articulation point or not, by removing it and then counting the
number of connected components in the graph. If the number
of components increases, then the vertex under consideration
is an articulation point otherwise not. 8
Articulation Point for internal
vertex u
 Consider an internal vertex u
– Not a leaf,
– Assume it is not the root

u
 Let v1, v2,…, vk denote the
children of u
– Each is the root of a subtree of DFS

– If for some child, there is no back


edge from any node in this subtree Here u is an
articulation point
going to a proper ancestor of u, then u
is an articulation point
internal vertex u

u  Here u is not an articulation


point
– A back edge from every
subtree of u to proper
ancestors of u exists
What if u is a leaf
 A leaf is never an articulation point
 A leaf has no subtrees..
What about the root?
 the root is an articulation point if an only if
it has two or more children.
– Root has no proper ancestor
– There are no cross edges between its subtrees

This root is an
articulation point
Important Point
Forward Edge: It is an edge (u, v) such that v is descendant
but not part of the DFS tree.
Back edge: It is an edge (u, v) such that v is ancestor of edge
u but not part of DFS tree.
Presence of back edge indicates a cycle in directed graph.
Cross Edge: It is a edge which connects two node such that
they do not have any ancestor and a descendant relationship
between them.
How to find articulation
points?
[Step 1.]
Find the depth-first spanning tree T for G
[Step 2.]
Add back edges in T
[Step 3.]
Determine DFN(i) and L(i) DFN(i): the visiting
sequence of vertices i by depth first search L(i): the
least DFN reachable from i through a path
consisting of zero or more tree edges followed by
zero or one back edge
[Step 4.]
Vertex i is an articulation point of G if and only if
either: i is the root of T and has at least two
children i is not the root and has a child j for which
L(j)>=DFN(i) 14
How to find articulation
points?

15
Find biconnected component of a connected undirected graph
by depth first spanning tree
nontree
0 edge
3 (back edge)
4 0 9 8 9 8 1 5
nontree 4 5
7 7 edge
3 1
0 5 (back edge) 2 2 6 6
2 2 3 5 3
1 7 7
dfn
depth 8 9
4 6
first 4 0 9 8
1 6
number
(a) depth first spanning tree (b)
If u is an ancestor of v then dfn(u) < dfn(v).
16
*Figure 6.24: dfn and low values for dfs spanning tree with root =3
0
Vertax 0 1 2 3 4 5 6 7 8 9
dfn 4 3 2 0 1 5 6 7 9 8
low 4 0 0 0 0 5 5 5 9 8

***low, for each vertex of G such that low (u) is the lowest depth
first number that we can reach from u using a path of descendants
followed by at most one back edge

low(u)=min{dfn(u), min{low(w)|w is a child of u},


min{dfn(w)|(u,w) is a back edge}

u: articulation point : 1, 3, 5, 7
low(child)  dfn(u) 17
Biconnected Components
Before Biconnected Components, let's first try to understand
what a Biconnected Graph is and how to check if a given graph
is Biconnected or not.
A graph is said to be Biconnected if:
1.It is connected, i.e. it is possible to reach every vertex from
every other vertex, by a simple path.
2.Even after removing any vertex the graph remains connected.
For example, consider the graph in the following figure

18
Biconnected Components
The given graph is clearly connected. Now try removing the
vertices one by one and observe. Removing any of the vertices
does not increase the number of connected components. So the
given graph is Biconnected.
Now consider the following graph which is a slight modification
in the previous graph.

Now what to look for in a graph to check if it's Biconnected. By


now it is said that a graph is Biconnected if it has no vertex such
that its removal increases the number of connected components
in the graph. And if there exists such a vertex then it is not
Biconnected. A vertex whose removal increases the number of
connected components is called an Articulation Point.
So simply check if the given graph has any articulation point or
not. If it has no articulation point, then it is Biconnected 19
otherwise not.
Biconnected Components
A biconnected component of a connected undirected graph is a maximal biconnected
subgraph, H, of G. By maximal, we mean that G contains no other subgraph that is both
biconnected and properly contains H. For example, the graph of following Figure contains
the six biconnected components shown in following Figure . It is easy to verify that two
biconnected components of the same graph have no more than one vertex in common.
This means that no edge can be in two or more biconnected components of a graph.
Hence, the biconnected components of G partition the edges of G. We can find the
biconnected components of a connected undirected graph, G, by using any depth first
spanning tree of G.
Applications
Application:
• Networking A computer network can be modeled
as a graph, where vertices are routers and edges
are network connections between edges.
• A router can be considered critical if it can
disconnect the network for that router to fail. It
would be nice to identify which routers are
critical. We can do such an identification by
solving the biconnected components problem.

You might also like