Searcharxiv⌕ Search

arXiv · 2610.37208

Counting and Sampling Git Graphs

Abstract

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.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Julien Courtiel, Martin Pépin. 2026-10-27. Counting and Sampling Git Graphs. https://arxiv.org/abs/2610.37208

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

A spanning tree model for chromatic homology

After the discovery of Khovanov homology, which categorifies the Jones polynomial, an analogous categorification of the chromatic polynomial, known as chromatic homology, was introduced. Its graded Euler characteristic recovers the chromatic polynomial. In this paper, we present a spanning tree model for the chromatic complex, i.e., we describe a chain complex generated by certain spanning trees of the graph that is chain homotopy equivalent to the chromatic complex. We employ the spanning tree model over $\mathcal{A}_m:= \frac{\mathbb{Z}[x]}{ }$ algebra to answer two open questions. First, we establish the conjecture posed by Sazdanovic and Scofield regarding the homological span of chromatic homology over $\mathcal{A}_m$ algebra, demonstrating that for any graph $G$ with $v$ vertices and $b$ blocks, the homological span is $v - b$. Additionally, we prove a conjecture of Helme-Guizon, Przytycki, and Rong concerning the existence of torsion of order dividing $m$ in chromatic homology over $\mathcal{A}_m$ algebra.

math.CO↗

The double of a simplicial complex

We introduce the notion of doubling and r-tupling for simplicial complexes, a notion reminiscent to that of matching complexes in graph theory. We prove a connectivity result for such complexes and relate r-tupling to stabilizing r times faster in homological stability.

math.CO↗

On the Vertices of Delta-modular Polyhedra

Let $P$ be a polytope defined by the system $A x \leq b$, where $A \in R^{m \times n}$, $b \in R^m$, and $\text{rank}(A) = n$. We give a short geometric proof of the following tight upper bound on the number of vertices of $P$: $$ n! \cdot \fracΔ{Δ_{\text{average}}} \cdot \text{vol}(B_2) \sim \frac{1}{\sqrt{πn}} \cdot \left(\frac{2 π}{e}\right)^{n/2} \cdot n^{n/2} \cdot \fracΔ{Δ_{\text{average}}}, $$ where $Δ$ is the maximum absolute value of $n \times n$ subdeterminants of $A$, and $Δ_{\text{average}}$ is the average absolute value of subdeterminants of $A$ corresponding to a triangulation of $P$'s normal fan. Assuming that $A$ is integer, such polyhedra are called $Δ$-modular polyhedra. Note that in the integer case, the bound can be simplified via the inequality $Δ_{\text{average}} \geq Δ_{\min} \geq 1$, where $Δ_{\min}$ is the minimum absolute value of subdeterminants of $A$ corresponding to feasible bases of $A x \leq b$. For this, we prove and use a symmetric variant of Macbeath's theorem. Additionally, we give a direct argument based on prior results in the field, showing that the graph diameter of $P$ is bounded by $O\bigl(n^3 \cdot \fracΔ{Δ_{\min}} \cdot \ln (n \fracΔ{Δ_{\min}}) \bigr)$. Thus, both characteristic of $P$ are linear in $Δ/Δ_{\min}$. From an algorithmic perspective, we demonstrate that: Given $A \in Q^{m \times n}$, $b \in Q^m$, and an initial feasible solution to $A x \leq b$, the convex hull of $P$ can be constructed in $O(n)^{n/2} \cdot m^2 \cdot \fracΔ{Δ_{\text{average}}}$ operations. For simple polyhedra, the dependence on $m$ reduces to linear; Given $A \in Z^{m \times n}$ and $b \in Q^m$, the number $|P \cap Z^n|$ can be computed in $O(n)^n \cdot \frac{Δ^4}{Δ_{\text{average}}}$ arithmetic operations.

math.CO↗