Hi, You can't -- the Barabasi-Albert model does not specify the total number of edges in advance. If you manage to do it somehow, then that won't be the original Barabasi-Albert model any more. Read the original paper of Barabasi and Albert if you are interested in how the model is supposed to work; basically, you start from a seed graph, then you add one node per time step with a fixed number of outbound edges that attach preferentially to the existing ones, so each node that you add will have the same number of outbound edges.
There are variants to the original Barabasi-Albert model that lets you specify the number of outbound edges for each vertex being added. You could try to use that, but then you are prescribing not only the number of nodes and edges but also the exact out-degree distribution. If you are okay with that, then use something like this in R: sample_pa(vcount(g), out.seq=degree(g, mode="out")) T. On Sat, Jun 4, 2016 at 2:32 PM, seema aswani <[email protected]> wrote: > Hi all, > > I want to generate barabasi albert's scale free network using preferential > attachment model. I want to fix the number of nodes and edges as my original > network has, that is 16,000 nodes and 173,000 edges. How can i generate > scale free network with this many number edges or nearly it using this > function. > > Please help. > > > Seema > > _______________________________________________ > igraph-help mailing list > [email protected] > https://lists.nongnu.org/mailman/listinfo/igraph-help > _______________________________________________ igraph-help mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/igraph-help
