nextupprevious
Next:7.6 To Probe FurtherUp:7.5 Directed Acyclic GraphsPrevious:7.5.2 Topological Sort

7.5.3 Strong Components

REF.
Rao S. Kosaraju. Unpublished. 1978.
REF.
Robert E. Tarjan. Depth first search and linear graph algorithms. SIAM Journal on Computing, Volume 1, Number 2, pp. 146-160, 1972.
Figure 7.16: Step 1 in the strong components algorithm
\begin{figure}\centerline{\psfig{figure=figures/Fstrong2.ps}}\end{figure}

 
 
Figure 7.17: Step 3 in the strong components algorithm
\begin{figure}\centerline{\psfig{figure=figures/Fstrong3.ps}}\end{figure}

Example: See Figures 7.16 and 7.17

Proof of Kosaraju's Algorithm

  u$\displaystyle \leadsto$x   (7.16)
  +    
  $\displaystyle \mbox{Recursive call at $v$\space terminatesbefore that of $x$\space in $G$ }$   (7.17)

In the DFS of G, there are two possibilities.

1) $\displaystyle \mbox{Search of $v$\space occurs before $x$ }$   (7.18)
2) $\displaystyle \mbox{Search of $x$ occurs before $v$ }$   (7.19)

 

(1),(3) $\displaystyle \Longrightarrow$$\displaystyle \mbox{$DFS$\space of $v$\space ... invokes $DFS$\space of $x$ back to $v$ }$.
  $\displaystyle \Longrightarrow$$\displaystyle \mbox{search at $x$\space would start and endbefore the search starts at $v$\space ends}$.
  $\displaystyle \Longrightarrow$$\displaystyle \mbox{recursivecall at $v$\space terminates after the call at $x$\space contradicts (2)}$.
   
  $\displaystyle \Longrightarrow$$\displaystyle \mbox{search of $x$\space occurs before $v$ }$.
(4),(2) $\displaystyle \Longrightarrow$$\displaystyle \mbox{$v$\space is visited during the search of $x$ }$.
  $\displaystyle \Longrightarrow$$\displaystyle \mbox{$v$\space is descendant of $x$ }$.
  $\displaystyle \Longrightarrow$$\displaystyle \mbox{$\exists$\space a path from $x$\space to $v$ }$.
  $\displaystyle \Longrightarrow$$\displaystyle \mbox{$x$\space and$v$\space are in the same strong component}$.
   
  Similarly,$\displaystyle \mbox{$x$ and $w$\space are in the same strong component}$.
  $\displaystyle \Longrightarrow$$\displaystyle \mbox{Similarly, $v$\space and $w$\space are in the same strong component}$.

nextupprevious
Next:7.6 To Probe FurtherUp:7.5 Directed Acyclic GraphsPrevious:7.5.2 Topological Sort
eEL,CSA_Dept,IISc,Bangalore