igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] high-'power' bug (?) in barabasi.game


From: Gábor Csárdi
Subject: Re: [igraph] high-'power' bug (?) in barabasi.game
Date: Sat, 26 May 2012 15:51:20 -0400

This is most probably a numerical error. Today's computers cannot
represent numbers such as 10^250 accurately.

We could probably give an error or warning message about this, if
(say) number of nodes to the power of 'power' is larger than 1e50, or
(even better) the largest accurately represented number.

Gabor

On Sat, May 26, 2012 at 3:29 PM,  <address@hidden> wrote:
> I am trying to construct graphs using barabasi.game that form a single
> connected component, which i thought from the construction algorithm would
> be automatic. However, some examples have been disconnected.
>
> Playing with the parameters suggests that the problem only occurs when my
> 'power' values are high, but i don't see why this should be a problem. In
> each case the graph becomes a pair of stars with one loop at one of the
> hubs. Here are some examples:
>
>> g <- barabasi.game(n = 32, power = 125, m = 1)
>> is.connected(g)
>
> [1] TRUE
>>
>> g <- barabasi.game(n = 32, power = 250, m = 1)
>> is.connected(g)
>
> [1] FALSE
>>
>> g <- barabasi.game(n = 16, power = 250, m = 1)
>> is.connected(g)
>
> [1] TRUE
>>
>> g <- barabasi.game(n = 16, power = 500, m = 1)
>> is.connected(g)
>
> [1] FALSE
>
> Thanks for any help!
>
> Cory
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help



-- 
Gabor Csardi <address@hidden>     MTA KFKI RMKI



reply via email to

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