Research Article
Global Alignment of Pairwise Protein Interaction Networks for Maximal Common Conserved Patterns
Pseudocode 1
Pseudocode of the connected-component algorithm.
Input: Graph G = (V, E), Start node v0 | index = 0 // DFS node number counter | S = empty // An empty stack of nodes | tarjan (v0) // Start a DFS at the start node | procedure tarjan (v) | (6) v.index = index // Set the depth index for v | (7) v.lowlink = index | (8) index = index + 1 | (9) S.push (v) // Push on the stack | (10) For all (v, ) in E do // Consider successors of v | (11) if (.index is undefined) // Was successor visited? | (12) tarjan () // Recurse | (13) .lowlink = min (.lowlink, .lowlink) | (14) elseif ( in S) // Is on the stack? | (15) .lowlink = min (.lowlink, .index) | (16) if (.lowlink == .index) // Is the root of an SCC? | (17) print “SCC:” | (18) repeat | (19) = .pop | (20) print | (21) until ( == v) |
|