Selected Reading

Graph Theory - Cut Vertices and Bridges



Cut Vertices

A cut vertex (also known as an articulation point) in a graph is a vertex that, when removed along with its associated edges, increases the number of connected components of the graph. In other words, removing a cut vertex will disconnect the graph, splitting it into two or more disconnected subgraphs.

In a connected graph, a vertex v is a cut vertex if there exists at least one connected component that becomes disconnected when v is removed.

Cut Vertex

In this graph, vertex 1 is a cut vertex. Removing vertex 1 would result in two disconnected subgraphs: {2, 4, 5} and {3, 6}.

Characteristics of Cut Vertices

Cut vertices have various important characteristics, such as −

  • Connectivity Impact:Removing a cut vertex breaks the graph into more disconnected parts. This means the graph will have more separate groups of vertices after the cut vertex is removed.
  • Critical Nodes: Cut vertices are essential for keeping the graph connected. If a cut vertex is removed, it disrupts the connections between other vertices.
  • Existence: Not all graphs have cut vertices. Whether a graph has cut vertices depends on how its vertices and edges are arranged.

Identifying Cut Vertices

There are several methods to identify cut vertices in a graph −

  • Breadth-First Search (BFS)
  • Depth-First Search (DFS)
  • DFS Tree and Low Values
  • Tarjan's Algorithm

Breadth-First Search (BFS)

BFS is a graph traversal algorithm that explores vertices level by level. It can help identify cut vertices by checking the graph's connectivity before and after removing a vertex. If removing a vertex increases the number of connected components, that vertex is a cut vertex.

In the following example, we use BFS to identify cut vertices −

   A
  / \
 B   C
    / \
   D   E

Starting from vertex A, BFS visits A, B, C, D, and E. Removing vertex C splits the graph into two components, making C a cut vertex.

Depth-First Search (DFS)

DFS is another graph traversal algorithm that explores as far along a branch as possible before backtracking. It can also be used to find cut vertices by examining the connectivity of the graph before and after removing a vertex.

In this graph example, we use DFS to identify cut vertices −

   F
  / \
 G   H
    / \
   I   J

Starting from vertex F, DFS visits F, G, H, I, and J. Removing vertex H splits the graph into two components, making H a cut vertex.

DFS Tree and Low Values

Using DFS, we can assign discovery and low values to each vertex. A vertex is a cut vertex if, for any child of the vertex in the DFS tree, there is no ancestor of the child that can be reached without going through the vertex.

In the following example, we use DFS to identify cut vertices:

   A
  / \
 D   B
 \  / \
  E    C
   \   /
    \ /
     F

DFS discovers B with discovery and low values indicating it is a cut vertex.

Tarjan's Algorithm

Tarjan's algorithm finds all cut vertices and bridges in a graph using DFS and maintaining low values for each vertex.

In the following example, we use Tarjan's algorithm to identify cut vertices −

       A
      / \
     B   C
    / \
   D   E

Tarjan's algorithm identifies B as a cut vertex.

Bridges

A bridge (also known as a cut edge) in a graph is an edge that, when removed, increases the number of connected components of the graph. Removing a bridge will disconnect the graph, creating two or more separate subgraphs.

In a connected graph, an edge e is a bridge if there exists at least one connected component that becomes disconnected when e is removed.

Bridges

In this graph, the edge between vertices 1 and 3 is a bridge. Removing this edge would result in two disconnected subgraphs: {1, 2, 4, 5} and {3, 6}.

Characteristics of Bridges

Bridges also have major characteristics that affect the structure of the graph −

  • Edge Criticality: Removing a bridge splits the graph into more disconnected parts. This means the graph will have more separate groups of vertices after the bridge is removed.
  • Maintaining Connectivity: Bridges are essential for keeping different parts of the graph connected. Removing a bridge can disconnect parts of the graph from each other.
  • Dependence on Structure: The presence of bridges depends on the arrangement of vertices and edges in the graph. Not all graphs have bridges.

Identifying Bridges

There are various ways to identify cut bridges in a graph −

  • Breadth-First Search (BFS)
  • Depth-First Search (DFS)
  • DFS Tree and Low Values
  • Tarjan's Algorithm

Breadth-First Search (BFS)

BFS is a way to explore a graph by visiting all neighbors of a vertex before moving to the next level. To identify cut bridges using BFS, we check if removing an edge causes the graph to split into separate parts. If it does, that edge is a cut bridge.

In the following example, we use BFS to identify bridges −

   A - B - C
  /         \
 D           E

In this example, the edge B-C is a cut bridge because removing it splits the graph into two disconnected parts: {A, B, D} and {C, E}.

Removing edge B-C splits the graph into two components, making B-C a bridge.

Depth-First Search (DFS)

DFS explores a graph by going as long (far/deep) as possible into each branch before backtracking. When used to identify cut bridges, DFS helps to check if removing an edge causes the graph to lose its connection. If removing an edge disconnects parts of the graph, then that edge is a cut bridge.

In the following example, we use DFS to identify bridges −

 A - B
     |
     C

Here, the edge B-C is a cut bridge because removing it disconnects vertex C from the rest of the graph.

DFS Tree and Low Values

Using DFS, we can assign discovery and low values to each vertex. An edge (u, v) is a bridge if low[v] > discovery[u], meaning there is no back edge from v or its descendants to u or its ancestors.

In the following example, we use DFS to identify bridges −

   0
  / \
 1   2
  \
   3

Here, the edge 0-1 is a cut bridge since removing it would disconnect 1 and 3 from 0 and 2.

Tarjan's Algorithm

Tarjan's algorithm finds all cut vertices and bridges in a graph using DFS and maintaining low values for each vertex.

In the following example, we use Tarjan's algorithm to identify bridges −

   0
  / \
 1   2
  \
   3
  /
 4

In this case, removing edge 1-3 would disconnect 4 from rest of the graph.

Challenges to Identify Cut Vertices & Bridges

We can face several challenges while identifying cut vertices and bridges, such as −

  • Scalability: Finding cut vertices and bridges in large graphs can be computationally expensive.
  • Dynamic Graphs: In dynamic graphs where vertices and edges are frequently added or removed, maintaining an updated list of cut vertices and bridges can be challenging.
  • Complex Structures: Graphs with complex structures, such as those with multiple interconnections, can make it difficult to identify cut vertices and bridges.
Advertisements