Abstract
The standard algorithm for fast generation of Erdős-Rényi random graphs only works in the Real RAM model. The critical point is the generation of geometric random variates Geo(p), for which there is no algorithm that is both exact and efficient in any bounded precision machine model. For a RAM model with word size w = Ω(loglog(1/p)), we show that this is possible and present an exact algorithm for sampling Geo(p) in optimal expected time \(\mathcal{O}(1 + \log(1/p) / w)\). We also give an exact algorithm for sampling min{n, Geo(p)} in optimal expected time \(\mathcal{O}(1 + \log(\operatorname{min}\{1/p,n\})/w)\). This yields a new exact algorithm for sampling Erdős-Rényi and Chung-Lu random graphs of n vertices and m (expected) edges in optimal expected runtime \(\mathcal{O}(n + m)\) on a RAM with word size w = Θ(logn).
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Batagelj, V., Brandes, U.: Efficient generation of large random networks. Phys. Rev. E 71, 036113 (2005)
Blanca, A., Mihail, M.: Efficient generation ε-close to G(n,p) and generalizations (2012), arxiv.org/abs/1204.5834
Blitzstein, J.K., Diaconis, P.: A sequential importance sampling algorithm for generating random graphs with prescribed degrees. Internet Mathematics 6, 489–522 (2011)
Brent, R., Zimmermann, P.: Modern Computer Arithmetic. Cambridge University Press (2010)
Chung, F., Lu, L.: Connected components in random graphs with given expected degree sequences. Annals of Combinatorics 6, 125–145 (2002)
Cook, S.A., Reckhow, R.A.: Time bounded random access machines. J. Comput. Syst. Sci. 7, 354–375 (1973)
De, A., Kurur, P.P., Saha, C., Saptharishi, R.: Fast integer multiplication using modular arithmetic. In: 40th Symp. Theory of Computing (STOC), pp. 499–506 (2008)
Devroye, L.: Non-uniform random variate generation. Springer (1986)
Erdős, P., Rényi, A.: On random graphs. Publ. Math. Debrecen 6, 290–297 (1959)
Flajolet, P., Saheb, N.: The complexity of generating an exponentially distributed variate. J. Algorithms 7, 463–488 (1986)
Flajolet, P., Pelletier, M., Soria, M.: On Buffon machines and numbers. In: 22nd Symp. Discrete Algorithms (SODA), pp. 172–183 (2011)
Fürer, M.: Faster integer multiplication. SIAM J. Comput. 39, 979–1005 (2009)
Ghosh, A., Roughgarden, T., Sundararajan, M.: Universally utility-maximizing privacy mechanisms. In: 41st Symp. Theory of Computing (STOC), pp. 351–360 (2009)
Hagberg, A.A., Schult, D.A., Swart, P.J.: Exploring network structure, dynamics, and function using NetworkX. In: 7th Conf. Python in Science, pp. 11–15 (2008)
Karney, C.: Random number library, version 1.5 (2012), http://sourceforge.net/projects/randomlib
Keeling, M.J., Eames, K.T.: Networks and epidemic models. Journal of The Royal Society Interface 2, 295–307 (2005)
Kim, J.H., Vu, V.H.: Generating random regular graphs. In: 35th Symp. Theory of Computing (STOC), pp. 213–222. ACM (2003)
Knuth, D.E., Yao, A.C.-C.: The complexity of nonuniform random number generation. In: Traub, J.F. (ed.) Symposium on Algorithms and Complexity: New Directions and Recent Results, pp. 357–428 (1976)
Mehlhorn, K., Näher, S.: LEDA: A Platform for Combinatorial and Geometric Computing. Cambridge University Press (1999)
Miller, J.C., Hagberg, A.: Efficient generation of networks with given expected degrees. In: Frieze, A., Horn, P., Prałat, P. (eds.) WAW 2011. LNCS, vol. 6732, pp. 115–126. Springer, Heidelberg (2011)
Milo, R., Shen-Orr, S., Itzkovitz, S., Kashtan, N., Chklovskii, D., Alon, U.: Network motifs: Simple building blocks of complex networks. Science 298, 824–827 (2002)
Norros, I., Reittu, H.: On a conditionally Poissonian graph process. Advances in Applied Probability 38, 59–75 (2006)
Ray, J., Pinar, A., Seshadhri, C.: Are we there yet? When to stop a markov chain while generating random graphs. In: Bonato, A., Janssen, J. (eds.) WAW 2012. LNCS, vol. 7323, pp. 153–164. Springer, Heidelberg (2012)
Solovay, R., Strassen, V.: A fast Monte-Carlo test for primality. SIAM J. Comput. 6, 84–85 (1977)
van der Hofstad, R.: Random graphs and complex networks (2009), http://www.win.tue.nl/~rhofstad/NotesRGCN.pdf
von Neumann, J.: Various techniques used in connection with random digits. In: Householder, A.S., et al. (eds.) The Monte Carlo Method. National Bureau of Standards, Applied Mathematics Series, vol. 12, pp. 36–38 (1951)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2013 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Bringmann, K., Friedrich, T. (2013). Exact and Efficient Generation of Geometric Random Variates and Random Graphs. In: Fomin, F.V., Freivalds, R., Kwiatkowska, M., Peleg, D. (eds) Automata, Languages, and Programming. ICALP 2013. Lecture Notes in Computer Science, vol 7965. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-39206-1_23
Download citation
DOI: https://doi.org/10.1007/978-3-642-39206-1_23
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-39205-4
Online ISBN: 978-3-642-39206-1
eBook Packages: Computer ScienceComputer Science (R0)