-
Notifications
You must be signed in to change notification settings - Fork 20.8k
Closed
Labels
Description
What would you like to Propose?
Adding Code for finding Articulation Points and Bridges.
Problem Statement :
Given an adjacency list of a graph with vertices = v, having
0 based indexing. Find all Articulation Points and Articulation
Bridge Present in Graph.
Applications :
- Network Flow
- Used in map/city-path related computer programs
Issue details
Articulation Point : vertex whcih when removed increases the number of
connected component in graph.
Articulation Bridge : edge which when removed increases the number of
connected component in graph.
eg : Given graph with vertices = 5 and
adj list is : vertex -> neighbours (Assuming all edges are bidirectional)
0 -> 1, 2
1 -> 2
2 -> 3
3 -> 4
Graph is :
0-------1
| /
| /
| /
| /
| / 4
| / |
|/ |
2----------3
current connected component = 1
-> Articulation Points : 2 , 3
Explanation :
-> When removing 2, graph changes to below and connected components increases
from 1 to 2.
0-------1
| /
| /
| /
| /
| / 4
| / |
|/ |
3
-> When removing 3, graph changes to below and connected components increases
from 1 to 2.
0-------1
| /
| /
| /
| /
| / 4
| /
|/
2
-> Articulation Bridges: edge : 2-3, edge: 3-4
Explanation :
-> When removing edge : 2-3, graph changes to below and connected components increases
from 1 to 2.
0-------1
| /
| /
| /
| /
| / 4
| / |
|/ |
2 3
-> When removing edge : 3-4, graph changes to below and connected components increases
from 1 to 2.
0-------1
| /
| /
| /
| /
| / 4
| /
|/
2----------3
Additional Information
No response