Vous êtes sur la page 1sur 7

-- --

Articulation Points and Biconnected Components

Suppose you are a terrorist, seeeking to distroy a telephone network !!!

Which station would you blow up ?

b articulation point
a e

h
d
c

network of stations i
g
f

• Articulation point
- Any vertex whose removal results in a disconnected graph
- If v is an articulation point, then there exist distinct vertices w and
x such that v is in every path from w to x

• Biconnected graph
- Any graph which contains no articulation points
- Biconnected graphs have at least two vertex-disjoint paths
between any pair of vertices
- To disconnect a biconnected graph, we must remove at least two
vertices
- We can generalize the above concepts to k-connected graphs (k
vertices must be removed to disconnect the graph)
-- --

-2-

• Biconnected components of a graph


- A maximal biconnected subgraph (i.e., not contained in any larger
biconnected subgraph)
- Note that biconnected components partition the edges (not the ver-
tices !!) into disjoint sets
- DFS can be used to find the biconnected components of a graph

G
A graph
I
G
B
I
Its biconnected components
B B
C C
E E

H F J E

A D F

H F J

A D

• A brute-force approach to find articulation points


1. Delete a vertex
2. Apply DFS on the remaining vertices to see if the graph is
connected
3. Choose a new vertex and apply steps (1) and (2)
- Running time: O(V(V+E))
(not very efficient, it can be done in O(V+E) time !!!)
-- --

-3-

• Theorem: In a depth-first search tree, a vertex v, other than the root,


is an articulation point iff v is not a leaf and some subtree of v has no
back edge to a proper ancestor of v
DFS tree

v is an articulation point
since the right subtree of v
does not have a back edge
to a proper ancestor !!

(===>) Suppose that v is an articulation


There exist x and y such that v is in every path from x to y
At least one of x and y must be a descendant of v (or v will not
be in the path)
This implies that v cannot be a leaf
(proof by contradiction)
Suppose that every subtree has a back edge to an ancestor of v
Case 1: only one of the x and y is a descendant of v
y and v are in y and v are in the
different subtrees same subtree

...
y

... ...
v v

y ...

x
-- --

-4-

Case 2: both x and y are descendants of v

x and y are
descendants of v x and y are
but belong in descendants of v
different subtrees but belong in
... the same subtree
v
v cannot disconnect them
... ... in this case!!

v y

...
...

Both cases lead us to the conclusion that v is not an articulation


point (Contradiction !!)

(<===) Suppose that some subtree of v has no back edge to


a proper ancestor of v
Since v is not a leaf, there exist vertices x and y such that v is in
the path from x to y
There is only one path from x to y since there are no back edges
Removing v will disconnect x from y; thus, v is an articulation
point !!
-- --

-5-

• Algorithm (for undirected graphs)


- Apply DFS to compute the DFS tree
- Key idea: keep track of how far back in the tree one can get from
each vertex by following tree edges and certain back edges

1 A Its DFS tree


A graph

G 2 D

I
B 3 F J 10
C
4 H 9
E E

H F J 5 B
G 7
A D C
6
I 8
source

- First, assign a number to each vertex based on the time at which the
vertex is visited for the first time (discovery[v])
- Then, keep track of how back in the tree one can get from a vertex
(back[v])
- back[v] is initialized to discovery[v] in the beginning
- How should we update back[v] and how should we detect articula-
tion points ?
-- --

-6-

Case 2
Case 1 v
v

backtrack
back-edge if back[w] < discovery[v]
back[v] = min(back[v], back[w])
back[w] = min(back[w], discovery[v]) w
else if back[w] >= discovery[v]
w
v is an articulation point !!

A A
A discovery[A]=1 A
back[A]=1
D D
D discovery[D]=2
D
back[D]=2
F F
back-edge
discovery[F]=3 discovery[F]=3
F back[F]=3 F back[F]=1 discovery[E]=4
(=discovery[A])
E E
back[E]=4

B discovery[B]=5 B
back[B]=5 back-edge
discovery[C]=6
discovery[C]=6
C back[C]=6 C back[C]=4
(=discovery[E])
A A A

D D D

F F F

E backtrack E E

back[C] < discovery[B]


B discovery[B]=5 B discovery[G]=7 B
back[B]=4 G back[G]=7 G
(=back[C])
C discovery[I]=8
C C discovery[I]=8 back[I]=5
I back[I]=8 I
back-edge (=discovery[B])
-- --

-7-
A A

D D

F F

E E
backtrack
backtrack
back[G] = discovery[B]

B back[I] < discovery[G] B biconnected component


G discovery[G]=7 G
remove it from the tree
back[G]=5
C (=back[I])
C
I I
A

A A
D

D D
backtrack
F backtrack
discovery[H]=9
back[E] > discovery[F] back[H]=9
F F
back[B] = discovery[E]
E H
biconnected component
E remove it from the tree
B biconnected component
remove it from the tree

A A A

D D D
back[H] < discovery[F]
discovery[J]=10
F F F J back[J]=10
discovery[H]=9 discovery[F]=3
H back[H]=1 H back[F]=1 H
(=discovery[A]) backtrack (=back[H])
back-edge

A A A
back[F] < discovery[D]
discovery[D]=2
D D D back[D]=1
discovery[J]=10 back[J] < discovery[F] (=back[F])
back[J]=2 discovery[F]=3
F J J backtrack F J
(=discovery[D]) F back[F]=1
H H H
back-edge backtrack

A
back[D] = discovery[A]

backtrack D biconnected component


remove it from the tree

F J
H

Vous aimerez peut-être aussi