algorithm.

Monte-Carlo algorithm
---------------------

Our Monte-Carlo simulations consist in generating lots of random graphs, removing leaves step by step, and studying the remaining cores and isolated points. More precisely, for a given set of parameters $(N,\alpha)$, we generated random graphs in the *microcanonical* ensemble, with $N$ vertices and $L=N\alpha/2$ edges ($L$ is rounded to the nearest integer value). In the microcanonical ensemble the total number $L$ of edges is fixed (in contrast to the *canonical* ensemble in which $L$ fluctuates).

As we want to simulate graphs with $N$ up to $10^6$ and with an average connectivity $\alpha$ of order $O(1)$, we must use an algorithm which requires computer memory and time of order $O(N)$, not $O(N^2)$. With the microcanonical ensemble, the program is simpler: a random graph is obtained by choosing at random $L$ distinct edges among all the possible edges. From a Monte-Carlo point of view, the microcanonical ensemble has another advantage: the measurements fluctuate less.

As the graph (or equivalently its adjacency matrix) is very sparse, it is stored in an array $T$ of $2L$ integers, indexed by an array $K$ of $N+1$ integers; the set of vertices adjacent to the vertex $v$ is the array section $\{T(i)\}$ 