Is their any contradictory case for this statement?

127 Views Asked by At

I say: If I make a directed graph G with every vertex having exactly one outdegree and any number of indegree then

1) The graph can have at most 1 cycle
2) The graph G is connected

If not true please provide a counterexample too.

If true can you suggest any more properties of graph G which can be used for eliminating the cycle? ( note: new vertex joins and leaves dynamically)

I am trying to make a decentralised mesh formation algorithm for wireless networks using ESP32 modules.
Every directed outgoing edge is an STA (Station) connecting AP (Access Point)
Every vertex is a node

1

There are 1 best solutions below

3
On

Yes, it is true. But you mean weakly connected, not connected. Here's a proof:

  1. Let G=(V,E) be a directed graph and suppose G is weakly connected and has at least two cycles;
  2. Let AV be the set of vertices in one cycle and BV is the set of vertices a second cycle. The out-degree of each vertex in both A and B is at least one and may be exactly one;
  3. In order for any vertex from A to reach any vertex in B, then an edge from A to B is required. Therefore, at least one vertex from A must have out-degree 2.