I am trying to construct a BA graph with 500 nodes and about 37000 edges. The number of edges to attach from a new node to existing nodes should be at least 91 to make enough number of edges.
I checked it from barabasi_albert_graph(n, m, seed=None) function in Networkx.
The algorithm is as follows[1]:
Add $m$ nodes to G.
Connect nodes in $G$ randomly until you get a connected graph.
Create a new node i.
Pick a node j uniformly at random from the graph G. Set $ p= k(j)/k_{tot}$.
Pick a real number $r$ uniformly at random between $0$ and $1$.
If $ r<p$ then add $j$ to i's adjacency list.
Repeat steps 4 - 6 until i has m nodes in its adjacency list.
Add $i$ to the adjacency list of each node in its adjacency list.
Add $i$ to to the graph.
Repeat steps 3 - 9 until there are $N$ nodes in the graph.
The question is step 2. When $m$ should be at least 91, a large part of my graph have a random construction. Is it a correct way of making the BA model?