arXiv++ Combinatorics

Browse math.CO papers from arXiv

Papers by Martin Pépin

4 paper(s) by this author · All BibTeX
2026-10-27
Counting and Sampling Git Graphs
Version Control Systems, like Git and Mercurial, represent the history of a project as a Directed Acyclic Graph, capturing divergences and merges throughout development. A widely adopted workflow, the feature branch workflow, imposes a particularly simple structure: a single main branch and features branches evolving in parallel without interfering with one another. This work presents an enumerative study of these Git graphs. We first establish a bijection between Git graphs and a simpler combinatorial class, which we term cyclariums, and derive their exact count at size n, namely \( \sum\_{k=2}^n \sum\_{f = 1}^{k-1} {k \brack f} { n - k - 1 \choose k - f - 1} \). Using a saddle-point method, we further show that this number is asymptotically equivalent to \[ \frac{e^{1/8}}{2} \left(\frac{n}{2e}\right)^{\frac n 2} \exp\left(\frac 1 2 \ln\frac n 2 \sqrt{\frac n 2} + \sqrt{2 n} + \frac{(\ln\frac n 2)^2}{32} \right) \left(\frac n 2\right)^{-3/8}. \] Additionally, we analyze the limit laws of key parameters. Finally, we address random generation by designing both a uniform sampler and a Boltzmann sampler for these graphs.
Boltzmann sampling and optimal exact-size sampling for directed acyclic graphs
We propose two efficient algorithms for generating uniform random directed acyclic graphs, including an asymptotically optimal exact-size sampler that performs $\frac{n^2}{2} + o(n^2)$ operations and requests to a random generator. This was achieved by extending the Boltzmann model for graphical generating functions and by using various decompositions of directed acyclic graphs. The presented samplers improve upon the state-of-the-art algorithms in terms of theoretical complexity and offer a significant speed-up in practice.
2024-03-04 v2
Random Generation of Git Graphs
Published in GASCom 2024, Jun 2024, Talence, France, France • View Publication • BIB
Version Control Systems, such as Git and Mercurial, manage the history of a project as a Directed Acyclic Graph encoding the various divergences and synchronizations happening in its life cycle. A popular workflow in the industry, called the feature branch workflow, constrains these graphs to be of a particular shape: a unique main branch, and non-interfering feature branches. Here we focus on the uniform random generation of those graphs with n vertices, including k on the main branch, for which we provide three algorithms, for three different use-cases. The first, based on rejection, is efficient when aiming for small values of k (more precisely whenever k = O($\sqrt$ n)). The second takes as input any number k of commits in the main branch, but requires costly precalculation. The last one is a Boltzmann generator and enables us to generate very large graphs while targeting a constant k/n ratio. All these algorithms are linear in the size of their outputs.
2023-03-26 v4
Asymptotic analysis and efficient random sampling of directed ordered acyclic graphs
Directed acyclic graphs (DAGs) are directed graphs in which there is no path from a vertex to itself. DAGs are an omnipresent data structure in computer science and the problem of counting the DAGs of given number of vertices and to sample them uniformly at random has been solved respectively in the 70's and the 00's. In this paper, we propose to explore a new variation of this model where DAGs are endowed with an independent ordering of the out-edges of each vertex, thus allowing to model a wide range of existing data structures. We provide efficient algorithms for sampling objects of this new class, both with or without control on the number of edges, and obtain an asymptotic equivalent of their number. We also show the applicability of our method by providing an effective algorithm for the random generation of classical labelled DAGs with a prescribed number of vertices and edges, based on a similar approach. This is the first known algorithm for sampling labelled DAGs with full control on the number of edges, and it meets a need in terms of applications, that had already been acknowledged in the literature.