In above graph, following are the biconnected components:
- 4–2 3–4 3–1 2–3 1–2
- 8–5 7–8 5–7
- 6–0 5–6 1–5 0–1
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.
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
This article is contributed by Anurag Singh. Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- Biconnected graph
- Strongly Connected Components
- Connected Components in an undirected graph
- Total number of components in the index Array
- Sum of the minimum elements in all connected components of an undirected graph
- Clone an undirected graph with multiple connected components
- Number of single cycle components in an undirected graph
- Tarjan's Algorithm to find Strongly Connected Components
- Check if a Tree can be split into K equal connected components
- Check if the length of all connected components is a Fibonacci number
- Largest subarray sum of all connected components in undirected graph
- Octal equivalents of connected components in Binary valued graph
- Count of unique lengths of connected components for an undirected graph using STL
- Maximum sum of values of nodes among all connected components of an undirected graph
- Program to count Number of connected components in an undirected graph
- Maximum number of edges among all connected components of an undirected graph
- Maximum decimal equivalent possible among all connected components of a Binary Valued Graph