|Subject:||Re: [igraph] how to generate a bipartite graph with specified degree distributions|
|Date:||Thu, 12 May 2011 09:03:03 -0400|
igraph_degree_sequence_game to generate the bipartite graph.
I think the simple naive method works in this case. You generate the
degrees from the desired distributions, and make sure that they are
plausible, i.e. the total degrees in both groups are the same.
Then you give "stubs" for each vertex, as many as their degree, and
simply connect the stubs uniformly randomly. This can be done by
simply permuting the stubs once.
I think this can be implemented in Python or R, very quickly, in a
couple of lines. I am fairly, (but not completely) sure that this
method generates all possible graphs, with equal probability, assuming
that the vertices are labeled.
On Mon, May 9, 2011 at 4:00 PM, Yi Cao <address@hidden> wrote:
> Hello all,
> Now I am trying to generate a bipartite graph with specified degree
> distribution. The degree distribution of one vertices set is function f(x)
> which is linear, the degree distribution of the other vertices set is
> function g(x) which is a piecewise function, including 3 parts. Now I want
> to create a graph with known number of vertices, edges between two vertices
> sets as well as the specified degree distribution as mentioned above. How
> can I implement this by using igraph library(preferred), or by using other
> package like NetworkX or else? Can anyone give me some suggestions about
> this? Thank you in advanced.
> Best regards,
> Yi Cao
> igraph-help mailing list
Gabor Csardi <address@hidden> MTA KFKI RMKI
igraph-help mailing list
|[Prev in Thread]||Current Thread||[Next in Thread]|