Abstract
We present a nearly-linear time algorithm for counting and randomly generating simple graphs with a given degree sequence in a certain range. For degree sequence (d i ) ni=1 with maximum degree d max =O(m 1/4−τ), our algorithm generates almost uniform random graphs with that degree sequence in time O(md max ) where \(m=\frac{1}{2}\sum_{i}d_{i}\) is the number of edges in the graph and τ is any positive constant. The fastest known algorithm for uniform generation of these graphs (McKay and Wormald in J. Algorithms 11(1):52–67, 1990) has a running time of O(m 2 d 2max ). Our method also gives an independent proof of McKay’s estimate (McKay in Ars Combinatoria A 19:15–25, 1985) for the number of such graphs.
We also use sequential importance sampling to derive fully Polynomial-time Randomized Approximation Schemes (FPRAS) for counting and uniformly generating random graphs for the same range of d max =O(m 1/4−τ).
Moreover, we show that for d=O(n 1/2−τ), our algorithm can generate an asymptotically uniform d-regular graph. Our results improve the previous bound of d=O(n 1/3−τ) due to Kim and Vu (Adv. Math. 188:444–469, 2004) for regular graphs.
Similar content being viewed by others
References
Alderson, D., Doyle, J., Willinger, W.: Toward and optimization-driven framework for designing and generating realistic Internet topologies. HotNets (2002)
Alon, N., Spencer, J.: The Probabilistic Method. Wiley, New York (1992)
Amraoui, A., Montanari, A., Urbanke, R.: How to find good finite-length codes: from art towards science. Preprint, cs.IT/0607064 (2006)
Bassetti, F., Diaconis, P.: Examples comparing importance sampling and the Metropolis algorithm (2005)
Bayati, M., Montanari, A., Saberi, A.: Generating random graphs with large girth. In: ACM-SIAM Symposium on Discrete Algorithms (SODA) (2009)
Bender, E.A., Canfield, E.R.: The asymptotic number of labeled graphs with given degree sequence. J. Comb. Theory Ser. A 24(3), 296–307 (1978)
Bezáková, I., Bhatnagar, N., Vigoda, E.: Sampling binary contingency tables with a greedy start. In: Symposium on Discrete Algorithms (SODA) (2006)
Bezáková, I., Sinclair, A., S̆tefankovič, D., Vigoda, E.: Negative examples for sequential importance sampling of binary contingency tables. In: Proceedings of Annual European Symposium, vol. 14. Lecture Notes in Computer Science, vol. 4168, pp. 136–147. Springer, Berlin (2006)
Blanchet, J.: Efficient importance sampling for binary contingency tables. Ann. Appl. Probab. 19(3), 949–982 (2009)
Blitzstein, J., Diaconis, P.: A sequential importance sampling algorithm for generating random graphs with prescribed degrees. Ann. Appl. Probab. (2005, submitted)
Bollobás, B.: A probabilistic proof of an asymptotic formula for the number of labelled regular graphs. Eur. J. Comb. 1(4), 311–316 (1980)
Bu, T., Towsley, D.: On distinguishing between Internet power law topology generator. In: INFOCOM (2002)
Chen, Y., Diaconis, P., Holmes, S., Liu, J.S.: Sequential Monte Carlo methods for statistical analysis of tables. J. Am. Stat. Assoc. 100, 109–120 (2005)
Chung, F., Lu, L.: Connected components in random graphs with given expected degree sequence. Ann. Comb. 6(2), 125–145 (2002)
Cooper, C., Dyer, M., Greenhill, C.: Sampling regular graphs and peer-to-peer network. Comb. Probab. Comput. 16 (2007)
Diaconis, P., Gangolli, A.: Rectangular arrays with fixed margins. In: Discrete Probability and Algorithms, Minneapolis, MN, 1993. IMA Volumes in Mathematics and Its Applications, vol. 72, pp. 15–41. Springer, New York (1995)
Faloutsos, M., Faloutsos, P., Faloutsos, C.: On power-law relationships of the Internet topology. In: SIGCOM (1999)
Gkantsidis, C., Mihail, M., Zegura, E.: The Markov chain simulation method for generating connected power law random graphs. Alenex (2003)
Jerrum, M., Sinclair, A.: Approximate counting, uniform generation and rapidly mixing Markov chains. Inf. Comput. 82(1), 93–133 (1989)
Jerrum, M., Sinclair, A.: Fast uniform generation of regular graphs. Theor. Comput. Sci. 73(1), 91–100 (1990)
Jerrum, M., Valiant, L., Vazirani, V.: Random generation of combinatorial structures from a uniform distribution. Theor. Comput. Sci. 43, 169–188 (1986)
Jerrum, M., Sinclair, A., McKay, B.: When is a graphical sequence stable? In: Random Graphs, Poznań, 1989, vol. 2, pp. 101–115. Wiley-Interscience, New York (1992)
Kannan, R., Tetali, P., Vempala, S.: Simple Markov chain algorithms for generating bipartite graphs and tournaments. Random Struct. Algorithms 14, 293–308 (1999)
Kim, J.H.: On Brooks’ theorem for sparse graphs. Comb. Probab. Comput. 4, 97–132 (1995)
Kim, J.H., Vu, V.H.: Concentration of multivariate polynomials and its applications. Combinatorica 20(3), 417–434 (2000)
Kim, J.H., Vu, V.H.: Generating random regular graphs. In: STOC 2003, pp. 213–222
Kim, J.H., Vu, V.: Sandwiching random graphs. Adv. Math. 188, 444–469 (2004)
Knuth, D.: Mathematics and computer science: coping with finiteness. Science 194(4271), 1235–1242 (1976)
McKay, B.: Asymptotics for symmetric 0-1 matrices with prescribed row sums. Ars Combinatoria A 19, 15–25 (1985)
McKay, B., Wormald, N.C.: Uniform generation of random regular graphs of moderate degree. J. Algorithms 11(1), 52–67 (1990)
McKay, B., Wormald, N.C.: Asymptotic enumeration by degree sequence of graphs with degrees o(n 1/2). Combinatorica 11(4), 369–382 (1991)
Medina, A., Matta, I., Byers, J.: On the origin of power laws in Internet topologies. ACM Comput. Commun. Rev. 30(2), 18–28 (2000)
Milo, R., ShenOrr, S., Itzkovitz, S., Kashtan, N., Chklovskii, D., Alon, U.: Network motifs: simple building blocks of complex networks. Science 298, 824–827 (2002)
Milo, R., Kashtan, N., Itzkovitz, S., Newman, M., Alon, U.: On the uniform generation of random graphs with prescribed degree sequences. http://arxiv.org/PS_cache/cond-mat/pdf/0312/0312028.pdf (2004)
Molloy, M., Reed, B.: A critical point for random graphs with a given degree sequence. Random Struct. Algorithms 6(2–3), 161–179 (1995)
Sinclair, A.: Personal communication (2006)
Steger, A., Wormald, N.C.: Generating random regular graphs quickly. Comb. Probab. Comput. 8(4), 377–396 (1997) (English summary in Random Graphs and Combinatorial Structures, Oberwolfach)
Tangmunarunkit, H., Govindan, R., Jamin, S., Shenker, S., Willinger, W.: Network topology generators: degree based vs. structural. In: ACM SIGCOM (2002)
Vu, V.H.: Concentration of non-Lipschitz functions and applications, Probabilistic methods in combinatorial optimization. Random Struct. Algorithms 20(3), 267–316 (2002)
Wormald, N.C.: Models of random regular graphs. In: Surveys in Combinatorics. Canterbury. London Mathematical Society Lecture Note Series, vol. 265, pp. 239–298. Cambridge University Press, Cambridge (1999)
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Bayati, M., Kim, J.H. & Saberi, A. A Sequential Algorithm for Generating Random Graphs. Algorithmica 58, 860–910 (2010). https://doi.org/10.1007/s00453-009-9340-1
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00453-009-9340-1