Why does my Barabasi Albert model implementation doesn't produce a scale free network

1.1k Views Asked by At

I'm trying to implement the Barabasi Albert model to generate some scale free network matching a power law distribution of degree. I'm using a value $m = 2$ for the main parameter of the algorithm, but the same problem occures using $m = 1$.

Step of my algorithm:

  1. Make a clique for $m$ random element of the graph
  2. Add this element to a processed list $L$
  3. Take one node, $N$, not in $L$, if no, go to 7
  4. Create $m$ edges from $N$ to $m$ elements of $L$. The connection probability is with the node $i$ is $P(i) = \dfrac{D_i}{\sum\limits_{j} D_j}$ where $D_i$ is the degree of the node $i$
  5. Add $N$ to $L$, go to 4
  6. End of the algorithm

I'm considering a non-oriented graph, and when I'm plotting practical result with 600 nodes the degree distribution doesn't look at all like a power law.

enter image description here

Can you confirm that my described algorithm is supposed to give a power law (bonus point with some proof) ?

PS: first question on Mathematics, I know it's kind of related to computing but I'm still thinking it's the right place to ask, feel free to comment and edit about style and legitimacy.