igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] problems in generating scale-free networks


From: Mario Lavezzi
Subject: Re: [igraph] problems in generating scale-free networks
Date: Mon, 03 Nov 2008 08:07:21 +0100
User-agent: Thunderbird 2.0.0.17 (X11/20080925)

Hello Gàbor

it works!

thank you very much (and excuse me for this late reply, but I wanted to do many attempts)

Mario

Gábor Csárdi wrote:
Mario, try to generate denser graphs, this can be done independently
of the exponent of the power-law degree distribution.
E.g. simply

degs <- degs * 2

might be enough if you don't care about not having vertices with degree 1.

G.

On Tue, Oct 21, 2008 at 12:39 PM, Mario Lavezzi <address@hidden> wrote:
Hi

I need to generate scale-free networks with different exponents.

Following previous suggestions by Gabor, I am using these commands

degs <- sample(1:n, n, replace=TRUE, prob=(1:n)^(-scale))
  if (sum(degs) %% 2 != 0) { degs[1] <- degs[1] + 1 }
  g5 <- degree.sequence.game(degs, method="vl")
  all(degree(g5) == degs)

where "scale" is my exponent (set by me, along with other parameters).--

So far, I have simulated networks with 2000 agents and, with parameters
between 2 and 2.5 I did not find particular problems in obtaining a network
structure.

However, I noticed that, moving from 2.5 to higher values, the algorithm
finds more and more difficult to generate a network structure, and I get the
message:

graph::make_connected() failed : #edges < #vertices-1
Errore in degree.sequence.game(degs, method = "vl") :
 At gengraph_mr-connected.cpp:141 : Cannot make a connected graph from the
given degree sequence, Invalid value

So far, I have tried to circumvent this by changing the seed of the random
generator with the instruction:

mySeed=33
set.seed(mySeed, kind = NULL)

I change the "mySeed" parameter and restart the program, until the algorithm
works and a network is generated.

However, with exponents >= 2.5 it takes a very high number of attempts to
get it to work.

I tried with higher (or much higher) numbers of agents, but it seems that
little changes.

I would like to reach an exponent of about 3, 3.2.

Any suggestion?

Thanks to all
Mario

Andrea Mario Lavezzi
Dipartimento di Studi su Politica, Diritto e Società
Università di Palermo
Piazza Bologni 8
90134 Palermo, Italy
tel. ++39 091 6625600
fax ++39 091 6112023
skype: lavezzimario
email: lavezzi (at) unipa.it
web: http://www.unipa.it/~lavezzi



_______________________________________________
igraph-help mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/igraph-help





--
Andrea Mario Lavezzi
Dipartimento di Studi su Politica, Diritto e Società
Università di Palermo
Piazza Bologni 8
90134 Palermo, Italy
tel. ++39 091 6625600
fax ++39 091 6112023
skype: lavezzimario
email: lavezzi (at) unipa.it
web: http://www.unipa.it/~lavezzi





reply via email to

[Prev in Thread] Current Thread [Next in Thread]