0

This is just a request for confirmation. I have a simple directed graph which is weakly connected. When I require there to be exactly one vertex with indegree == 0, does it follow that all nodes in the graph are reachable from that vertex?

I think yes: When I contract the graph (replace all strongly connected components with a single vertex), the result will be a DAG. All vertices with indegree == 0 will be "roots" of that DAG. Ex hypothesi, I have only one such vertex, hence the DAG is a tree. (And it will be a single tree, not a forest, because I start with a single weakly connected component.) q. e. d. Am I correct, or have I missed something?

Sebastian
  • 315
  • 2
  • 12

1 Answers1

1

It seems that the graph A -> B <- C <-> D is a graph where A has an indegree of 0 but one cannot reach C from A.

Kevin
  • 66
  • 1
  • 6