The Erdős-Rényi Random Graph Conditioned on Every Component Being a Clique
Martijn Gösgens, Lukas Lüchtrath, Elena Magnanini, Marc Noy, Élie de Panafieu
TL;DR
This paper analyzes CG_{n,p}, the ER graph conditioned to have only clique components, thereby inducing a prior over vertex partitions (communities). Using analytic combinatorics, generating functions, and saddle-point methods, it establishes a phase transition at p=1/2: the graph becomes a single clique for p>1/2, while for p≤1/2 the graph decomposes into many small cliques with precise limiting laws for the number of clusters, edges, and vertex degrees. It also derives a full set of exact generating-function expressions and limit theorems across the critical, subcritical, and near-critical regimes, including sparse settings, and connects these results to Bayesian community-detection methods by showing modularity maximization corresponds to posterior inference under CG-based priors. The near-critical window and sparse-regime analyses illuminate how small changes in p dramatically alter the partition structure, with implications for selecting priors in Bayesian community detection. Overall, the work provides a rigorous probabilistic and combinatorial framework for understanding cluster-graph conditioning of ER graphs and their use in modularity-based inference.
Abstract
Motivated by an application in community detection, we consider an \ER random graph conditioned on the rare event that all connected components are fully connected. Such graphs can be considered as partitions of vertices into cliques. Hence, this conditional distribution defines a distribution over partitions. We show that a popular community detection method is equivalent to Bayesian inference with this distribution as prior over the community partitions. Using tools from analytic combinatorics, we prove limit theorems for several graph observables in this conditional distribution: the number of cliques; the number of edges; and the degree distribution. We consider several regimes of the connection probability $p$ as the number of vertices $n$ diverges. For $p=\tfrac{1}{2}$, the conditioning yields the uniform distribution over set partitions, which is well-studied, but has not been studied as a graph distribution before. For $p<\tfrac{1}{2}$, we show that the number of cliques is of the order $n/\sqrt{\log n}$, while for $p>\tfrac{1}{2}$, we prove that the graph consists of a single clique with high probability. This shows that there is a phase transition at $p=\tfrac{1}{2}$. We additionally study the near-critical regime $p_n\downarrow\tfrac{1}{2}$, as well as the sparse regime $p_n\downarrow0$. Finally, we discuss the implications of these results for community detection.
