Answer
developing an algorithm to find the
strong components of a directed graph G = (V ,E). Recall
that a vertex w ∈ V is reachable from a vertex v ∈ V
if there is a directed path from v to w.
Work Step by Step
a)
Run the breadth-first search algorithm, starting from v and respecting the directions of the edges,
-marking each vertex encountered as reachable.
b)
Running breadth-first search on Gconv,
-again starting at v, respecting the directions of the edges, and -marking each vertex encountered,
-will identify all the vertices from which v is reachable.
c) Choose a vertex v1 and using parts (a) and (b) find the strong
component containing v1,
- namely all vertices w such that w
is reachable from v1 and v1 is reachable from w.
-Then choose another vertex v2 not yet in a strong component and find the strong component of v2. Repeat until all vertices have been included.
-The correctness of this algorithm follows from the definition
of strong component