9

In directed graph, to find strongly connected components why do we have to transpose adjacency matrix (reverses the direction of all edges) if we could use reversed list of nodes by they finishing time and then traverse original graph. In other words, we would find finish times of all vertices and start traversing from lowest finish time to greatest (by increasing finish time)?

Additionally, if we do topological sorting on some DAG, and then reverse edges (transpose adjacency matrix) and do topological sorting again - should we get to equal arrays, just in reversed order?

EDIT: Algorithm description from other topic: Correctness of Strongly Connected Components algorithm for a directed graph

Mellon
  • 99
  • 1
  • 1
  • 3
  • 1
  • What research have you done? Have you read explanations of this algorithm in textbooks? It is explained in standard textbooks, and those explanations generally explain why it's necessary to reverse the graph. For instance, I like Dasgupta, Papadimitriou, and Vazirani's textbook and their explanation of the algorithm -- it explains the point you are asking about. 2. On your second question, what have you tried? Have you tried running it on a few examples? 3. One question per question, please.
  • – D.W. Oct 22 '14 at 15:53
  • @D.W. Well spotted! – David Richerby Oct 22 '14 at 16:44