Articulation points and bridges — Tarjan's low-link values
WHAT are we computing?
The two key numbers
Bridge and articulation conditions

Reference implementation
def tarjan(n, adj):
disc = [-1]*n
low = [0]*n
timer = [0]
bridges, aps = [], set()
def dfs(u, parent):
disc[u] = low[u] = timer[0]; timer[0] += 1
children = 0
for v in adj[u]:
if v == parent:
continue # skip the edge we came down on
if disc[v] == -1: # tree edge
children += 1
dfs(v, u)
low[u] = min(low[u], low[v])
if low[v] > disc[u]:
bridges.append((u, v)) # bridge: strict >
if parent != -1 and low[v] >= disc[u]:
aps.add(u) # AP non-root: >=
else: # back edge
low[u] = min(low[u], disc[v])
if parent == -1 and children > 1:
aps.add(u) # AP root: 2+ children
for s in range(n):
if disc[s] == -1:
dfs(s, -1)
return bridges, apsWorked example 1 — a simple bridge
Graph: 0 - 1 - 2 and 2 - 3 - 2? Let's use edges .
| step | action | disc/low |
|---|---|---|
| visit 0 | root | disc0=0, low0=0 |
| →1 tree | child of 0 | disc1=1, low1=1 |
| →2 tree | child of 1 | disc2=2, low2=2 |
| →3 tree | child of 2 | disc3=3, low3=3 |
| 3→1 back | back edge to 1 | low3 = min(3, disc1=1) = 1 |
| back to 2 | low2 = min(2, low3=1) = 1 | |
| edge (2,3)? | low3=1 ≤ disc2=2 → not bridge | |
| back to 1 | low1 = min(1, low2=1) = 1 | |
| edge (1,2)? | low2=1 ≤ disc1=1 → not bridge | |
| back to 0 | low0 = min(0, low1=1) = 0 | |
| edge (0,1)? | low1=1 > disc0=0 → BRIDGE |
Why this step? Subtree under 1 (the cycle 1-2-3) can climb back only to disc=1, never to 0. So is the lone link → bridge. Also vertex 1 (non-root) has child 2 with ⇒ 1 is an articulation point.
Worked example 2 — the root rule
Graph: star 1-0, 2-0, 3-0 (0 in the middle). DFS from 0.
- 0 is root, discovers children 1, 2, 3 as three separate tree children (no edges between them).
- children count = 3 > 1 ⇒ 0 is an articulation point.
Why this step? Removing 0 leaves 1, 2, 3 fully isolated — the only paths between them passed through 0. The root rule (≥2 children) captures exactly this.
Active recall
Recall Predict before peeking (Forecast-then-Verify)
For a single cycle : how many bridges? How many articulation points?
Answer: Zero of each. Every edge is in the cycle, so each node has an alternate route — no single failure disconnects it. (Check: every via the back edge that closes the cycle.)
Recall Feynman: explain to a 12-year-old
Picture a treehouse fort connected by rope bridges. You climb down ropes exploring new platforms. is the order you reached each platform. is the highest platform you can swing back to using one secret shortcut rope. If a whole section of fort can only swing back to itself and never higher, the single rope holding it up is special — cut it and that section floats away (a bridge). And a platform everyone must pass through to get anywhere is a must-not-break support (an articulation point).
What is a bridge in a graph?
What is an articulation point?
Definition of disc[u]?
Definition of low[u]?
Low-link recurrence?
Why use disc[w] (not low[w]) for a back edge?
Bridge condition for tree edge (u,v)?
Articulation condition for non-root u with child v?
Articulation condition for the DFS root?
Why is bridge strict (>) but AP is (>=)?
Time complexity of Tarjan's algorithm?
What edge types appear in undirected DFS?
Pitfall with parallel edges?
Connections
- Depth-First Search — the backbone traversal producing the DFS tree.
- Strongly Connected Components - Tarjan — same low-link idea on directed graphs.
- Biconnected Components — articulation points partition the graph into these.
- Bridge Trees / 2-edge-connected components — contract non-bridge edges.
- Connected Components — what bridges/cut vertices break apart.
- Big-O Notation — why matters.
Concept Map
Hinglish (regional understanding)
Intuition Hinglish mein samjho
Socho ek graph hai jisme cities aur roads hain. Bridge wo road hai jise hatao toh graph do tukdo me toot jaata hai. Articulation point wo city hai jise hatao toh bhi graph disconnect ho jaata hai. Ye dono "single point of failure" hote hain — agar yahi fail ho gaya toh network bikhar jaata hai. Tarjan ka algorithm ek hi DFS pass me sab nikal leta hai, me.
Asli jugaad do numbers me hai: matlab "main is node pe kab pahuncha" (timestamp), aur matlab "is node ke subtree se main upar kitna high climb kar sakta hoon — ek back edge use karke". Recurrence simple hai: apna disc se start karo, tree children ke low se min lo, aur back edge milne par us ancestor ke disc se min lo. Yaad rakho — back edge ke liye lena hai, nahi, warna galat answer aayega.
Conditions: tree edge bridge hai jab (strict greater, kyunki hum edge kaat rahe hain). Non-root vertex articulation point hai jab (equal bhi chalega, kyunki hum poora vertex hata rahe hain). Aur DFS root articulation point tab hai jab uske 2 ya zyada tree children ho. Mnemonic: "Bridge Bigger, Articulation At-least." Bas yahi do signs yaad rakh lo, baaki sab derive ho jaayega.