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
Yes, it is true. But you mean weakly connected, not connected. Here's a proof:
G=(V,E)
be a directed graph and supposeG
is weakly connected and has at least two cycles;A
⊂V
be the set of vertices in one cycle andB
⊂V
is the set of vertices a second cycle. The out-degree of each vertex in bothA
andB
is at least one and may be exactly one;A
to reach any vertex inB
, then an edge fromA
toB
is required. Therefore, at least one vertex fromA
must have out-degree 2.