|
From: <li...@gm...> - 2005-07-25 11:24:35
|
Hello everyone, I managed to find some time to write the Barabasi-Albert network generator I mentioned on this list a few weeks back. (Actually I called it a scale free network generator, but Laszlo Gulyas pointed out my error). I'm afraid it was a bit of a rush job, but I think it should work correctly. There is one issue though, in Emergence of Scaling in Random Networks Barabasi and Albert say that the network can have a small number of initial vertices, however they do not mention anything about connecting those initial vertices to each other. This would mean, with their formula (the probability formula of the probability for a new vertex being connected to an existing vertex i being the number of i's edges divided by the total number of edges) that you will get unconnected vertices if the number of initial vertices is not equal to the number of edges each vertex has. Of the initial vertices, those that do not have a connection after the first new vertex has been connected, will never get one since the probability that a new vertex will connect to them is always zero. I chose to just connect all initial nodes to each other, mainly because I really didn't know what to do. I noticed that JUNG (jung.sf.net) chose another way to go, by changing p =3D degree(v) / |E| to p =3D (degree(v) + 1) / (|E| + |V|) If someone could look over my code and point out/correct any errors I've made, and make suggestions for the initial nodes problem, I would be most thankful. Bj=F6rn Lijnema |