Generating Random Networks Without Short Cycles

36 Pages Posted: 5 Oct 2016 Last revised: 4 Jan 2018

See all articles by Mohsen Bayati

Mohsen Bayati

Stanford Graduate School of Business

Andrea Montanari

Stanford University

Amin Saberi

Stanford University - Management Science & Engineering

Date Written: October 4, 2016


Random graph generation is an important tool for studying large complex networks. Despite abundance of random graph models, constructing models with application-driven constraints is poorly understood. In order to advance state-of-the-art in this area, we focus on random graphs without short cycles as a stylized family of graphs, and propose the RandGraph algorithm for randomly generating these graphs. For any constant k, when m is a certain super-linear function of n, RandGraph generates an asymptotically uniform random graph with n vertices, m edges, and no cycle of length at most k using O(n^2m) operations. We also characterize the approximation error for finite values of n. To the best of our knowledge, this is the first polynomial-time algorithm for the problem. RandGraph works by sequentially adding m edges to an empty graph with n vertices. Recently, such sequential algorithms have been successful for random sampling problems. Our main contributions to this line of research includes introducing a new approach for sequentially approximating edge-specific probabilities at each step of the algorithm, and providing a new method for analyzing it.

Keywords: Network sampling, Random graph, Poisson approximation, Janson inequality

Suggested Citation

Bayati, Mohsen and Montanari, Andrea and Saberi, Amin, Generating Random Networks Without Short Cycles (October 4, 2016). Stanford University Graduate School of Business Research Paper No. 16-43, Available at SSRN: or

Mohsen Bayati (Contact Author)

Stanford Graduate School of Business ( email )

655 Knight Way
Stanford, CA 94305-5015
United States


Andrea Montanari

Stanford University ( email )

Stanford, CA 94305
United States

Amin Saberi

Stanford University - Management Science & Engineering ( email )

473 Via Ortega
Stanford, CA 94305-9025
United States

Here is the Coronavirus
related research on SSRN

Paper statistics

Abstract Views
PlumX Metrics