Reputation: 3
I have an empirical network with 585 nodes and 5,441 edges. This is a scale-free network with max node degree of 179 and min node degree of 1. I am trying to create an equivalent random graph (using random_degree_sequence_graph from networkx), but my python just keeps running. I did similar exercise fro the network with 100 nodes - it took just a second to create a random graph. But with 585 nodes it takes forever. The result of is_valid_degree_sequence command is True. Is it possible that python goes into some infinite loop with my degree sequence or does it actually take a very long time (more than half hour) to create a graph of such size? Please let me know if anyone has had any experience with this. I am using Python 2.7.4. Thanks in advance!
Upvotes: 0
Views: 641
Reputation: 25289
That algorithm's run time could get very long for some degree sequences. And it is not guaranteed to produce a graph. Depending on your end use you might consider using the configuration_model(). Though it doesn't sample graphs uniformly at random and might produce parallel edges and self loops it will always finish.
Upvotes: 1