Pseudocode to determine bicomponents Algorithm BiComp(u,v) // u is a start vertex for depth first search. v is its parent if any // in the depth first spanning tree. It is assumed that the "global" // array dfn is initialized to zero and that the "global" variable // num is initialized to 1. n is the number of vertices in G. { DFN[u] = num; L[u] = num; num = num + 1; for each vertex w adjacent from u do { if (v != w) and (DFN[w] < DFN[u]) add (u, w) to top of Stack s; //endif if (DFN[w] = 0) { if L[w] >= DFN[u] then { print ("new biconnected component") repeat { delete an edge from top of Stack s; Let this edge be (x,y); print ("(" + x + "," + y + ")"); } until (((x,y)=(u,w) OR ((x,y)=(w,u))); } BiComp(w,u); // w is unvisited L[u] = min(L[u],L[w]) ; } else if (w != v) then L[u] = min (L[u], DFN[w]); } }