Date post: | 14-Apr-2018 |
Category: |
Documents |
Upload: | anonymous-boresf |
View: | 214 times |
Download: | 0 times |
of 14
7/27/2019 L25-Connectivity.ppt
1/14
Chapter 9: Graphs
Applications of
Depth-First Search
Mark Allen Weiss: Data Structures and Algorithm Analysis in Java
Lydia Sinapova, Simpson College
7/27/2019 L25-Connectivity.ppt
2/14
2
Graph Connectivity
Connectivity
Biconnectivity
Articulation Points and BridgesConnectivity in Directed Graphs
7/27/2019 L25-Connectivity.ppt
3/14
3
Connectivity
Definition:
An undirected graph is said to be connected
if for any pair of nodes of the graph, the twonodes are reachable from one another (i.e. there
is a path between them).
If starting from any vertex we can visit all other
vertices, then the graph is connected
7/27/2019 L25-Connectivity.ppt
4/14
4
Biconnectivity
A graph is biconnected, if there are no
vertices whose removal will disconnect the
graph.
A B
C D
E
A B
CD
E
biconnected not biconnected
7/27/2019 L25-Connectivity.ppt
5/14
5
Articulation Points
Definition: A vertex whose removal
makes the graph disconnected is called
an articulation point orcut-vertex
A B
CD
E
Cis an articulation point
We can compute articulation points
using depth-first search and a
special numbering of the vertices in
the order of their visiting.
7/27/2019 L25-Connectivity.ppt
6/14
6
Bridges
Definition:
An edge in a graph is called a bridge, if its
removal disconnects the graph.
Any edge in a graph, that does not lie on a cycle, is a bridge.
Obviously, a bridge has at least one articulation point at its end,
however an articulation point is not necessarily linked in a bridge.
A B
CD
E
(C,D) and (E,D) are bridges
7/27/2019 L25-Connectivity.ppt
7/14
7
Example 1
A B
C
EF
D
C is an articulation point, there are no bridges
7/27/2019 L25-Connectivity.ppt
8/14
8
Example 2
A B
C
EF
D
Cis an articulation point, CB is a bridge
7/27/2019 L25-Connectivity.ppt
9/14
9
Example 3
A
BC
E
F
G
D
B and C are articulation points, BC is a bridge
7/27/2019 L25-Connectivity.ppt
10/14
10
Example 4
AB C D
E
B and C are articulation points. All edges are bridges
7/27/2019 L25-Connectivity.ppt
11/14
11
Example 5A
B
C
D E
FG
Biconnected graph - no articulation points and no bridges
7/27/2019 L25-Connectivity.ppt
12/14
12
Connectivity in DirectedGraphs (I)
Definition: A directed graph is said to be
strongly connectedif for any pair of nodes there is a path
from each one to the other
A B
C D
E
7/27/2019 L25-Connectivity.ppt
13/14
13
Connectivity in DirectedGraphs (II)
Definition: A directed graph is said to be
unilaterally connected if for any pair ofnodes at least one of the nodes is reachable
from the other
A B
C D
E
Each strongly connected
graph is also unilaterally
connected.
7/27/2019 L25-Connectivity.ppt
14/14
14
Connectivity in DirectedGraphs (III)
Definition: A directed graph is said to be
weakly connected if the underlying
undirected graph is connected
A B
C
D
E
There is no path
between B and D
Each unilaterally
connected graph is also
weakly connected