Can a DAG have strongly connected components

directed graphsgraph-connectivity

It seems to me, a DAG (the directed graph has no cyclic.) is not possible to have strongly connected components (SCC), but it can have weakly connected components (WCC).

The definition of SCC and WCC:

  • SCC: The SCC is an arbitrary directed graph form a partition into subgraphs that are themselves strongly connected (from wiki).
  • WCC: WCC is a subgraph of the original graph where all vertices are connected to each other by some path, ignoring the direction of edges (from GeeksforGeeks).

There are some references:

Is my understanding correct? I tried to search references which have more strict claim, but cannot any. If anyone knows, please point out. A ton of thanks!

Best Answer

Every graph has a decomposition into SCCs, and Wikipedia's page for SCCs explicitly states

A directed graph is acyclic if and only if it has no strongly connected subgraphs with more than one vertex, because a directed cycle is strongly connected and every non-trivial strongly connected component contains at least one directed cycle.

So the truth is that DAGs must have no SCCs on more than one vertex, not that they have no SCCs at all.

It is trivial to see that all DAGs have WCCs.

Related Question