Gray, C.Mitchell, L.Roughan, M.Gleeson, J.2020-05-182020-05-182019Journal of Complex Networks, 2019; 7(6):896-9122051-13102051-1329http://hdl.handle.net/2440/124786Advance Access Publication on 20 March 2019Sampling random graphs is essential in many applications, and often algorithms use Markov chain Monte Carlo methods to sample uniformly from the space of graphs. However, often there is a need to sample graphs with some property that we are unable, or it is too inefficient, to sample using standard approaches. In this paper, we are interested in sampling graphs from a conditional ensemble of the underlying graph model. We present an algorithm to generate samples from an ensemble of connected random graphs using a Metropolis-Hastings framework. The algorithm extends to a general framework for sampling from a known distribution of graphs, conditioned on a desired property. We demonstrate the method to generate connected spatially embedded random graphs, specifically the well known Waxman network, and illustrate the convergence and practicalities of the algorithm.en© The authors 2019. Published by Oxford University Press. All rights reserved.random graphs; MCMC; network sampling; connected networksGenerating connected random graphsJournal article003013297310.1093/comnet/cnz0110005097708000042-s2.0-85077756137457299Gray, C. [0000-0003-1928-7008]Mitchell, L. [0000-0001-8191-1997]Roughan, M. [0000-0002-7882-7329]