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 supposeGis weakly connected and has at least two cycles;A⊂Vbe the set of vertices in one cycle andB⊂Vis the set of vertices a second cycle. The out-degree of each vertex in bothAandBis at least one and may be exactly one;Ato reach any vertex inB, then an edge fromAtoBis required. Therefore, at least one vertex fromAmust have out-degree 2.