how to generate all possible networks of a given size 05-30-2015d2156

2015-05-30

how to generate all possible networks of a given size 05-30-2015d2156


I think one way of doing this is to represent a network as an adjacency matrix. Then each row of the adjacency matrix could be combined to generate one single binary number. The sum of each digit could be determined to obtain the total number of edges. Then to generate of the networks, just count from 0 to the highest allowed number in binary, but only keep those numbers whose sum equals the desired sum. Each binary number would represent a network just by separating the number into rows to obtain the adjacency matrix.


Hmmm. . I don't really know how to generate all possible networks with a given number of nodes and edges.