Recently, I have been exploring random graph models in igraph. In particular, I am interested in small-world networks. While working with the sample_smallworld()
function in igraph, I noticed some behavior that seems inconsistent with my understanding of the Watts & Strogatz model.
Specifically, in their paper they mention We choose a vertex and the edge that connects it to its nearest neighbour in a clockwise sense. With probability p, we reconnect this edge to a vertex chosen uniformly at random over the entire ring…. Based on this, I would expect the minimum degree after reconnecting to be half of the average degree. However, when testing this using sample_smallworld()
in igraph with a high rewiring probability p, the minimum degree does not match the expected value. For example:
table(degree(sample_smallworld(1, 100000, 2, 0.8)))
To further clarify the expected behavior, I also tested the Watts-Strogatz model using NetworkX, which does give the expected minimum degree.
I was hoping you could provide some insight into why there is this discrepancy between the Watts-Strogatz model description, the NetworkX implementation, and the implementation in sample_smallworld()
. Is this difference intentional or could it be a bug? Any guidance would be greatly appreciated.