Bridges & Articulation Points
In short: a bridge is a road whose closure splits the network, and both come
out of one DFS and one number per junction, the low-link — the smallest
discovery number reachable from a junction's subtree by one back road. A tree road
parent–child is a bridge exactly when low[child] > disc[parent]: nothing below
child can climb back to parent or above. Junctions use the same idea with
>= instead of >, since a back road landing exactly on a junction doesn't help
once that junction itself is gone.

Roads close. A burst water main, a parade, a resurfacing crew: every week some of Meridian's roads are shut for a day. Usually the vans just go another way. But the road from the mill up to the north side is the only way up there, and the day it closed, three depots' worth of parcels sat undelivered while the planners worked out what had happened.
This lesson finds those roads ahead of time. A road whose closure disconnects the network is a bridge. A junction whose closure disconnects it is an articulation point, also called a cut vertex. Both come from one depth-first search and one number per junction, the low-link.
The obvious way, and why it's slow
The definition gives an algorithm straight away: close each road in turn and check whether the network is still in one piece.
roads = [("a", "b"), ("b", "c"), ("c", "a"), ("c", "d"), ("d", "e")]
def pieces(kept):
parent = {j: j for j in "abcde"}
def find(x):
while parent[x] != x:
x = parent[x]
return x
for a, b in kept:
parent[find(a)] = find(b)
return len({find(j) for j in parent})
print(sum(pieces([r for r in roads if r != cut]) > 1 for cut in roads))It's correct, but every closure means a full pass over the network: O(E × (V + E)). Street networks have about 1.5 roads per junction, so for n junctions one connectivity check costs about 2.5n steps, and closing every road in turn about 3.75n². That passes ten million steps at about 1,600 junctions, which is a small town. A real city has hundreds of thousands, where closing each road costs hundreds of billions of steps. The low-link method below does it in one pass of about 2.5n.