How to find Strongly Connected Components in a Graph?

前端 未结 2 1849
时光取名叫无心
时光取名叫无心 2021-02-02 00:16

I am trying self-study Graph Theory, and now trying to understand how to find SCC in a graph. I have read several different questions/answers on SO (e.g., 1,2,3,4,5,6,7,8), but

2条回答
  •  深忆病人
    2021-02-02 00:55

    Your answers is correct. As per CLRS, "A strongly connected component of a directed graph G = (V,E) is a maximal set of vertices C, such that for every pair of vertices u and v, we have both u ~> v and v ~> u, i.e. vertices v and u are reachable from each other."

    In case you assume {C, J, F, H, I, G, D} as correct, there is no way to reach from D to G (amongst many other fallacies), and same with other set, there is no way to reach from A to E.

提交回复
热议问题