Question

I would like to generate a directed network that satisfies the following:

  1. There are 100 nodes.
  2. 50% of the nodes have exactly 3 outward connections.
  3. the other 50% has 10 outward connections.
  4. there are no self loops and the same node cannot be connected to another node twice

Is it possible to generate such a network?

An example network would look like this:

from  to
   1  54
   1  93
   1  32
   2  24
   2  21
   2  93
   3  21
   3  13
   3  19
   4  95
   4  100
   4  23
   ...
   50 4
   50 49
   50 56
   50 53
   50 86
   50 82
   50 19
   50 100
   50 34
   50 43
   51 21
   51 13
   51 49
   51 48
   51 39
   51 75
   51 39
   51 10
   51 4
   51 6
   ...
   100 4
   100 2
   100 19
   100 13
   100 11
   100 18
   100 13
   100 15
   100 49
   100 12
Was it helpful?

Solution

There is a simple way to do this that should be very easy to implement. Split the graph into the nodes 1 - 50 and the nodes 51 - 100. Then, lay out these groups of nodes, independently, into two rings, and connect each node in the first group to the three nodes that immediately follow it and each node in the second group to the ten nodes that immediately follow it. That gives you the properties you want.

Hope this helps!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top