VOOZH about

URL: https://www.geeksforgeeks.org/dsa/biconnected-components/

⇱ Biconnected Components - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Biconnected Components

Last Updated : 23 Jul, 2025

A biconnected component is a maximal biconnected subgraph.

Biconnected Graph is already discussed here. In this article, we will see how to find biconnected component in a graph using algorithm by John Hopcroft and Robert Tarjan.

👁 Biconnected Components

In above graph, following are the biconnected components: 

  • 4--2 3--4 3--1 2--3 1--2
  • 8--9
  • 8--5 7--8 5--7
  • 6--0 5--6 1--5 0--1
  • 10--11

Algorithm is based on Disc and Low Values discussed in Strongly Connected Components Article.

Idea is to store visited edges in a stack while DFS on a graph and keep looking for Articulation Points (highlighted in above figure). As soon as an Articulation Point u is found, all edges visited while DFS from node u onwards will form one biconnected component. When DFS completes for one connected component, all edges present in stack will form a biconnected component. 

If there is no Articulation Point in graph, then graph is biconnected and so there will be one biconnected component which is the graph itself.


Output
4--2 3--4 3--1 2--3 1--2
8--9
8--5 7--8 5--7
6--0 5--6 1--5 0--1 
10--11
Above are 5 biconnected components in graph

Time Complexity : O(N + E), where N is the number of nodes and E is the number of edges, as the time complexity of Depth first search.
Space Complexity :O(N), here N is the number of nodes in the graph, we need a O(N) recursion stack space to make DFS calls. 

Comment
Article Tags: