[Verse 1]
Graph components scattered wide, disconnected mystery
Need to find the cycles where the vertices agree
Tarjan's got the blueprint, depth-first search refined
Stack maintains the pathway, low-link values assigned
Discovery time stamped when we first arrive
Index counter climbing, keeping nodes alive
Each vertex gets a number when we start to explore
Low-link tracks the smallest reachable core
[Chorus]
Push it on the stack, mark the discovery
Low-link equals index, that's the key
Strongly connected when the cycle's tight
Pop until you find the root insight
DFS and backtrack, update every node
Low-link propagation breaks the code
[Verse 2]
Traverse every neighbor, follow every edge
If it's in the stack still, update on the ledge
Take the minimum value, low-link gets revised
Backtracking reveals what connections comprise
When low-link equals index, component found complete
Pop the stack entirely until the roots meet
All vertices between them form a single group
Strongly connected circuit in the loop
[Chorus]
Push it on the stack, mark the discovery
Low-link equals index, that's the key
Strongly connected when the cycle's tight
Pop until you find the root insight
DFS and backtrack, update every node
Low-link propagation breaks the code
[Bridge]
Linear time complexity, efficient as can be
Single pass traversal, optimal strategy
Bridges and cut-vertices, same algorithm base
Tarjan's contribution changed the searching space
[Verse 3]
Call stack holds recursion, system stack holds state
Two different structures, don't conflate their fate
Finished nodes are marked black, never need return
In-progress nodes stay gray, bridges we discern
[Chorus]
Push it on the stack, mark the discovery
Low-link equals index, that's the key
Strongly connected when the cycle's tight
Pop until you find the root insight
DFS and backtrack, update every node
Low-link propagation breaks the code
[Outro]
Components isolated, graph structure revealed
Tarjan's algorithm, complexity healed