I have created a random graph of 50 nodes as follows. Where, I have specified the that every node must have degree 6.
> set.seed(1234)
> g = sample_degseq(out.deg = rep(6,50), method = "simple.no.multiple")
> degree(g)
[1] 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6
[32] 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6
> plot(g, vertex.label= NA, edge.arrow.size=0.02,vertex.size = 25.5, xlab = "Random Network: G(N,p) model")
> g
IGRAPH 1a84fc6 U--- 50 150 -- Degree sequence random graph
+ attr: name (g/c), method (g/c)
+ edges from 1a84fc6:
[1] 1--19 1--27 1--37 1--38 1--46 1--47 2--13 2--15 2--24
[10] 2--36 2--46 2--47 3--12 3--15 3--18 3--45 3--49 3--50
[19] 4--23 4--24 4--31 4--40 4--41 4--47 5--17 5--21 5--26
[28] 5--28 5--35 5--46 6--11 6--31 6--36 6--40 6--48 6--49
[37] 7-- 9 7--20 7--22 7--26 7--32 7--41 8--16 8--18 8--27
[46] 8--37 8--40 8--49 9--12 9--18 9--19 9--22 9--35 10--18
[55] 10--21 10--33 10--40 10--41 10--50 11--19 11--25 11--27 11--30
[64] 11--47 12--30 12--40 12--42 12--43 13--16 13--21 13--25 13--26
+ ... omitted several edges
Now, I want to make another 4 random graphs from above random graph by changing its degree distribution. I want to keep the same topology, as of above graph. The new 4 random graphs should have the following degree distribution.
- Uniform Erdos-Renyi random graph = uniform degree distribution
- Poisson Erdos-Renyi random graph = Poisson degree distribution
- Scale – free random graph (Barabasi – Albert graph) = Power-law degree distribution
- Small world random graph (Watts – Strogatz graph) = small world properties such as short average path lengths and high clustering.
Can anyone help me to create 4 random graphs from original graph by changing its degree distribution?
Aucun commentaire:
Enregistrer un commentaire