Are We There Yet? When to Stop a Markov Chain while Generating Random Graphs

  • Jaideep Ray
  • Ali Pinar
  • C. Seshadhri
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7323)


Markov chains are convenient means of generating realizations of networks with a given (joint or otherwise) degree distribution, since they simply require a procedure for rewiring edges. The major challenge is to find the right number of steps to run such a chain, so that we generate truly independent samples. Theoretical bounds for mixing times of these Markov chains are too large to be practically useful. Practitioners have no useful guide for choosing the length, and tend to pick numbers fairly arbitrarily. We give a principled mathematical argument showing that it suffices for the length to be proportional to the number of desired number of edges. We also prescribe a method for choosing this proportionality constant. We run a series of experiments showing that the distributions of common graph properties converge in this time, providing empirical evidence for our claims.


graph generation Markov chain Monte Carlo independent samples 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Barabási, A.L., Albert, R.: Emergence of scaling in random networks. Science 286(5349), 509–512 (1999)MathSciNetGoogle Scholar
  2. 2.
    Newman, M.E.J.: Assortative mixing in networks. Phys. Rev. Lett. 89, 208701 (2002)CrossRefGoogle Scholar
  3. 3.
    Holme, P., Zhao, J.: Exploring the assortativity-clustering space of a network’s degree sequence. Phys. Rev. E 75, 046111 (2007)Google Scholar
  4. 4.
    Kannan, R., Tetali, P., Vempala, S.: Simple markov-chain algorithms for generating bipartite graphs and tournaments. Random Struct. Algorithms 14(4), 293–308 (1999)MathSciNetCrossRefzbMATHGoogle Scholar
  5. 5.
    Jerrum, M., Sinclair, A.: Fast uniform generation of regular graphs. Theor. Comput. Sci. 73(1), 91–100 (1990)MathSciNetCrossRefzbMATHGoogle Scholar
  6. 6.
    Jerrum, M., Sinclair, A., Vigoda, E.: A polynomial-time approximation algorithm for the permanent of a matrix with nonnegative entries. J. ACM 51(4), 671–697 (2004)MathSciNetCrossRefzbMATHGoogle Scholar
  7. 7.
    Gkantsidis, C., Mihail, M., Zegura, E.W.: The Markov chain simulation method for generating connected power law random graphs. In: ALENEX, pp. 16–25 (2003)Google Scholar
  8. 8.
    Stanton, I., Pinar, A.: Constructing and sampling graphs with a prescribed joint degree distribution using Markov chains. ACM Journal of Experimental Algorithmics (to appear)Google Scholar
  9. 9.
    Shen-Orr, S.S., Milo, R., Mangan, S., Alon, U.: Network motifs in the transcriptional regulation network of escherichia coli. Nature Genetics 31, 64–68 (2002)CrossRefGoogle Scholar
  10. 10.
    Maslov, S., Sneppen, K.: Specificity and stability in topology of protein networks. Science 296(5569), 910–913 (2002)CrossRefGoogle Scholar
  11. 11.
    Adams, S.: Dilbert: Random number generator (2001),
  12. 12.
    Sokal, A.: Monte Carlo methods in statistical mechanics: Foundations and new algorithms (1996)Google Scholar
  13. 13.
    Ray, J., Pinar, A., Seshadhri, C.: Are we there yet? when to stop a markov chain while generating random graphs. CoRR abs/1202.3473 (2012)Google Scholar
  14. 14.
    Raftery, A., Lewis, S.M.: Implementing MCMC. In: Gilks, W.R., Richardson, S., Spiegelhalter, D.J. (eds.) Markov Chain Monte Carlo in Practice, pp. 115–130. Chapman and Hall (1996)Google Scholar
  15. 15.
    Raftery, A.E., Lewis, S.M.: How many iterations in the Gibbs sampler? In: Bernardo, J.M., Berger, J.O., Dawid, A.P., Smith, A.F.M. (eds.) Bayesian Statistics, vol. 4, pp. 765–766. Oxford University Press (1992)Google Scholar
  16. 16.
    Bishop, Y.M., Fienberg, S.E., Holland, P.W.: Discrete multivariate analysis: Theory and practice. Springer, New York (2007)zbMATHGoogle Scholar
  17. 17.
    Watts, D.J., Strogatz, S.H.: Collective dynamics of ’small-world’ networks. Nature 393, 440–442 (1998)CrossRefGoogle Scholar
  18. 18.
    Newman, M.E.J.: Finding community structure in networks using the eigenvectors of matrices. Phys. Rev. E 74, 036104 (2006)Google Scholar
  19. 19.
    Richardson, M., Agrawal, R., Domingos, P.: Trust Management for the Semantic Web. In: Fensel, D., Sycara, K., Mylopoulos, J. (eds.) ISWC 2003. LNCS, vol. 2870, pp. 351–368. Springer, Heidelberg (2003), doi:10.1007/978-3-540-39718-2_23CrossRefGoogle Scholar
  20. 20.
    Newman, M.E.J.: Prof. M. E. J. Newman’s collection of graphs at University of Michigan,
  21. 21.
    Stanford Network Analysis Platform Collection of Graphs: The Epinions social network from the Stanford Network Analysis Platform collection,
  22. 22.
    Gelman, A., Rubin, D.B.: Inference from iterative simulation using multiple sequences. Statistical Science 7, 457–472 (1992)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Jaideep Ray
    • 1
  • Ali Pinar
    • 1
  • C. Seshadhri
    • 1
  1. 1.Sandia National LaboratoriesLivermoreUSA

Personalised recommendations