Applications BFS DFS
Applications BFS DFS
and DFS
Topological Sort
Algorithm is correct.
Strongly Connected
Components
• Strongly connected component of a directed graph
G(V, E) is a maximal set of vertices C ⊆ V
such that for every pair of vertices u and v in C,
T
Compute G
T
call DFS(G ), consider the vertices in order of decreasing
f[u]
Output the vertices in each tree in the DFS forest (formed in the
previous step) as a separate strongly connected component
Let C, C′ be distinct strongly connected components in
directed graph G(V, E).
from v to v′ .






Let C, C′ be distinct strongly connected components in
directed graph G(V, E).