Pattern
Bridges & Articulation Points (low-link)
In one DFS compute low[v] (earliest discovery time reachable via one back edge) to find edges/vertices whose removal disconnects the graph.
0/8 solved
Recognise it
The signal
critical connections / necessary roads
1Brute force
Remove each edge/vertex and test connectivity: O(E (V + E)).
2The observation
Repeated connectivity tests: low-link values summarise back edges.
3Why it works
Edge (p, v) is a bridge iff low[v] > tin[p]; vertex p (non-root) is a cut vertex iff some child has low[v] >= tin[p].
Reach for it when
- +critical cities / single points of failure
- +2-edge-connected components
Not when
- ×directed graphs (use scc / dominators)
Practice
- Strongly Connected EdgesCSESMedium
- Necessary RoadsCSESMedium
- Necessary CitiesCSESMedium
- Forbidden CitiesCSESHard
- TouristsCodeforces3200
- Critical Connections in a NetworkHard
- We Need More BossesCodeforces2100
- Minimum Number of Days to Disconnect IslandHard
Pitfalls
Misconceptions
- !skipping the parent EDGE vs parent VERTEX (breaks with multi-edges)
Go deepervariants and techniques · 2 combinations · resources
Combinations
Bridges & Articulation Points (low-link)+Graph BFS / DFS
critical connections / necessary roads / cities
- Bridges & Articulation Points (low-link):
- low-link comparison to classify edges/vertices
- Graph BFS / DFS:
- single DFS with timestamps
Critical Connections in a NetworkNecessary RoadsNecessary Cities
Block-Cut Tree / Bridge Tree+Binary Lifting & LCA
queries: can a reach b without visiting c (undirected)
- Block-Cut Tree / Bridge Tree:
- turns 'must pass through c' into a tree-path membership test
- Binary Lifting & LCA:
- LCA / ancestor checks for the path test