Balanced Spanning Tree Distribution
- Balanced Spanning Tree Distribution is a probabilistic framework for evaluating connected graph partitions by weighting them with the number of spanning trees, reflecting district compactness.
- The methodology employs techniques like ReCom, RevReCom, and balanced up-down walks to enable efficient sampling of redistricting plans with proven performance on grid and random graphs.
- It offers fairness guarantees and reveals algorithmic challenges, including exponential rejection steps and #P-completeness in exact enumeration of balanced splits.
The balanced spanning tree distribution is a probability distribution on balanced connected graph partitions in which a partition is weighted by the product of the numbers of spanning trees in its parts. In the redistricting setting, a districting plan is modeled as a balanced partition of a graph into connected subsets, and the distribution supplies a neutral baseline for comparing enacted plans to large ensembles of valid alternatives. In its basic form, if is a balanced partition, then its probability is proportional to , where is the number of spanning trees in the -th district; this “spanning tree score” is described as a measure of district compactness and as aligned with notions of community structure from network science (Cannon et al., 2022).
1. Formal definition and variants
In the grid-graph model studied in the redistricting literature, one considers balanced partitions of an grid graph into districts, assuming for simplicity that divides so that each district contains exactly vertices. If 0 is such a partition, its weight is proportional to
1
and the induced probability distribution on the state space 2 of balanced partitions is
3
with 4 the normalizing constant (Cannon et al., 2022).
A more general formulation treats the same object as a tree-weighted distribution on 5-partitions of a graph. For a partition 6 of the vertex set of a graph 7, the tree-weighted measure is
8
with support only on partitions into connected components. In this literature, balanced partitions are those in which the classes have the same, or nearly the same, size; this is the form used in computational redistricting and related partitioning problems (Cannon et al., 15 Aug 2025).
A smooth two-district variant replaces hard balance by an exponential penalty. If 9, then the 0-smooth balanced spanning tree distribution assigns probability proportional to
1
where
2
The hard-constraint version is recovered by multiplying the spanning-tree score by an indicator 3 that equals 4 for balanced partitions and 5 otherwise (Chen et al., 18 Sep 2025).
2. ReCom, RevReCom, and balance-preserving Markov chains
The most influential construction in this area is recombination, or ReCom. ReCom repeatedly selects two adjacent districts, merges them, forms a spanning tree of the union, and cuts that spanning tree by a balanced cut to obtain two new districts. This move is computationally natural and has been widely used to generate ensembles of districting plans, but for three or more districts its stationary distribution has no known closed form (Cannon et al., 2022).
A reversible modification, RevReCom, alters ReCom so that the chain has a known invariant law. The modification uses a Metropolis–Hastings correction so that the chain is reversible with respect to the spanning-tree-weighted measure. The resulting stationary distribution is the one ReCom was originally designed to approximate: a plan’s stationary probability is proportional to the product of the numbers of spanning trees of its districts. The formal motivation is detailed balance, while the empirical motivation is that the chain yields high-quality samples for full-sized problems within several hours (Cannon et al., 2022).
More recent work has pursued balance-preserving dynamics directly on spanning trees. The Balanced Up-Down walk operates on the set 6 of 7-balanced 8-splittable spanning trees. From a current tree 9, the chain adds a uniformly random non-tree edge, creating a unique cycle, and then removes a uniformly random edge from that cycle conditioned on the resulting tree remaining in 0. The chain is reversible with respect to the uniform distribution on 1, and irreducibility is proved in several cases, including a regime where ReCom is not irreducible (Akitaya et al., 12 Feb 2026).
3. Quantitative structure on grids and balanced cuts
Grid graphs furnish the main testing ground for exact formulas and structural bounds. For 2 grids partitioned into 3 parts, analytic diagnostics include the cut-edge bounds
4
and the spanning-tree bounds
5
These formulas are used as benchmarks for assessing whether a sampler is producing plausible cut counts and spanning-tree totals (Cannon et al., 2022).
The dependence of spanning-tree counts on geometric balance has also been made explicit. For rectangular grid graphs with fixed area, the number of spanning trees increases as the side lengths are made more balanced. In particular, if 6 and 7, then
8
and among all rectangular grids with 9 vertices, the square 0 grid has the largest number of spanning trees (Zhang, 22 May 2026). This places the tree-weighted distribution in direct contact with a geometric balancing principle: for grids of fixed size, more square-like pieces carry more spanning trees.
For the narrow 1-by-2 grid, the splittability problem can be solved exactly. A uniformly random spanning tree is called balanced if it has an edge whose removal partitions the vertices into two equal sets. The limiting probability of this event exists and depends on the parity of 3: 4 These exact asymptotics show that balanced cuts are not rare in this model (Gallagher et al., 14 Aug 2025).
4. Exact and approximate sampling algorithms
A central algorithmic question is whether balanced tree-weighted partitions can be sampled in provable polynomial time. For the 5 grid, one answer comes from a lower bound on the frequency of balanced forests. For any constant 6, a polynomial fraction of 7-component forests are balanced, and if 8 and 9 divides 0, then
1
for some fixed constant 2. This yields the first provably polynomial-time algorithms for exact and approximate sampling of balanced grid partitions according to the spanning tree distribution (Cannon et al., 2023).
Dense random graphs furnish a second regime with rigorous guarantees. If 3, then the probability that a uniformly random spanning tree of the complete graph 4 is 5-splittable is
6
and for connected random graphs in the 7 or 8 models with 9, the same probability is at least
0
These inverse-polynomial bounds imply randomized polynomial-time exact sampling for another large graph class (Gillman et al., 17 Jul 2025).
A further step removes the need to sample a full spanning tree when only a balanced two-way split is required. For a wide class of planar graphs encompassing grid-like graphs used in redistricting, one can sample directly from the balanced tree-weighted 1-partition distribution without first generating a spanning tree; the acceptance and rejection rates are the same as in earlier samplers, and the expected running time is 2. The same work also gives a variant with 3 exact sampling for uniformly random trees on these families of graphs (Cannon et al., 15 Aug 2025).
| Method | State space / target | Stated guarantee |
|---|---|---|
| RevReCom | Balanced partitions | Stationary probability proportional to 4 |
| Grid rejection / up-down sampling | Balanced 5-partitions of 6 grids | Polynomial-time exact and approximate sampling |
| Direct planar 7-partition sampler | Balanced tree-weighted 8-partitions | Expected linear time 9 |
| Balanced Up-Down walk | 0-balanced 1-splittable trees | Uniform invariant measure; irreducible in several cases |
The algorithmic significance is that the balanced spanning tree distribution is no longer only a heuristic target. On grids, dense random graphs, and broad planar families, there are now exact or approximate samplers with stated complexity guarantees (Cannon et al., 2023).
5. Fairness, compactness, and local structure
In redistricting applications, the distribution is valued because it favors compact, contiguous, and population-balanced districts. The fairness question is whether this local bias toward tree-rich pieces introduces hidden microscopic distortions. To address this, separation fairness was introduced: a distribution is 2-fair if every pair of adjacent nodes is assigned to the same district with probability at least 3. For the 4-smooth balanced spanning tree distribution on sufficiently large grid graphs with 5, there exists a constant 6 such that any pair of adjacent vertices is not separated with probability at least 7 (Chen et al., 18 Sep 2025).
The proof framework for separation fairness relies on Wilson’s algorithm, duality between primal and dual graphs, loop-erased random walks, and an “unseparating mapping” that locally modifies dual cycles so that an edge that was separated becomes unseparated while approximate balance is preserved. The paper also develops graph-partition surgeries for cases in which a purely local repair would increase imbalance (Chen et al., 18 Sep 2025). This establishes a local, edge-by-edge fairness guarantee for a smooth variant of the balanced spanning tree distribution on grids.
The same fairness result has interpretive consequences for Markov chains such as ReCom. In each merge-split step, ReCom samples a two-way partition of a merged super-district according to a balanced spanning tree rule; the separation-fairness theorem therefore provides theoretical support for the claim that such steps do not systematically crack adjacent geographic units in the two-district grid setting (Chen et al., 18 Sep 2025). A plausible implication is that the distribution’s compactness bias can coexist with a nondegenerate local adjacency structure, rather than forcing nearly deterministic separations.
6. Limitations, obstructions, and terminological distinctions
Despite its centrality, the balanced spanning tree distribution is not free of algorithmic obstructions. ReCom’s weaknesses are now known to be broader than early intuition suggested. There are graph families for which the ReCom chain on perfectly balanced partitions is not irreducible, and even if a one-vertex imbalance is permitted, the rejection step can take exponential time. In the same constructions, the total spanning-tree weight of nearly balanced partitions can be exponentially larger than that of perfectly balanced partitions, so strict-balance rejection becomes exponentially inefficient (Gillman et al., 17 Jul 2025).
The balance constraint itself can also create intrinsic computational hardness. For the Balanced Up-Down walk, a key subroutine is deciding whether a weighted tree can be partitioned into 8 connected approximately balanced subtrees. The associated decision problem admits dynamic-programming algorithms with running time 9 in general and 0 in the regime 1, but the counting problem is 2-complete (Akitaya et al., 12 Feb 2026). Thus, exact enumeration or exact uniform sampling over all balanced splits of a given tree is intractable in general.
A separate source of confusion is terminological. In other parts of graph theory, “balanced spanning tree” may refer to a rooted tree whose degree depends only on distance from the root, as in balanced tree embeddings in random geometric graphs (Díaz et al., 2023); to edge-disjoint spanning tree packings with vertexwise degree discrepancies bounded by 3 or by 4 (Hörsch, 2021); or to strongly balanced spanning trees containing perfect matchings, which are tractable on balanced bipartite graphs via weighted matroid intersection but NP-hard to recognize in general planar subcubic graphs (Bérczi et al., 2024). These notions are structurally distinct from the balanced spanning tree distribution on graph partitions.
Taken together, the literature presents the balanced spanning tree distribution as a mathematically explicit, algorithmically consequential, and application-driven measure on balanced connected partitions. Its core weighting rule is simple, but its behavior depends sharply on graph class, balance regime, and the sampling mechanism used to realize it.