One, the cut point and the bridge of the non-direction graph
For g= (v,e)
1. Cut point: xξv If you delete X and the edge with X, the graph is split into multiple unicom diagrams, then X is the cut point of the graph.
2. Bridge (cut edge): eξe If you delete the E-map, the graph is split into multiple unicom diagrams, then E is the cut point of the graph.
How to find the cutting point and cutting edge
Tarjan algorithm
It's him.
First we introduce the concept of time stamp
Set Dfsn[x] Indicates the first access to the source node Y
That is to say we assume dfsn[y]=1, then we use the depth-first search tree to access the graph
Mark the order in which the graphs are accessed sequentially
The red number in the figure left represents the low[x] value and the right represents the dfsn[x] value
What is low[x], the value?
We define LOW[X] to represent the number of the earliest numbered nodes that x can reach through its subtree
How do I update the low[x] value?
We are in the DFS process, first let Low[x]=dfsn[x]
It is defined that Y is the X child node, then Low[x]=min (Low[x],low[y]);
, we find that node 5 can reach node 1 without its parent node
So, the same low[x]=min (Low[x],dfsn[y])
How to tell if a point is a cut point?
DFSN[X]<=LOW[X]
How to tell if the edge is cutting edge?
Dfsn[x]<low[y]
(x, y) for cutting edges
Cut Point Code
Tarjan algorithm and undirected graph connectivity