and n = 106 nodes, with a power-law exponent of 2.**5. I.e., for each number**
of nodes n we sampled n expected (weighted) degrees di **from the power-law**
distribution P(di) ∼ d
−2.5 i. A power-law degree distribution with this exponent is often observed in realistic networks (Newman, 2003), so we **believe this**
is a representative set of examples. For each of these degree distributions, we fitted four different types of undirected networks: unweighted networks with and without self-loops, and positive integer-valued weighted networks with and without self-loops.

To fit the MaxEnt models for networks we made use of Newton's method, which we implemented in MATLAB. As can be seen from Fig. 5, the computation time was under 30 seconds even for the largest network with 106 **nodes.**
The number of Newton iterations is less than 50 for all models and degree distributions considered.

Real-life networks **We also fitted the MaxEnt model to two large real-life**
networks:
- A symmetrized snapshot of the internet created by Mark Newman in **July**
2006.3 **This is an undirected unweighted network. The number of nodes**
in this network is 22, **963, the total number of different degrees is 161, with**
degrees ranging between 1 and 2390. Fitting the MaxEnt model required 0.**73 seconds.**
- **A network of movie actors (Barabasi and Albert, 1999), where edges between actors are weighted by the number of movies in which they jointly**
appeared. I.e., this is an undirected integer-valued weighted network. The number of nodes (actors) in this network is 127, **823, the total number of** unique degrees is 2, 526, with values ranging between 0 and 8, **382. Fitting**
the MaxEnt model required 689 seconds, much larger than for the **internet**
network mostly due to the larger number of unique degrees.

General remarks on the network experiments **This fast performance can**
be achieved thanks to the fact that the number of different degrees observed in the degree distribution is typically much smaller than the size of the network (see discussion in Sec. 3.4). The bottom graph in Fig. 5, showing the number of Lagrange multipliers as a function of the network size supports this. The memory requirements remain well under control for the same reasons.

It should be pointed out that in the worst case for dense or for weighted networks (and in particular for real-valued weights), the number of distinct expected weighted degrees and hence the number of Lagrange multipliers can be as large as the number of nodes n. This would make it much harder to use offthe-shelf optimization tools for n **much larger than a few thousands. However,**
the problem can be made tractable again if it is acceptable to approximate the expected weighted degrees by grouping subsets of them together into bins, and 3Available from http://www-personal.umich.edu/∼mejn/netdata/.