Kosaraju

From Algowiki
Revision as of 18:06, 8 October 2014 by Weihe (talk | contribs) (Created page with "== General information == '''Algorithmic problem:''' Strongly connected components '''Type of algorithm:''' loop == Abstract View == # Apply a repeated depth-first...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

General information

Algorithmic problem: Strongly connected components

Type of algorithm: loop


Abstract View

  1. Apply a repeated depth-first search to [math]\displaystyle{ G }[/math].
  2. Let [math]\displaystyle{ G' }[/math] be the transpose of [math]\displaystyle{ G }[/math].
  3. Apply a repeated depth-first search to [math]\displaystyle{ G' }[/math] with a modification: The nodes are
  4. The DFS trees are the strongly connected components.


Correctness

Complexity

Statement: The asymptotic complexity is in [math]\displaystyle{ \Theta(|V|+|A|) }[/math].

Proof: Follows immediately from the linear asymptotic complexity of DFS.