C Appendix C Algorithms for network simulation and investigation
In this appendix we present efficient methods for simulating the networks discussed in the book and some efficient algorithms for analyzing their structure.
C.1 Simulation of generalized random graphs
To simulate general networks we have used the following algorithm.
(i) For each node choose a degree from the required distribution.
(ii) Create a list where each node is repeated as many times as the chosen degree.
(iii) Randomly choose pairs from the list and connect the chosen nodes (by storing for each node a list of neighbors, and adding each of the selected nodes node to the ...