[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## [igraph] problems in generating scale-free networks

**From**: |
Mario Lavezzi |

**Subject**: |
[igraph] problems in generating scale-free networks |

**Date**: |
Tue, 21 Oct 2008 12:39:21 +0200 |

**User-agent**: |
Thunderbird 2.0.0.17 (X11/20080925) |

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] problems in generating scale-free networks**,
*Mario Lavezzi* **<=**