[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] how to generate a bipartite graph with specified degree dis
From: |
Gábor Csárdi |
Subject: |
Re: [igraph] how to generate a bipartite graph with specified degree distributions |
Date: |
Mon, 9 May 2011 22:25:27 -0400 |
Hi,
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.
Best,
Gabor
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
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>
>
--
Gabor Csardi <address@hidden> MTA KFKI RMKI
- [igraph] how to generate a bipartite graph with specified degree distributions, Yi Cao, 2011/05/09
- Re: [igraph] how to generate a bipartite graph with specified degree distributions,
Gábor Csárdi <=
- Re: [igraph] how to generate a bipartite graph with specified degree distributions, Yi Cao, 2011/05/12
- Re: [igraph] how to generate a bipartite graph with specified degree distributions, Gábor Csárdi, 2011/05/12
- Re: [igraph] how to generate a bipartite graph with specified degree distributions, Yi Cao, 2011/05/12
- Re: [igraph] how to generate a bipartite graph with specified degree distributions, Gábor Csárdi, 2011/05/12
- Re: [igraph] how to generate a bipartite graph with specified degree distributions, Yi Cao, 2011/05/13
- Re: [igraph] how to generate a bipartite graph with specified degree distributions, Gábor Csárdi, 2011/05/13
- Re: [igraph] how to generate a bipartite graph with specified degree distributions, Yi Cao, 2011/05/13
- Re: [igraph] how to generate a bipartite graph with specified degree distributions, Gábor Csárdi, 2011/05/13
- Re: [igraph] how to generate a bipartite graph with specified degree distributions, Yi Cao, 2011/05/13