Sampling Balanced Forests of Grids in Polynomial Time

We prove that a polynomial fraction of the set of k-component forests in the m × n grid graph have equal numbers of vertices in each component, for any constant k. This resolves a conjecture of Charikar, Liu, Liu, and Vuong, and establishes the first provably polynomial-time algorithm for (exactly or approximately) sampling balanced grid graph partitions according to the spanning tree distribution, which weights each k-partition according to the product, across its k pieces, of the number of spanning trees of each piece. Our result follows from a careful analysis of the probability a uniformly random spanning tree of the grid can be cut into balanced pieces. Beyond grids, we show that for a broad family of lattice-like graphs, we achieve balance up to any multiplicative (1 ± ε) constant with constant probability. More generally, we show that, with constant probability, components derived from uniform spanning trees can approximate any given partition of a planar region specified by Jordan curves. This implies polynomial-time algorithms for sampling approximately balanced tree-weighted partitions for lattice-like graphs. Our results have applications to understanding political districtings, where there is an underlying graph of indivisible geographic units that must be partitioned into k population-balanced connected subgraphs. In this setting, tree-weighted partitions have interesting geometric properties, and this has stimulated significant effort to develop methods to sample them.


Introduction
We consider the following question: given a graph G and an integer constant k, how can one randomly sample partitions of G into k connected pieces, each of equal size?We address this question in the context of the spanning tree distribution on partitions, under which the weight of a partition is proportional to the product of the numbers of spanning trees in each partition class.This distribution has been the subject of intense research in the context of mathematical approaches to the analysis of political districtings [8,10,17,26,13,27,29].While efficient algorithms exist to sample from this distribution when there are no size constraints on the partition classes, there is no general recipe for converting such a sampler to an efficient sampler for the balanced spanning tree distribution, where we condition the spanning tree distribution on the event that the partition classes are equal in size.For the prototypical case of grid graphs, the following conjecture of Charikar, Liu, Liu, and Vuong asserted that rejection sampling would suffice: Conjecture 1 (Charikar, Liu, Liu, and Vuong [10]).For the m × n grid graph, the proportion of balanced k-partitions under the spanning tree distribution is at least 1/poly(m, n), when k = O(1).
We confirm this conjecture as follows: Theorem 2. Let G be an m×n grid graph where m ≥ n and k|m.The probability that a k-partition from the spanning tree distribution is balanced is at least for a fixed constant β.
We note that the assumption that k divides the longer dimension is mostly for ease of exposition.
With some more effort (and worse constant factors) one could require just k|nm, with essentially the same proof techniques.Theorem 2 will follow from Theorem 15, which will assert that, for a uniformly random spanning tree of the m × n grid graph (m ≥ n, k|m), there is a 1/poly(mn) chance that there are k−1 edges whose removal divides the tree into equal-size components.Section 3 is devoted to proving Theorem 15, along with stronger bounds for the special case of k = 2.
The relative frequency of balanced partitions under the spanning tree distribution is particularly salient given the significant progress made in sampling algorithms for this distribution.For example, in 2020, leveraging recent breakthroughs in the polynomial-method approach to Markov chain mixing, Anari, Liu, Gharan, Vinzant, and Vuong gave an O(N log 2 N ) approximate sampler based on the 'down-up' walk on the complement of k-component forests of an N -vertex graph [1].In Section 2.5, we discuss the use of our results in the context of an additional rejection step for approximate samplers based on Markov chains, and also show how to exactly sample from the spanning tree distribution on balanced k-partitions in expected time O(N 3k−2 log N ) for a grid graph with N vertices.These are the first provably polynomial-time algorithms for (perfectly or approximately) sampling from the spanning tree distribution on balanced partitions.
In Section 4, we turn to analyze partitions in grid-like graphs under looser notions of balance.If we are interested in dividing a random spanning tree into components that are only approximately balanced (up to a (1 ± ε) multiplicative error), we show on lattice-like graphs (including grids) that this is possible with constant probability; Corollary 21 gives the precise statement for grids.In fact, we prove a more general result, which is that a uniform spanning tree on a sufficiently refined lattice-like graph will, with probability bounded below by a constant, be splittable into components that approximately match any partition of a region of the plane given by a collection of Jordan curves (Figure 1).In particular, suppose Λ n is a sequence of infinite planar graphs of decreasing scale embedded in R 2 which are lattice-like (see Definition 18).For example, our definition of "lattice-like" is broad enough to apply almost surely to the sequence where Λ n is the Delauney triangulation of a Poisson point cloud in R 2 of rate n.If D is a fixed plane graph, and Ω D,Λn denotes a region of Λ n whose boundary approximates the boundary of the outer face of D, we have that: Theorem 3 (Informal version of Theorem 20).Given any plane graph D with k + 1 faces, let ϕ 1 , . . ., ϕ k ⊆ R 2 denote its inner faces.For any ε > 0, as n → ∞, there is a constant lower bound, depending only on the plane graph and ε, on the probability that a random spanning tree T of Ω D,Λn contains k − 1 edges whose removal disconnects T into components C 1 , . . ., C k , where each C i is at Hausdorff distance < ε from a corresponding face ϕ i of D.
If one is interested in the even stronger condition of additive approximate balance, we show one can achieve this in lattice-like graphs as well, with an additional assumption regarding the uniformity of the density of vertices.This stronger assumption would fail, for example, for the previously mentioned case of Delauney triangulations of random point sets, but would still satisfied for any finite-degree, doubly-periodic connected plane graph.Figure 1: A partition of a region of a lattice-like graph approximating a division of the plane given by Jordan curves, and induced by the components remaining after deleting the four bright purple edges from a spanning tree of the region.Theorem 20 shows that given a division of the plane by curves, a random spanning tree of a sufficiently refined lattice-like graph can, with probability bounded below by a constant, be cut into components inducing a partition whose classes each has small Hausdorff distance from the corresponding face of the drawing.
Theorem 4 (Informal version of Theorem 22).If Λ n is a sequence of infinite planar graphs of decreasing scale embedded in R 2 which are uniformly lattice-like (see Definition 19) and Ω D,Λn denotes a region of Λ n whose boundary approximates the unit square, then there exists a constant A > 0 such that as n → ∞, the probability a random spanning tree T of Ω D,Λn contains k − 1 edges whose removal produces k pieces whose sizes are equal up to an additive A vertices in each part is at least 1/poly(n).
Balance up to an additive constant is the best one could hope for in the framework of Theorem 4; exact balance may not be possible because of the structure of Λ n or the way it's trimmed to approximate the unit square.However, we expect that even exact balance would be possible with mild additional assumptions on the local behavior of random walks in the lattice (as well as the necessary divisibility conditions).
Combining these results with known algorithms and rejection sampling gives corresponding polynomial time sampling algorithms in all of these settings.
Finally, in Section 5, we empirically evaluate the probabilities that random spanning trees of 10 × 10, 50 × 50, and 100 × 100 grids can be split at various locations into pieces of various sizes.These experiments visually confirm the analytical results in this paper.

Random sampling of political districting plans
In the context of the analysis of districting plans, sampling algorithms enable the generation of large ensembles of plans, which are useful for several purposes (detecting outliers, understanding the impacts of rules, evaluating the stated intentions of map-drawers, and more).Ensemble analysis has been used in many academic studies, including [2,3,5,6,7,8,12,14,16,17,19,20,22,23,26,32], as well as in mathematicians' expert reports in court cases [4,11,18,25].
Randomly sampling political districting plans is equivalent to a sampling problem for suitable partitions of a graph, with vertices representing small geographic regions such as precincts or census blocks and edges representing adjacencies.Because they represent physical geography, these graphs are typically planar or nearly planar.While they are not usually perfect grids (except at times in cities), there is general consensus that grids are the logical simplified setting to first consider.By going beyond grids to lattice-like graphs, we move to a much more expressive graph class that can describe significant additional real-world geography.
A districting plan with k districts is a partition of this graph into k pieces, which are generally required to be connected.Throughout, we will call a partition of a graph into k connected pieces a k-partition, and we will refer to the k partition classes of a partition as districts.
In the context of redistricting, there are other constraints on partitions one must consider, including those related to population and shape.Our interest in balanced partitions stems from common requirements that districts have equal or near-equal populations.While our first main result resolves a conjecture about exactly balanced partitions, in practice most processes for sampling political districting plans do not aim for exact population balance but instead aim to keep the population to within a tolerance of 1-2%.This naturally corresponds to the setting of Theorem 3, where district sizes may vary by a multiplicative 1 ± ε factor.Related to district shape, the spanning-tree distribution we analyze is targeted by several sampling algorithms designed for redistricting analysis [8,17,26], and has been shown to strongly correlate with geometric properties intended to capture legal requirements for 'compactness' of districts [13,27,29].
Unlike Markov chains such as the up-down walk, which operating in a context without balance constraints, we know that the approaches cited above such as recombination Markov chains can have exponential mixing time for some special families of graphs (including carefully chosen subgraphs of the grid) [10].Even on rectangular grids, recombination chains with strict balance constraints can fail to be ergodic if there are many small districts [30].Positive mixing time results for any reasonable class of graphs are not available.However, by giving the first polynomial lower bounds in grid and grid-like graphs on the probability of finding edges that cut random spanning trees in balanced ways, our approach also addresses a crucial factor for Markov chains like those in [8,17,26] that aim to achieve balance by preserving it at every step, by only using such balanced cuts in transitions.
Other Markov chains employed in the redistricting context include Glauber dynamics for contiguous partitions, which exchange individual vertices between districts.Here, without any additional constraints or weighting, stationary distributions are uniform on partitions with connected districts.Mixing time can again be exponential for some classes of graphs [21].In fact, even in the absence of balance, it is not known whether the Glauber dynamics has polynomial mixing time for partitions of grid graphs into k connected pieces, or indeed whether any polynomial time algorithm to uniformly sample partitions of grid graphs uniformly randomly into k connected pieces exists, even for k = 2.

Approach
Rather than working with the tree distribution on partitions, we work with the uniform distribution on spanning trees.As we prove in Lemma 8, if there is a polynomial lower bound on the probability a random spanning tree can be split into k equal-sized components, there is a polynomial lower bound on the probability a random tree-weighted forest with k components is balanced.The majority of our work therefore focuses on uniformly random spanning trees and the probability they can be split into components with desired properties.
Spanning trees of planar graphs are in bijective correspondence with the spanning trees of their dual graphs: If T is a spanning tree of G, its dual spanning tree T * contains all edges in G * whose corresponding edges are missing from T .The first key idea behind our approach is to study the structure of T * rather than T .If T is a spanning tree of G with dual tree T * , then the k connected components of T \ e 1 , . . ., e k−1 are bounded by k cycles in T * ∪ e 1 ∪ • • • ∪ e k−1 .In particular, to show that components with certain sizes or structure can be created by removing edges in T , it suffices to show that suitable boundary cycles almost already exist in T * .
The second key idea is to study the probability of such suitable near-cycles occurring in T * by analyzing the steps of Wilson's algorithm on the dual graph.For an arbitrary root vertex, Wilson's algorithm builds a uniformly random spanning tree by running a series of loop-erased random walks from arbitrary starting points to the component containing the root [31].By choosing the root to be the dual graph vertex corresponding to the exterior face and carefully choosing the starting points of each random walk, we are able to show the algorithm is sufficiently likely to produce paths in T * that have the properties we desire.
For some of our results on general lattice sequences, we will use a particular implementation of Wilson's algorithm described in Section 4.4 in which, having completed one loop erased random walk, we (sometimes) choose the next starting point for a new loop-erased random walk as the exit vertex of simple random walk within the induced subgraph of the already-built tree itself.This allows us to analyze the progress of the algorithm in long phases that may include many separate loop-erased random walks, but for which these separate loop-erased random walks can all be seen as being generated using a single random walk on the graph.

Notation
For a positive integer n, we denote [n] := {1, 2, . . ., n}.Unless otherwise specified, all graphs we consider are undirected with no self-loops, but multiple edges may be allowed between any pair of vertices.The m × n grid graph is the graph with vertex set [m] × [n], with an edge between (i, j) and (i ′ , j ′ ) whenever |i ′ − i| + |j ′ − j| = 1.We always draw grid graphs in a Cartesian coordinate system, with m being the horizontal dimension and n being the vertical dimension.We denote by Z 2 the infinite grid graph, where the vertex set is Z × Z and the edge relation is the same as in finite grids.
A forest is a graph with no cycles, and a tree is a connected forest.A k-forest is a forest with k connected components.A forest is balanced if every connected component has exactly the same number of vertices.If T is a tree and S ⊆ E(T ), we define T \ S to be the forest F with vertex set V (F ) := V (T ) and edge set E(F ) := E(T ) \ S. Thus, a tree T is k-splittable if there is some set For a graph H, we let sp(H) denote the number of spanning trees of H.For a k-partition P of G with districts P 1 , . .., P k , we denote by π sp the spanning tree distribution, given by where Z is the normalizing constant, also called the partition function, given by Note that the uniform distribution over k-forests of G is equivalent to the spanning tree distribution over k-partitions of G when a forest is identified with its connected components.

Duality
Let G be a connected, planar graph, and fix an embedding of G in the plane with no edges crossing.
The dual graph of G (with respect to the embedding) is the graph G * whose vertices are faces of G, with an edge between two faces a * ∈ V (G * ) and b * ∈ V (G * ) whenever the two faces share a common boundary edge.Note that we count the outer face of G as a vertex of G * as well.
For any edge e ∈ E(G), let e * ∈ E(G * ) be the edge between the faces it bounds.For any set of edges S ⊆ E(G), we analogously define S * := {e * | e ∈ S} ⊆ E(G * ).The following lemma is a standard result.
Lemma 5. Assume that G is connected and embedded in the plane such that no edge of G has the same face on both sides.Then e → e * is a bijection between edges of G and edges of G * , and ) is a bijection between spanning trees of G and spanning trees of G * .
Note that T * does not contain the edges e * for each e ∈ T , but rather those edges that are not in this set.The hypotheses of Lemma 5 hold for all m × n grid graphs with m, n > 1.

Wilson's algorithm
Wilson's algorithm [31] is important for us not just because it samples uniformly random trees efficiently, thus serving as a key subroutine in our perfect sampling algorithm (See Section 2.5.1), but also because our proofs rely on running Wilson's algorithm in a specific way.
For an input graph G, the steps of Wilson's algorithm are as follows: 1. Set T ← {r} for an arbitrary "root" vertex r ∈ V (G) 2. While T does not connect all vertices of G: (a) Do a loop-erased random walk1 starting at an arbitrary vertex v / ∈ T until it reaches a vertex of T (b) Add all vertices and edges along this loop-erased random walk to T

Return T
Importantly, it does not matter which vertex is initially chosen as the root, and in each iteration of the while loop, it does not matter at which vertex not in T the next loop-erased random walk begins.Regardless of what arbitrary choices are made at these steps, one can prove the end result is a perfectly uniformly random spanning tree of G.We use this crucial fact in our proofs, analyzing the process of Wilson's algorithm (in the dual graph G * ) from carefully-chosen starting vertices.
Recall that the hitting time τ u (v) of u from v is the expected time before a simple random walk reaches v from u, and the commute time between u and v is τ u (v) + τ v (u).A π-random vertex of G is a vertex chosen according to the stationary distribution of the simple random walk on G, π(v) = deg(v)/2m.Wilson characterizes the expected running time of his algorithm (measured by the number of times we need to find a random neighbor of a vertex) in terms of the commute time as follows: Proposition 6 (Wilson).The expected number of times we generate a random neighbor for a vertex in the course of running Wilson's algorithm on a graph G with root r is precisely the expected commute time between r and a π-random vertex v.
For general graphs with N vertices and M edges, it is well-known that the hitting time and thus the commute time between any pair of vertices is at most O(N M ) [24]; this implies that Wilson's algorithm runs in time O(N 2 ) for any planar graph on N vertices.However, this can be improved for grid graphs by considering the dual graph and a carefully-chosen root: Proposition 7. Wilson's algorithm runs in expected time O(N log N ) on the dual of any grid graph on N vertices, when the root is chosen to be the dual vertex corresponding to the outer face of the grid graph.This is easily proved using the characterization of the commute time in terms of effective resistance; we include a proof in the appendix.

Splittability and the spanning tree distribution
Here we explicitly connect the uniform distribution over spanning trees of a graph G with the uniform distribution over k-forests of G.This enables us to analyze the likelihood of obtaining a balanced partition when sampling from the spanning tree distribution over forests, as the up-down walk of [10] (approximately) does; see Section 2.5.2.Lemma 8.If the probability a uniformly random spanning tree of G with N vertices and M edges is k-splittable is at least α, then the probability a uniformly random k-forest of P is balanced is at least The (short) proof of this lemma can be found in the appendix.We now use it to prove Theorem 2 Proof that Theorem 15 implies Theorem 2. Sampling a k-partition P of G according to the spanning tree distribution is the same as sampling a k-forest F of G uniformly at random and then considering its connected components.By Theorem 15, the probability that a uniformly random spanning tree T of G is k-splittable is a least 1 β k 2 n 3k−3 m k−1 for some fixed constant β.By Lemma 8, as G has nm vertices and strictly less than 2nm edges, the probability a uniformly random k-forest is balanced is therefore at most There is hope this bound could be improved by studying random forests directly, rather than studying spanning trees and then considering cutting them to obtain forests.

Algorithms for sampling balanced tree-weighted partitions
Our theorems imply that known approaches sampling (not necessarily balanced) k-partitions according to the spanning tree distribution in polynomial time can be combined with a rejection sampling step to obtain an expected polynomial time algorithm for sampling balanced k-partitions.
Here we present two methods by which this could be done, for the case of sampling exactly balanced k-partitions.

Perfectly sampling balanced k-partitions with Wilson's algorithm
Wilson's algorithm generates a perfectly uniform random spanning tree of a graph G.We can use it to randomly sample a balanced k-partition as follows.
1. Uniformly sample a random spanning tree T of G using Wilson's algorithm.

Approximately sampling balanced k-partitions with the up-down walk
An alternate method using the up-down Markov chain described in Charikar et al. can produce an approximately uniformly random k-forest [1,10].We briefly motivate and describe this approach here.
On any graph G, the spanning forests with at least k components form a matroid whose bases are exactly the k-component spanning forests of G.The well-known down-up chain on bases of a matroid mixes in time O(r(log r + log log n)) when bases have r elements and the matroid has n total elements [15]; when run for longer than its mixing time, this chain produces an approximately uniformly random basis.For k-component forests, this down-up chain randomly removes an edge of the forest (to produce k + 1 components), and then randomly adds back in an edge connecting two different components.It's mixing time is O((N − k)(log(N − k) + log log M )) for graphs with N vertices and M edges; for constant k, this becomes O(N log N ).However, naively implementing one down-up step requires O(M ) time, making the overall time for this chain to produce an approximate sample O(N M log N ).
This was improved in [1] by considering the up-down walk instead.This walk which randomly adds an edge to the forest.If adding this edge creates a cycle, a random edge of the cycle is removed.If adding this edge did not create a cycle (e.g. the edge connected two components of the forest) then a random edge of the forest is removed.This chain has mixing time O(M log M ) for graphs with M edges, as the up-down walk can also be viewed as the down-up walk on the dual matroid whose bases are the complements of k-component forests.Using a link-cut tree data structure, each up-down step can be implemented in amortized quasi-constant time, resulting in an overall runtime of O(M log 2 M ) to produce one random sample.For planar graphs where M = O(N ), this mixing time is O(N log 2 N ).It is this up-down chain, rather than the usual down-up chain, that we will use.
The following is our algorithm for approximately randomly sampling a balanced k-forest of a N -vertex graph.
1. Run the up-down Markov chain on k-forests for some fixed amount of time longer than its mixing time.
2. If the current state of the chain is a balanced k-forest, return the partition P consisting of the connected components of the forest.Else, return to step 1 and repeat.
Theorem 10.For N -vertex grid graphs, this algorithm produces a balanced k-partition drawn approximately from the spanning tree distribution in expected running time O(N 4k−3 log 2 N ).
See the appendix for a proof of this theorem; briefly, the expected running time is because it takes O(N log 2 N ) steps to approximately sample a random k-forest and O(N 4k−4 ) attempts in expectation to see a balanced one, by Theorem 2. Note that, with the relatively crude estimates we employ to deduce Theorem 2 from Theorem 15 (in Section 2.4), the runtime we prove for this approximate sampling approach is actually worse than for the exact sampler above.There is little reason to believe this to be the truth, however.
3 Exact balance on grid graphs

Exactly balanced bipartitions
In this section we prove the following: Theorem 11.Let G be a grid graph with N vertices, where N is even.The probability that a uniformly random spanning tree T of G is 2-splittable is at least 1/N 2 .
In fact, we prove a stronger result, namely that specific edges near the center of the grid have a decent probability of being the edge that splits the tree.Formally, If G is an m × n grid graph, we define a horizontal central edge of G to be an edge of the form {(i, j), (i, j + 1)} that is as close to the center of G as possible.Note that there may be 1, 2, or 4 horizontal central edges depending on the parities of m and n.
Lemma 12. Let G be an m × n grid graph where m ≥ n, and mn is even, and let e ∈ E(G) be any horizontal central edge of G. Then the probability that a uniformly random spanning tree T of G contains e, and T \ {e} is a balanced 2-forest, is at least To prove Lemma 12, we will require two further lemmas.
Lemma 13.Let G be the m × n grid graph induced by the subset [m] × [n] of the grid Z 2 , and (i 0 , j 0 ) ∈ V (G).The probability that a random walk from (i 0 , j 0 ) in Z 2 exits G for the first time to a vertex (i ′ , j ′ ) with j ′ > 0 is at least j 0 n+1 .
Proof.Let Ḡ be the subset of of Z 2 induced by vertices (x, y) with 0 ≤ i ≤ m + 1, 0 ≤ j ≤ n + 1.Consider the experiment in which we conduct a random walk from (i 0 , j 0 ) ∈ Ḡ, and then flip a biased coin whose heads probability is j ′ n+1 , where (i ′ , j ′ ) is the first vertex the walk visits in Ḡ \ G.When (i 0 , j 0 ) ∈ G, the event that the coin is a heads is contained in the event that the random walk first exits G to a vertex (i ′ , j ′ ) with j ′ > 0. And for this experiment, we have that the probability of heads is exactly j 0 n+1 , since this holds on the boundary Ḡ \ G, and since this linear function is the unique harmonic extension of this boundary condition; that is, the unique function such that the value at each vertex is the average of the values at the neighbors, as is the case for the probability of heads in the experiment defined above.Lemma 14.Let X be a discrete probability distribution supported on a set of size k.Then Pr Proof.Suppose the probabilities of each element in the support of X are p Proof of Lemma 12. Assume n > 1 (otherwise there is nothing to show; the probability is one).Then note that Lemma 5 applies to G. We first consider the case where n is odd (so m must be even).In this case there is a unique horizontal central edge e, connecting the vertices (m/2, (n + 1)/2) and (m/2 + 1, (n + 1)/2).Let G * be the dual graph of G in the plane, and denote the outer face by r * ∈ V (G * ).Let a * ∈ V (G * ) be the face above e and let b * ∈ V (G * ) be the face below e, as in Figure 2.
Consider the following algorithm for generating a uniformly random spanning tree T of G. Run Wilson's algorithm on G * with r * as the root, starting the first loop-erased random walk from a * and the second random walk from b * (if it is not already added to the tree in the first random walk).The remaining random walks in Wilson's algorithm can be executed from arbitrary starting points.This gives us spanning tree T * of G * .We then output the primal tree T whose dual is T * .Since Wilson's algorithm gives a uniformly random sample from the set of spanning trees of G * , and those dual trees are in bijection with the primal spanning trees of G (Lemma 5), this algorithm gives us a uniformly random sample from the set of spanning trees of G.
We apply Lemma 13 to the (m − 1) × n−1 2 dual sub-grid outlined in the top (red) rectangle in Figure 2, with initial vertex a * .Note that j 0 = 1 because the coordinate system is shifted so that a * is in the bottom row.Lemma 13 says that a random walk from a * will first exit the sub-grid above, to the left, or to the right (just not below) with probability at least This clearly applies to our loop-erased random walk as well: The probability that the first walk in Wilson's algorithm, which starts from a * , makes it to the outer face r * without ever entering the bottom half of the grid is at least 1 n .Assuming this happens, we may then apply the same argument to the bottom (blue) rectangle, for the next random walk starting from b * .By independence, with probability at least 1 n 2 , both paths will have made it to r * without crossing the horizontal midline.Assume that this happens, as it does in 2 n to m−1 2 n.Thus, applying Lemma 14, we know that, with probability at least i.e., the subtrees are balanced.Thus, we have shown that the probability e is included in a uniformly random spanning tree T of G and splits it into a balanced 2-forest is at least The remaining cases, where n is even, are almost the same.There are just a few minor additional assumptions we must impose about what happens to the random walks at the very beginning, as illustrated in Figure 3.
If m is even as well, there are two horizontal central edges bordering the unique central face of the grid.Without loss of generality, take e to be the top one, then define a * and b * as before.We suppose that the random walk from b * first steps directly downward, as in Figure 3 (left).This happens with probability 1  4 .From there, by the same arguments as before, noting that the two subgrids are now each m × (n/2 − 1), the probabilities that the paths leave their respective red and blue rectangles at the boundary of the grid are both at least The probabilities that the number of vertices on each side are the same is at least Thus, the probability that e splits a uniformly random spanning tree T into a balanced 2-forest is at least Finally, consider the case where m is odd and n is even.Now there are four horizontal central edges, of which we pick the top-right one without loss of generality.With probability 1  16 , the random walk from b * first steps to the left and then down into the blue rectangle, as in Figure 3 (middle).Now we can again apply the same arguments as above to the subgrids of dimensions m × (n/2 − 1) showing the probability the remaining paths leave their subgrids at the boundary of G are both at least 2 m .While the random walk in the top grid no longer begins exactly in the center of the top grid (it can't, because this grid is now of even width), the top and bottom grids are rotationally symmetric, with the top walk beginning just one unit left of center and the bottom walk beginning one unit right of center.As before, the distributions of difference of the number of vertices on each side of the path are identical and are supported on sets of size at most mn, so by Lemma 14, the probability these differences are identical is at least 1 mn .Thus, the probability that e splits a uniformly random spanning tree T into a balanced 2-forest is at least We now use this lemma to prove Theorem 11.
Proof of Thoerem 11.Recall that N = nm is the total number of vertices.Assuming m ≥ n, we know that mn 3 ≤ m 2 n 2 = N 2 .Thus, in the case where m is even, we simply choose one of the horizontal central edges, which, by Lemma 12, splits a random tree into a balanced 2-forest with probability at least 1 mn 3 ≥ 1 N 2 .In the case where m is odd (and so n must be even) there are 4 horizontal central edges, each of which will split a random tree into a balanced 2-forest with probability at least 1 4mn 3 .Since these 4 events are mutually exclusive, one of these four will give a balanced split with probability at least 1 mn 3 ≥ 1 N 2 .

Exactly balanced k-partitions
In this section we prove the following: Theorem 15.For m ≥ n, let G be an m × n grid graph, and let k be a positive integer dividing m.
There exists a set S ⊆ E(G) of size k − 1 such that the probability a uniformly random spanning tree T of G contains each edge in S, and T \ S is a balanced k-forest, at least for a fixed constant β.
The proof proceeds along similar lines as the proof of Lemma 12.We require the following stronger lemmas about random walks on grids.This is similar to Lemma 13, except that now we are also not allowed to hit the left or right sides, which makes the proof significantly more involved.We begin by proving a result about square grids, then extend this to tall thin rectangles.
Proof.Let L denote the event we are interested in, that a random walk in Z 2 beginning at vertex (0, 0) first exits G to a vertex with coordinate (i, 2ℓ + 1).Our proof giving a lower bound on Pr(L) will use the following three claims: Claim 1.A simple random walk on Z from 0 reaches vertex n within 2n 2 steps with probability at least 1  4 .Claim 2. For any j, conditioned on the event that a simple random walk on Z from 0 of fixed length j ≥ x ends at the vertex x > 0, the probability that the walk never revisits 0 is x j .Claim 3.There is a constant λ such that for any D, a simple random walk on Z from 0 of length ≤ Dℓ 2 has probability ≥ e −λD of never leaving the interval [−ℓ, ℓ].
We give elementary proofs of these claims below, but first let us use them to prove that for an absolute constant B, In particular, we will consider a walk of fixed length 40ℓ 2 , and show that with probability at least 1 Bℓ , such a walk from (0, 0) will exit G from the top side and do so before exiting any other side.The random walk of length 40ℓ 2 is associated to an i.i.d.sequence of length 40ℓ 2 over the four directions in the lattice, which we denote (in cyclic order) by N, E, S, W. We generate the random walk in two steps: 1. We generate a uniform binary sequence of length 40ℓ 2 over the symbols {H, V }.
2. We independently replace each symbol H with a symbol E or W with probability 1  2 , and each symbol V with a symbol N or S with probability 1  2 .
Observe first that, with high probability, there are between 18ℓ 2 and 22ℓ 2 symbols of each type H and V after the first step.In particular, we will simply condition on the event that the number of symbols H and V fall in this particular range.By associating steps S and W to −1 and N and E to +1, we can associate to the sequence of replacements for the H's a random walk W H on Z, and to the sequence of replacements for the V 's a 1D random walk W V on Z.We need to put a lower bound on the probability that W H never leaves the interval [−ℓ, ℓ] AND W V reaches 2ℓ + 1 without visiting −1.Conditioned on the lengths of the walks W V , W H , these are independent events; thus it suffice to prove lower bounds on the probabilities of these two events conditioned on any fixed lengths for W V and W H between 18ℓ 2 and 22ℓ 2 .
We first consider the case of W V .We define the events E ′ , E j by Observe that Since ℓ ≥ 1 implies 2(2ℓ + 1) 2 ≤ 18ℓ 2 , we have from Claim 1 that Now fixing some j ≤ 18ℓ 2 steps and conditioning on the event that W V is at 2ℓ + 1 on the jth step, we have from Claim 2 that Pr (W V never visits −1 before step j | W V at 2ℓ + 1 on step j) Now ( 4), ( 5), and (6) imply that In the final inequality, we have used the fact that for j ≤ 18ℓ 2 , when conditioning on both events E ′ and E j , the initial segment of W V of length j is still a uniformly random walk among all walks of length j from 0 to 2ℓ + 1, as replacing such an initial segment with any other does not change the outcome of the events E ′ , E j .
Finally, since W H is of length ≤ 22ℓ 2 , we have from Claim 3 (with D = 22) that with probability at least exp(−22λ), W H never leaves the interval [−ℓ, ℓ].As we have conditioned ahead of time on the lengths of these two walks, the events corresponding to the two probabilities are independent, and so we have for an absolute constant B. This completes the proof of (3); it only remains to prove the three claims.
Proof of Claim 1. Recall that simple random walk begun from s on {0, 1, . . ., M } reaches an endpoint of this interval in expected time s(M − s) (see e.g., [24, Proposition 2.1]).Thus a simple random walk on Z from 0 reaches either −n or n in expected time n 2 .This means that a simple random walk from 0 of length ≥ 2n 2 reaches −n or n with probability at least 1 2 , as Markov's inequality implies that the probability that the hitting time exceeds 2n 2 is ≤ n 2 2n 2 .By symmetry the probability it reaches n is thus at least 1  4 .This proves Claim 1. Proof of Claim 2. This is a consequence of Bertrand's ballot theorem.If the walk of length j ≥ x ends at the vertex x > 0, it takes R = j+x 2 steps to the right and L = j−x 2 steps to the left.Bertrand's ballot theorem then implies that the probability that among any initial nonempty segment, there is never as many left steps as right steps, is precisely Proof of Claim 3. Choose K = 1 20 ℓ 2 .Consider K-step simple random walk on Z starting from 0. Observe that by Chernoff bounds, if S K is the location after K steps, It follows that with probability > 9 10 , a simple random walk of length K = 1 20 ℓ 2 from 0 in Z will not end at a vertex S K ≥ ℓ.Recall the standard reflection principle for simple random walk: It follows that with probability ≥ 8 10 , the walk S 0 , . . ., S K will never exceed ℓ/2.By symmetry, with probability ≥ 6  10 ≥ 1 2 , it will never leave the interval I = [−ℓ/2, ℓ/2].Thus, with probability at least 1  4 , the random walk will both not leave the interval I and end in the nonnegative (respectively, nonpositive) side of the interval.Repeated applications of this simple fact then give Claim 3 as follows: We break the random walk S 0 , S 1 , . . ., S Dℓ 2 into Dℓ 2 /K = 20D walks, each of length K. From the observation of the previous paragraph, each such walk has probability at least 1  4 of never deviating more than ℓ/2 from its starting point and ending to the right or left of its starting point, according to whichever direction the origin 0 is from the starting point of the walk.In this way, with probability ≥ 1 4 20D , every walk begins and ends within ℓ/2 of the origin, and never ventures more than ℓ/2 from its starting point.In this way the whole concatenated walk remains within ℓ of the origin.This proves Claim 3 with λ = 20 ln 4, and thus completes the proof of the Lemma.
The following lemma extends these results beyond a square region to a narrow rectangle, provided its width is at least a constant fraction of its height.Lemma 17. Suppose there is a constant ε > 0 such that m > εn.Let G be the (m + 1) × (n + 1) grid graph induced by the subset {0, . . ., m} × {0, . . ., n} of the grid Z 2 , where m + 1 is odd, and let (i 0 , j 0 ) = ( m 2 , 0).The probability that a random walk from (i 0 , j 0 ) in Z 2 exits G for the first time to a vertex (i ′ , j ′ ) with j ′ = n + 1 is at least 1 Ane A/ε , for a fixed constant A. Proof.First, we consider the case where m ≥ n.In this case, set ℓ = ⌊(n + 1)/2⌋, so that 2ℓ + 1 is equal to n + 1 or n + 2, whichever is odd.By Lemma 16, there is a constant B such that the probability the a random walk starting at (m/2, 0) first exits the rectangle at some (i ′ , n + 1) for some i ′ ∈ [m/2 − ℓ, m/2 + ℓ] without ever leaving this interval of x-coordinates is at least 1/Bn for some constant B. When m ≥ n, this interval is a subset of [0, m], and so the probability a random walk from (m/2) first exits G to some (i ′ , n + 1) is at least 1/Bn as well; appropriate choice of A such that Ae A > B proves the lemma.Now, suppose m < n.For ℓ = m−2

4
, define S 0 to be the (2ℓ + 1) × (2ℓ + 1) square subset of G induced by the vertices (x, y) with m 2 − ℓ ≤ x ≤ m 2 + ℓ and 0 ≤ y < (2ℓ + 1).Given a random walk in Z 2 beginning at ( m 2 , 0), we define L 0 to be the event that the random walk exits the square S 0 for the first time along its top side.By Lemma 16, Pr(L 0 ) ≥ 1 Bℓ ≥ 1 Bm as ℓ ≤ m.We now show how one can extend this path from the top of S 0 to the top boundary of G in a reasonably likely way.
For any vertex v ∈ Z 2 and positive integer ℓ, for a random walk in Z 2 starting from v, define events L NNW v,ℓ and L NNE v,ℓ , as the events that random walk from v first exits the (2ℓ + 1) × (2ℓ + 1) square centered at v along the left half or right half, respectively, of the top side of the square.In the case where the random walk exits at the middle of the top side of the square, we say both events occur.In this way, by the symmetries of the square, we have that Now, given v and ℓ, we can define L N 0 v,ℓ to be the event whenever the horizontal coordinate of v is < m 2 , and to be whenever the horizontal coordinate of v is ≥ m 2 .Let v 0 = ( m 2 , 0), and let v 1 be the first vertex outside S 0 encountered in a random walk in Z 2 starting at v 0 .For each i ≥ 1, define S i to be the (2ℓ+1)×(2ℓ+1) square centered at v i , and let v i+1 be the first vertex outside S i in a random walk beginning at v i ; see Figure 4. To prove the lemma, note that if L 0 occurs and, for each subsequent v i for i = 1, . . ., L where L = 2(n−2ℓ) 2ℓ+2 , event L N 0 v,ℓ occurs, then the random walk from ( m 2 , 0) first exits G to a vertex (i ′ , n + 1): the initial event L 0 ensures it never exits the bottom of the rectangle; the choice of N 0 = N N W or N 0 = N N E ensures it never exits the side of the rectangle; and L was chosen large enough to ensure exiting S L along its top implies exiting G along its top.Therefore, to prove the lemma, it suffices to prove a lower bound, for any fixed sequence v 1 , . . ., v L on the product Note that the side length of the square is 2ℓ + 1 ≥ m 2 − 1, and so Combining ( 9) and ( 10), we conclude that the probability the random walk S 0 , S 1 , S 2 . . ., exits at the very top is at least Figure 4: A random walk from the bottom of the red rectangle that first exits at the very top because each of the events L 0 , Here m = 10, n = 16, ℓ = 2, and L = 4.The event L 0 says that the walk from the bottom first exits the bottom purple outlined square to some vertex v 1 above the top.From there, each subsequent event L v i ,ℓ says that the walk exits the next green square along the top, on the side of the top boundary that is closer to the center.
For an appropriate choice of constant A ≥ max{B, 4 ln 8}, this is of the form 1/(Ane A/ε ) claimed in the statement of the Lemma; note using the same constant A twice is just a simplification for convenient bookkeeping.
We now use these lemmas to prove our main theorem.
Proof of Theorem 15.As in the proof of Lemma 12, we assume n > 1 so that Lemma 5 applies, and we first consider the case where n is odd.For each 1 2 )}.As shown in Figure 5, these edges lie on the horizontal midline of the grid and divide it vertically into k equal pieces.For each index i, let a * i and b * i be the faces respectively above and below e i .
We generate a random spanning tree T of G by running Wilson's algorithm on the dual graph G * with the outer face r * as the root.We start the first 2(k − 1) random walks from , assuming each of these vertices of G * has not yet been added to the tree.The remaining starting points can be determined arbitrarily, and we output the tree T that is dual to the uniformly random spanning tree T * of G * sampled by Wilson's algorithm.We will show that S := {e 1 , e 2 , . . ., e k } splits G into a balanced k-forest with sufficiently large probability.
We apply Lemma 17 to each of the red and blue rectangles depicted in Figure 5, which all have grid dimensions ( m k − 1) the far side of its rectangle with probability at least for a fixed constant A.
When this happens, we then apply the same symmetry argument from the proof of Lemma 12 to each pair of rectangles to conclude that, within each red-blue pair of rectangles, the the number of vertices of G to the left of the paths is equal to the number of vertices in to the right of the paths with probability at least 1 2p+1 , where is (an upper bound on) the number of vertices of G in each rectangle.Simplifying this expression, a lower bound on this probability is k mn .By independence, all pairs of rectangles will be balanced (as they are in Figure 5) with probability at least k mn k−1 , in which case T \ S will be a balanced k-forest.Altogether, this will happen with probability at least 1 Ane Ak/2 for β a fixed constant.
In the case where n is even, we may apply the same trick as in the proof of Lemma 12, assuming that each path goes downward one step first.This simply tacks on another factor of 1  4 k−1 to the final probability bound, which can be incorporated into the β k 2 term.

Approximating Partitions of Lattice Structures
In this section we move beyond grid graphs to a more general class of lattice-like graphs.In Section 4.1, we begin by defining what we mean by lattice-like graphs, including the more general definition which we use in our multiplicative approximate balance results and the stronger version (uniform lattice sequences) we use for our additive approximate balance results.In Section 4.2 we state our results for both lattice classes, including an interesting corollary for grids.In Section 4.3, we give lower bounds on the probability that a random walk in a lattice sequence follows a given curve in the plane.These bounds are used in the proofs of both our multiplicative and additive approximate balance results.In Section 4.4, we apply them to analyze a particular implementation of Wilson's algorithm that uses a random walk to choose the next starting place for a loop-erased random walk, which suffices to prove our multiplicative approximate balance result.Finally, in Section 4.5, we consider a shrinking sequence of rectangles to correct multiplicative approximate balanced into additive approximate balance.

Lattice sequences
We use dist(x, y) to denote graph (e.g.lattice) distances, and d(x, y) and d(X, Y ) to denote Euclidean distances between points and Hausdorff distance between sets, respectively.Recall that a curve γ is a continuous function γ : [a, b] → R 2 for a < b.Except where specified otherwise, we take a = 0, b = 1.A plane graph D = (V, Γ) is a drawing of a (planar) graph in the plane without intersections.In particular, V = V (D) is a finite set of points in the plane R 2 .Γ is a finite collection of curves given by continuous functions γ i : [0, 1] → R 2 such that no two such curves intersect except possibly at their endpoints, and such that if E is the set of pairs of endpoints: is the image of the function γ), and we refer to the unique unbounded face as the outer face.
We state our results in terms of sequences of infinite lattice-like plane graphs that get finer and finer with properties defined as follows.We consider two slightly different notions: essentially, the second adds a requirement that fluctuations are bounded at some constant scale, which will be necessary for our result on partitions that are balanced up to additive error.Definition 18.A lattice sequence is a pair ({Λ n }, ρ), where {Λ n } is sequence of plane graphs with vertex sets V (Λ n ) ⊆ R 2 for which there are corresponding dual plane graphs Λ * n , with each vertex v ∈ V (Λ * n ) a point in the corresponding face of Λ n , such that for all ε > 0, there exists N such that for all n > N , (a) For any adjacent pair x, y ∈ V (Λ * n ), d(x, y) < ε, (b) For any p ∈ R 2 , the ball B ε (p) contains a vertex of Λ * n , (c) For any dual vertex v and ε > 0 there is a division of the circle C ε,v of radius ε into arcs A 1 , . . ., A s each of length at most 1  8 2πε, such that the following holds for each i ∈ [s]: In a simple random walk v = v 0 , v 1 , v 2 , . . ., with probability at least ρ > 0, letting j the first index where d(v 0 , v j ) > ε, the straight line segment joining v j−1 with v j passes through This definition generalizes sequences of finer and finer grids.Specifically, we claim that the family of plane graphs {Z 2 , 1 2 Z 2 , 1 3 Z 2 , . . .} is a lattice sequence with ρ = 1 8 .Property (a) and (b) say that, as we increase n, neighboring vertices in 1 n Z 2 become arbitrarily close, and the vertex set becomes arbitrarily dense.Property (c) holds using the partition of C ε,v obtained by drawing horizontal, vertical, and both 45 degree diagonal lines through v.By symmetry, a random walk from v is equally likely to exit through each of these 8 arcs.
The definition also applies to scalings of lattices like the triangular or hexagonal lattice, since, for example, property (c) holds for any sequence of lattices for which the scaling limit of random walk on the dual is Brownian motion.For the same reason, it applies a.s., for example, to the sequence where Λ n denotes the Delauney triangulation of a Poisson cloud in R 2 of rate n, see [28].The choice of 1  8 in the definition is made just for convenience; replacing it with any constant < 1 2 would give exactly the same family of lattice sequences.
For our result about partitions that are balanced up to an additive error (Theorem 22), we require the following strengthening of this notion.Definition 19.A uniform lattice sequence is a tuple ({Λ n }, ρ, R, C 1 , C 2 ), where {Λ n } is sequence of plane graphs with vertex sets V (Λ n ) ⊆ R 2 for which there are corresponding dual plane graphs Λ * n , with each vertex v ∈ V (Λ * n ) a point in the corresponding face of Λ n , and positive constants ρ, R, C 1 , C 2 so that, for all sufficiently large n: (c) For any dual vertex v there is a division of the circle C r,v of radius r ≥ R n into arcs A 1 , . . ., A s each of length at most 1  8 2πR/n, such that the following holds for each i ∈ [s]: In a simple random walk v = v 0 , v 1 , v 2 , . . ., with probability at least ρ, letting j the first index where d(v 0 , v j ) > ε, the straight line segment joining v j−1 with v j passes through C r,v in A i .This definition is also satisfied for grids, the triangular lattice, the hexagonal lattice, or indeed any finite-degree, doubly-periodic connected plane graph.However, it is not satisfied for triangulations of random point clouds, since as n → ∞, as the fluctuations in density will be too large.

Statement of results
In addition to lattice sequences, we will also consider a fixed bounded plane graph D that gives the partition structure we are looking to approximate.In doing this, we will need to restrict the infinite graphs in the lattice sequence to a reasonable bounded subgraph that falls inside D, and we do this as follows.Let D be a bounded plane graph, and fix δ > 0 that will be chosen later in terms of D (in Lemma 25).Given plane graph Λ n with dual Λ * n from a lattice sequence, and a cycle C * in Λ * at Hausdorff distance < δ from the outer face boundary of D, we let Ω D,Λn be the subgraph of of Λ n lying inside C * .We let Ω * D,Λn be the subgraph of Λ * n induced by all vertices of C * along with the vertices of Λ * n lying inside C * .In this way, we can consider the planar dual of Ω D,Λn to be Ω * D,Λn with wired boundary condition, where the entire cycle C * (rather than a single dual vertex) corresponds to the outer face of Ω D,Λn .(In particular, for our proofs, we will run Wilson's algorithm on Ω * D,Λn with the cycle C * identified as a single root.)Given this plane graph D describing the partition structure we are looking to approximate, let k + 1 be the number of faces and denote the k bounded faces by ϕ 1 , . . ., ϕ k .We say a partition of the graph Ω D,Λ into connected components C 1 , . . ., C k is ε-compatible with D if for all i and vertices v ∈ Ω D,Λ , the implication holds.By subdividing edges if necessary, we will assume that D has no loops, so that γ(0) ̸ = γ(1) for all γ ∈ Γ(D).For a lattice sequence ({Λ n }, ρ) and a probability space on the set of spanning trees of Ω D,Λn and given ε > 0, we define the event E D,Λn,ε , which holds whenever there are k − 1 edges whose removal from T results in a forest with components C 1 , . . ., C k that is ε-compatible with D. The following is our main result for multiplicative balance (the formal version of Theorem 3).
Theorem 20.Let ({Λ n }, ρ) be a lattice sequence, let D be a plane graph with k + 1 faces, and let Ω D,Λn be as above.For the uniform probability space on the set of spanning trees of a graph Ω D,Λn , we have that as n → ∞, Pr(E D,Λn,ε ) is bounded below by a constant depending only on D and ε.
As a consequence, if we draw the partition so that the parts contain approximately equal numbers of vertices, we can conclude that random trees are splittable into approximately balanced pieces with constant probability.This is possible so long as {Λ n } has the property that for any δ > 0 and R, there is an ε > 0 so that every In the case of grid graphs, for instance, we obtain the following corollary.
Corollary 21.Fix ε ≥ 0 and k a positive integer.Let m, n be positive integers such that n ≤ m, k|m, and 20/n ≤ ε ≤ 1/(3k).Let G be an m × n grid graph.There is a constant C(k, ε) such that the probability a uniformly random spanning tree of G is (k, ε)-approximately splittable is at least C(k, ε).
As our final main result, we give 1/poly lower bound on the probability that a random spanning tree in a square region of a uniform lattice sequence can be cut into pieces that differ in size by an additive constant on uniform lattice sequences (the formal version of Theorem 4).
Theorem 22. Suppose ({Λ n }, ρ, R, C 1 , C 2 ) is a uniform lattice sequence, and for all n > N , C * n in Λ * n is a cycle in the dual that is contained within the unit square [0, 1] 2 and at Hausdorff distance < R/n from its boundary, and Ω S Λn denotes the subgraph of Λ n enclosd by the cycle C * .Then there is a constant A such that with probability at least 1 poly(n) , a uniformly random spanning tree of Ω S Λn can be disconnected by the removal of k − 1 edges into k components that that differ in size by at most A.
Note that balance up to an additive constant is the best we can hope for in the generality we are working in here; for example, an n × n grid graph with n odd and an additional leaf appended to every vertex is a case to which Theorem 22 applies, but that does not admit an exactly balanced partition despite the fact that the total number of vertices is even.

Probability of staying near a curve
To prove Theorem 20, we first need the following lemma.
Lemma 23.Let ({Λ n }, ρ) be a lattice sequence, let ε > 0, and let γ be a curve in the plane of length T .For v 0 ∈ Λ n with d(v 0 , γ(0)) ≤ ε/2, and for a random walk in Λ n started from v 0 , let E = E n,v 0 ,ε,γ be the event that the walk reaches a point within ε 2 of γ(1) before ever reaching a vertex at distance > ε from the curve γ.For all sufficiently large n, The proof is reminiscent of the proof of Lemma 17.The differences are that now we consider a sequence of circles that the random walk must escape from rather than squares, and the direction to which we hope it escapes will be determined by the path γ, not just always going upward (see Figure 6).
Proof.Choose n large enough so that neighboring vertices in Λ n are at distance at most ε 20 .For any v ∈ Λ n , we may partition C ε/2,v (the circle of radius ε/2 around v) into arcs A 1 , A 2 , . . ., A s as in Definition 18 (c) applied to ε 2 .For any t ∈ [0, 1] such that v is within Euclidean distance ε/2 of γ(t) but not within Euclidean distance ε/2 of γ(1), that is, we define A * (v, t) to be the union of all arcs A i such that the next time γ reaches C ε/2,v it is in the arc A i , that is, all arcs A i such that Note the infimum is well-defined by ( 14), recalling that d(•) is Euclidean distance, not lattice distance.We then define L v,t to be the event that a random walk in Λ n from v first crosses C ε/2,v through A * (v, t).
Assume that v 0 is not already within ε 2 of γ(1), otherwise there is nothing to show.Then let t 1 be the first time such that d(v 0 , γ(t 1 )) = ε 2 .By property (c), we know that L v 0 ,0 will occur with probability at least ρ.Assuming this happens, suppose the random walk exits to a point , where the line segment between u 1 and v 1 passes through a point a 1 ∈ A * (v 0 , 0) as in Figure 6.We know that the arc length along this circle from a 1 to γ(t 1 ) is at most If d(v 1 , γ(1)) ≤ ε 2 , we are done and have shown Pr(E) ≥ ρ.If, instead, d(v 1 , γ(1)) > ε 2 , then both inequalities in (14) hold.We then let t 2 > t 1 be the first time (later than t 1 ) such that d(v 1 , γ(t 2 )) = ε 2 and observe that, with probability at least ρ, the event L v 1 ,t 1 will occur, at which point the random walk will exit to some vertex v 2 ∈ B ε 2 (γ(t 2 )).Continuing inductively until d(v L , γ(1)) ≤ ε 2 , we see that we will continue to follow the curve γ for a sequence of L steps, A key step of the proof is lower-bounding the distance between γ(t j + 1) and γ(t j ), which we accomplish by observing that v j is closer to γ(t j ) than γ(t j+1 ), since it is close to a j and the arc A * (v j−1 , t j−1 ) is small.through events L v 0 ,0 , L v 1 ,t 1 , L v 2 ,t 2 , . . ., L v L−1 ,t L−1 , with probability at least ρ L .Observe that the bound in (15) applies to each round, choosing a j to be the point on the circle between v j and the previous step u j .Thus, we may bound the distance between consecutive points on the path as Since T is total length of the curve γ, it follows that we only need at most L = 20T ε steps of the correct events L v j ,t j occurring until we reach a vertex within ε 2 of γ(1).All the while, we know that the path is always within a ball of radius ε 2 that contains parts of γ, so it never is more than ε away from γ.Thus, we have Pr We will also require the following slightly stronger version of this lemma with some extra conditions about how the path ends: Lemma 24.Let ({Λ n }, ρ) be a lattice sequence, let γ 1 , γ 2 be curves in the plane of positive length, where γ 1 has length T and γ 2 (0) = γ 1 (1).For all sufficiently small ε > 0, for any v 0 ∈ Λ n with d(v 0 , γ(0)) ≤ ε/2, and for a random walk in Λ n started from v 0 , let E ′ = E ′ n,v 0 ,γ 1 ,γ 2 be the event that the walk traverses an edge which intersects the curve γ 2 at a point within ε/2 of γ 1 (1) before ever reaching a vertex at distance > ε from the curve γ 1 .For all sufficiently large n, Illustration accompanying the proof of Lemma 24.We apply Lemma 23 to the orange path γ ′ and ε 5 , which is the radius of the orange tube around γ ′ .The quantities ε 5 and 3ε 2 from the proof are crude bounds on the width and length of the last part of the tube that must encircle γ 2 (0) while staying within the blue circle of radius ε 2 .
Note that when a disconnected plane graph D has bounded faces ϕ 1 , . . ., ϕ k and satisfies the hypotheses of Theorem 20, we can add curves to D to create a connected plane graph D ′ whose bounded faces satisfy ϕ ′ i ⊆ ϕ i for all i.We have then that E D ′ ,Λn,ε ⊆ E D,Λn,ε , and thus it suffices to prove Theorem 20 in the where D is connected.Therefore, we assume that D is connected for the rest of the proof.
By compactness of the curves γ ∈ Γ for the plane graph D = (V, Γ), we have the following: Lemma 25.For 0 < δ < ε sufficiently small, we have that: (A1) The distance between any two vertices u, v ∈ V is at least 3ε.
(A2) If a γ denotes the last time t at which γ(t) is in the closed ball of radius ε about γ(0), and b γ denotes the first time t at which γ(t) is in the closed ball of radius ε about γ(1), the restricted curves γ = γ |[aγ ,bγ ] are all at distance at least 3ε each other.
(A3) For any two points p, q in a common face of D and both at distance at least ε from any curve of D, there is a curve γ (not a curve of D) joining p to q whose distance to every curve of D is at least δ.
This is a straightforward consequence of compactness of the curves; we include a proof in the appendix for completeness.

Multiplicative Approximate Balance
From here on, we let ε, δ be as promised by Lemma 25.We call a curve of D an outer curve if every point of the curve lies on the boundary of the outer face, and an inner curve if no point does, other than possibly its endpoints.Note that every curve must be one of these two types.We let Γ I and Γ O denote set of inner curves and outer curves, respectively.Since D is connected, we can order the inner curves of D as γ I 1 , . . ., γ I m i such that for all ℓ, the plane graph D ℓ of D with edges 8).Moreover, without loss of generality we assume that the orientation of each curve is such that γ I ℓ (1) is a vertex of Γ ℓ−1 for all ℓ = 1, . . ., m i (the curves are oriented "towards the outer face").Note that paths corresponding to γ I 2 and γ I 4 each are missing an edge, and in particular, the edges present do not disconnect the interior of C * .These missing edges are dual to the edges in the corresponding primal spanning tree whose removal would disconnect the tree into components approximating the faces of this drawing.
We prove the theorem by analyzing how Wilson's algorithm constructs spanning trees of Ω * D,Λn with wired boundary conditions, where the whole boundary cycle C * is used as the root of Wilson's algorithm.In particular, it is equivalent to view Wilson's algorithm as building a unicylic graph, initialized with the boundary cycle of Ω * D,Λn .We take advantage of the freedom to choose the starts of loop-erased random walks afforded by Wilson's algorithm by using the following implementation, which determines starts by using additional random walks.We construct trees in rounds, where for tree T j i the subscript i denotes the phase and the superscript j denotes the step within phase i.Within phase i, we alternate a loop-erased random walk from a vertex outside T j i to a vertex in T j i that gets added to the tree to obtain T j+1 i (one step of Wilson's algorithm) with a random walk among the vertices in T j+1 i until a vertex outside T j+1 i is reached (choosing the starting point for the next step of Wilson's algorithm).Here we describe the procedure for one phase of this process; the particular choices of source vertex and target subsets that will be useful for our purposes will be specified below.
1.At the beginning of each phase i, we have an existing tree T i−1 that has already been built.
(For i = 1, T 0 consists of just the root vertex).We choose a source vertex v and target subset U i ⊆ T i−1 for this phase, and initialize 2. We begin each step of this phase with T j−1 i−1 (at the beginning of the phase, for j = 1) and a source vertex.We do one of two things according to whether the source belongs to the tree T j−1 i−1 : (a) If the source vertex is not in T j−1 i−1 , we conduct a loop-erased random walk from the source until it hits T j−1 i−1 at a vertex u.This loop-erased random walk is added to T j−1 i−1 to create T j i−1 .If u ∈ U i this phase ends, and we set T i = T j i−1 .Otherwise, we increment j, and continue this phase with u as the new source vertex (we will be in case (b) next).
(b) If the source vertex is in T j−1 i−1 , we take a random walk from the source until we reach a vertex u outside of T i−1 , and then increment j and restart this step from the vertex u as the new source vertex, and T j i−1 = T j−1 i−1 (we will be in case (a) next).
3. The previous loop continues until either the target is eventually hit by an instance of the loop-erased random walk, or the entire spanning tree is completed.
Note that we can use a single random walk W i from v / ∈ T i−1 to implement each phase of the algorithm (with loop erasure while in case (2a), and without loop erasure while in case (2b)).In particular, with this implementation, we have the following observation for general graphs: Observation 26.Suppose that we run the implementation of Wilson's algorithm above on a graph G, and have built the tree T ℓ after the first ℓ phases.
(a) For a connected set of vertices S, if the walk W ℓ+1 begins from a vertex v ∈ S and ends phase ℓ + 1 by hitting T ℓ for the first time at the target U ℓ+1 ⊆ S and without leaving S, then after this phase, there is a path P in T ℓ+1 joining v to U ℓ+1 .
(b) For a connected set of vertices S, suppose the walk W ℓ+1 begins from a vertex in S that is adjacent to v ∈ T ℓ ∩ S and ends phase ℓ + 1 by hitting the target U ℓ+1 ⊆ S without leaving S.
Then after this phase, there is a path P from a vertex v ′ ∈ (S ∩ T ℓ ) \ U ℓ+1 to U ℓ+1 , all of whose vertices belong to S, and all but one of whose edges belong to T ℓ+1 .
Proof.In (a), the path P consists of loop-erased W l+1 from v until the first time it reaches T ℓ , and then any path within T ℓ to U ℓ+1 .Both segments of this path are in T ℓ+1 .In (b), we construct the desired path backwards from U ℓ+1 .We first add to P the last looperased part of W ℓ+1 before it reaches U ℓ+1 , corresponding to an entire step as described in Case (a) of our implementation of Wilson's algorithm.Note this entire path is in T ℓ+1 , and it is entirely contained in S because it is a subset of W ℓ+1 and all vertices of W ℓ+1 are in S. Let y be the first vertex of this path.If y is the first vertex of W ℓ+1 , it must be adjacent to v and adding v to the start of this path produces a path with the desired properties with v ′ = v.Otherwise, let x be the vertex preceding y in W ℓ+1 .It must be that x ∈ T ℓ+1 and there is no edge in T ℓ+1 between x and y, as x is the penultimate vertex in a step (as described in case (b) of our implementation of Wilson's algorithm) of W ℓ+1 that is entirely contained in T ℓ+1 until its last vertex, y, is (at that point) outside T ℓ+1 .Because W ℓ+1 doesn't reach U ℓ+1 until after it visits v ′ , and there must be some component of S ∩ T ℓ in the same component of T ℓ+1 as x because otherwise x wouldn't have been added to T ℓ+1 , it follows that x is in the same component of T ℓ+1 ∩ S as some other vertex v ′ ∈ (S ∩ T ℓ ) \ U ℓ+1 .We then let path P consists of the path from v ′ to x in T ℓ+1 ∩ S, the edge {x, y}, and the final loop-erased part of W ℓ+1 from y to U ℓ+1 .All vertices of this path are in S, and all edges except {x, y} are in T ℓ+1 .
In particular, applied to our situation, using as S the set of vertices close to a given curve, we obtain the following: Observation 27.Suppose that we run the implementation of Wilson's algorithm above on the dual graph Ω * D,Λn , and have built the tree T ℓ after the first ℓ phases.Then: (a) If the walk W ℓ+1 begins from a vertex v and ends phase ℓ + 1 by hitting T ℓ for the first time at the target U ℓ+1 = T ℓ ∩ B(δ, γ ℓ+1 (1)) while also staying within distance δ of the curve γ ℓ+1 , then after this phase, there is a path P in T ℓ+1 joining v to U ℓ+1 whose vertices are all within distance δ from the curve γ ℓ+1 .
Proof.This follows from Observation 26, with G = Ω * D,Λn and S to be all the vertices of Ω * D,Λn within distance δ of the curve γ ℓ+1 .
Using Observation 27, we complete the proof as follows.For a plane graph D, let f (D) be the number of interior faces of D. We say a (not-necessarily-spanning) tree T in the dual graph Ω * D,Λn δ-corresponds to a plane graph D with inner curves γ I 1 , . . ., γ I ℓ if there are paths P 1 , . . ., P ℓ , such that for each i: (a) P i and P j intersect if and only if γ I i and γ I j share a common endpoint.
(b) For any point p, if γ I i 1 , . . ., γ I is are all the curves of D that have p as an endpoint, then the union of the paths P i 1 , . . ., P is is a tree.
(c) Every vertex of P i is within distance δ of the curve γ I i .
(d) For f (D) − 1 of the paths, all but one edge of P i belongs to the tree T , while for the rest of the paths, the whole path belongs to T .Here f (D) is the number of faces of D.
We then have the following lemma, which applies to each plane graph D ℓ in the sequence constructed above.
Lemma 28.Let T be a tree in the dual graph Ω * D,Λn , and let H T be the spanning subgraph of the primal graph Ω D,h obtained by removing from Ω D,Λn all the edges e for which e * ∈ T .If T δ-corresponds to D ℓ , then there are f (D ℓ ) − 1 edges of H whose removal results in connected components C 1 , . . ., C k whose induced partition of Ω D,Λn is ε-compatible with D ℓ .
Let us first use Lemma 28 and induction on the sequence of plane graphs D ℓ to prove the Theorem.Initially, tree T 0 consisting of just the root vertex of Ω * D,Λn (equivalently, of just the wired boundary cycle of Ω * D,Λn ) trivially δ-corresponds to the plane graph D 0 with no interior curves.Having already constructed a tree T ℓ−1 that δ-corresponds to D ℓ−1 , we begin another phase of Wilson's algorithm from a vertex v ∈ Ω D,Λn .If T ℓ−1 ∩ B(δ, γ I ℓ (0)) = ∅, we begin from a vertex v at minimum distance from γ I ℓ (0) (call this Case A), and note v will not be in , we begin at a vertex v adjacent to any vertex in this set (Case B).In both cases, we use the target U ℓ = T ℓ−1 ∩ B(δ, γ I ℓ (1)).Note that when γ I ℓ (1) is incident on the outer face of D, the target U ℓ contains a portion of the boundary cycle of Ω * D,Λn within distance δ of γ I ℓ (1).By Lemma 24, with constant probability, the walk W ℓ for this phase will hit the target U ℓ while staying within distance δ of γ I ℓ .Thus, by Observation 27, and the fact that we are in Case A instead of Case B if and only if f (D ℓ ) = f (D ℓ−1 ) (as in Euler's formula), at the end of the phase, the tree T ℓ δ-corresponds to D ℓ .
In particular, after phase ℓ = m i (recall m i is the total number of interior curves in D) we have that with constant probability, our tree T m i consists only of the root and vertices within distance δ of the internal curves of D, and that there is a collection of paths P 1 , . . ., P m i satisfying properties (a),(b),(c),(d) above, and additionally that all but precisely f (D) − 1 = k − 2 of the paths belong entirely to three T m i .
From here, we complete Wilson's algorithm with arbitrary choices for starting vertices to produce a final tree T , which still contains all but at most one edge of each path P i , and the whole path in all but precisely k − 1 cases.In particular, in the primal graph, the tree T corresponds to a tree from which k − 1 edges can be deleted, to produce a partition that is ε-compatible with the drawing D.

It remains to prove Lemma 28.
Proof of Lemma 28.Let k = f (D ℓ ) and let the paths P 1 , . . ., P ℓ be as in the definition of δcorrespondence.Note the lemma is trivial if k = 1, so we assume k > 1.If we remove all the edges e from Ω D,Λn for which e * ∈ T , the result is a connected spanning subgraph of of Ω D,Λn and thus removing any additional k−1 edges results in graph with at most k components.Thus, to prove the Lemma, it suffices to show that if we remove all edges e from Ω D,Λn for which the corresponding e * belong to any of the paths P i , the resulting graph contains k components C 1 , . . ., C k that induce a partition that is ε-compatible with D ℓ .Indeed, if after removing the edges of these paths, we then remove the whole tree, we are still left with the same connected components C 1 , . . ., C k , by (d).
This is easy to show if we know that as a plane graph, the union of P 1 , . . ., P ℓ has the same number of faces as D. Indeed, any two points that belong to a common face of D and lie at distance greater than ε from every other face must be joined by a curve which is at distance greater than δ from every curve in D by condition (A3) as ensured by our choice of ε, δ via Lemma 25, and thus disjoint the union of the paths P 1 , . . ., P ℓ , by (c).
To check the number of faces of the union of P 1 , . . ., P ℓ , note that for each vertex of p of D, we have from (a) and (b) that the union of the paths {P i } corresponding to curves γ i ∈ Γ(D) incident to p form a tree.By our choice of δ, ε in (A1), (A2), (A3) and (c), we have that all vertices which belong to more than one of the P i of this tree lie within distance δ of p. Thus we can define a tree τ p which is a union of one segment from each P i , in each case containing an endpoint of P i , such that the whole tree τ p lies within distance δ of the point p.Considering the union of all of these τ p as a plane graph, it has |V (D)| connected components and a single face.
Each path P 1 , . . ., P ℓ consists of two end segments which belong to trees τ p , τ q , and a middle segment which joins two such trees.Note that no two middle segments intersect, by (c) and the choice of δ.In particular, when we add these middle segments to our drawing one-by-one, at each step we decrease the number of components or increase the number of faces, as in Euler's formula.As the same is true when we add curves γ i to build D one curve at a time, the two drawings have precisely the same number of faces.
Corollary 21 now follows with some additional observations about how the parameters of Theorem 20 applies to grids.
Proof of Corollary 21.Let D be the plane graph consisting of a unit rectangle divided vertically into k even pieces.Consider the lattice sequence ({Λ i }, 1/8) that has Λ i = (1/i)(nZ × mZ).This is a valid lattice sequence by Definition 18.
Note Λ mn is the graph (1/m)Z × (1/n)Z), and it is on this graph we focus.In this case, Ω D,Λmn can be chosen to be exactly the m × n grid graph.Note that, as ε > 1/m > 1/n, conditions (a), (b), and (c) of Definition 18 hold for Λ mn , indicating that mn is sufficiently large for our purposes.
Therefore the proof of Theorem 20 applies, not just in the limit of the lattice sequence ({Λ i }, 1/8), but already to the lattice Λ mn .The length of all interior curves in D is k − 1, a constant, implying that for a uniformly random spanning tree of Λ mn , the probability there are k − 1 edges whose removal results in a forest that is ε-compatible with D only depends on k and ε.

Additive Approximate Balance
We now turn to the proof of Theorem 22.We begin by observing several useful facts implied by the definition of a uniform lattice sequence.
Observation 29.Let ({Λ n }, ρ, R, C 1 , C 2 ) be a uniform lattice sequence.There exist positive constants c min , c max such that, for all sufficiently large w, h, n, any w n × h n rectangle contains between Proof.Let n be large enough so that the conditions of Definition 19 apply, and let h, w ≥ 4R.
This rectangle contains at least ⌊w/(2R)⌋ × ⌊h/(2R)⌋ disjoint circles of radius R/n placed in an evenly-spaced grid, and each must contain at least C 1 points.Note when w ≥ 4R, then ⌊w/(2R)⌋ ≥ w/(2R) − 1 ≥ w/(2R) − w/(4R) = w/(4R), and the same is true for h.Therefore the number of points in this rectangle is least This rectangle can be completely covered by the union of ⌈w/R⌉ × ⌈h/R⌉ balls of radius of R/n placed in an evenly-spaced grid.As each ball contains at most C 2 vertices, the number of vertices Given c min and c max , which depend only on the uniform lattice sequence, we define constants Term c 1 is meant to describe the rate at which a sequence of rectangles constructed in the proof are shrinking.Term c 2 is meant to describe the width of the interval through which we must leave each rectangle we consider.While c 1 = 1 − c 2 , this is simply a consequence of trying to choose constants that are convenient to work with; we will continue to use c 1 and c 2 in accordance with their conceptual meanings, as just described, rather than substituting one for another.
2 ) be a uniform lattice sequence, and let c min , c max , c 1 , c 2 be as above.There exist positive constants R ′ , R ′′ ρ ′ , ρ ′′ such that the following hold for all sufficiently large n.
(B1) Observation 29 holds for any w, h (B4) The distance between any two adjacent vertices in rectangle that is horizontallycentered and at distance 2R ′ n from the top will first leave the rectangle along the top with probability at least ρ ′ .
(B6) For any w ≥ 2(1 − c 1 )R ′ and h ∈ [w − 2R, w], a random walk in Λ n begun from the center of a w n × h n rectangle will first leave to a vertex above any given segment of the top of the rectangle of width 2c 2 w n with probability at least ρ ′ .(B7) With probability at least ρ ′′ , a random walk in Λ * n begun from the center v of a circle of radius at least R ′′ n first exits the circle to a point v ′ such that the ray from v to v ′ passes through the arc of angle π 6 that is centered at the top of the circle.Proof.Because Observation 29 holds whenever w, h ≥ 4R, (B1) holds whenever R ′ is chosen large enough so that R ′ ≥ 400Rc max /c min .Choosing R ′ this large also suffices to imply (B2) and (B3).And (B4) follows immediately from axiom (b) in the definition of a uniform lattice sequence; we only bother to state this weaker bound here because we will use it later.
Note that (B5) is just a claim about random walk in a finite subgraph induced by the vertices in the given rectangle, and so would hold if we knew this finite graph was connected.Although connectivity of this subgraph does not hold in general, we can deduce (B5) by repeated applications of part (c) of the definition of uniform lattice sequence, with r = R/n.Property (c) implies that, with positive probability, we exit such such a circle for the first time closer to the top and further from the left side, and also with positive probability, closer to the top and further from the right side.Repeated applications thus give that we exit the given rectangle at the top.(B6) follows from a similar argument, choosing a constant number of circles of radius c 2 w 2n .
Likewise, (B7) is another strengthening of property (c) from the definition of a uniform lattice sequence, with a specific region of the circle identified.It is not a direct consequence of property (c) for the same radius R n and probability ρ, but it is straightforward to get such a guarantee for larger R ′′ > R by using a small constant number of circles of radius R n .
Proof of Theorem 22.We show that there is a 1/poly(n) probability that a random spanning tree of Ω S Λn can be cut into pieces differing in size by an additive constant by examining the probability the tree resembles a particular plane partition consisting of the unit square divided into k vertical pieces.For each n, we may use a slightly different vertical partition, chosen to ensure equal numbers of vertices in each region.
Consider Ω S Λn .We draw k − 1 vertical lines L 1 , L 2 , . . ., L k−1 to partition the unit square into k vertical strips each containing exactly the same number of vertices of Ω S Λn , up to an error of ±1 (which is only necessary because the number of points in Ω S Λn may not be divisible by k).We can find the location of each L i by sweeping from left to right until we have the correct number of points.(If necessary, we can first perturb the embedding slightly so that no two vertices are vertically aligned.)Observe that there is an absolute bound on how close these lines can be to each other and to the left and right sides of the unit square for all sufficiently large n.This is because Observation 29 implies that if one strip has area cmax c min times the area of another one, it definitely contains more vertices.So let d 0 > 0 be such that the horizontal distance between all vertical lines is at least 2d 0 .Let ε := 4(1 − c 1 ) 2 d 2 0 < d 0 .We run the ordinary version of Wilson's algorithm (not the modified version described in Section 4.4), initiating the first k − 1 random walks W 1 , W 2 , . . ., W k−1 from the bottom of the unit square, lower-bounding the probability each walk W i makes it to the top while roughly following L i .Figure 9 depicts a typical walk satisfying these properties, as well as several of the geometric objects described shortly in the proof to aid in the probability analysis.
Each walk W i starts with a short segment β i from a dual vertex adjacent to the boundary cycle C * n and proceeds inward, reaching a distance of at least R n + R ′ n above the bottom of the unit square while staying within ε of L i , as depicted in the bottom-left of Figure 9. From the definition of a uniform lattice sequence, it is straightforward to see that such a path must exist, and all such paths must have constant length.Since uniform lattice sequences have at most a constant degree at every vertex, there is a constant probability that W i takes path β i .
From there, we next claim that there is a 1 poly(n) probability that W i reaches a point within ε 2 of the point labeled γ(0) in Figure 9, which is the point on L i of distance ε + R n from the bottom of the unit square.We repeatedly apply (B7) to a sequence of circles of exponentially increasing radius.Each circle is centered at the current position of the walk (the bottom three green points in Figure 9) and extends downward to be tangent to the horizontal line which is a distance of R n to the bottom of the unit square, ensuring that the walk does not hit the boundary cycle C * n .At each step, the walk leaves the circle within the top arc of angle π 6 with probability at least ρ ′′ , thus increasing its vertical distance from the R n line by a multiplicative factor of 1 + cos(π/12) while remaining within the shaded triangular region, which is defined to have bottom angle π/6 and contain the initial vertex.After s(n) := log(nε/R ′′ ) log(1 + cos(π/12)) circles, the elevation will have increased from its initial value of R ′′ n to ε, at which point it is clear from Figure 9 that the walk must have visited some point within the red circle around γ(0) of In this diagram, we suppose k = 2 and there is roughly uniform density of dual vertices in the graph.Thus, there is only one such path, and it is supposed to split the unit square (which is the boundary of the figure, but also extending beyond the dashed line to the right) in two equal-area pieces.Parts of the path are magnified on the left.The dashed red curve is an erased loop, which we assume was traversed clockwise before continuing on the black path.The figure is drawn to-scale with the following parameters from the proof: . Aside from c 1 being too small and c 2 being too large, these are all valid values for the parameters.radius ε 2 .This happens with probability at least As soon as this happens, we apply Lemma 23 (which is valid as a uniform lattice sequence is indeed a lattice sequence) to the curve beginning at γ(0) and proceeding upward to conclude that W i stays within a radius of ε of L i until it is at a distance of d 0 from the top of the unit square with constant probability.Let us call the total probability of all of these events occurring p 0 (n), which we have shown is Ω 1 poly(n) .At this point, W i has reached the vertex v 0 in Figure 9; this is the first vertex encountered in W i that is of distance at most d 0 from the top.More generally, letting d j := (c 1 ) j d 0 , for each j = 1, 2, . . .let v j be the first vertex encountered in W i that is of distance at most d j from the top, assuming W i makes it that far.At each step, there is a non-self-intersecting path P i,j from the start of W i to v j that will define the ultimate partition of the dual tree assuming parts of it are not erased.Let imb(j) denote the imbalance of the partition of the vertices of Ω S Λn obtained by extending P i,j straight upward until it his the top of the unit square.Here imbalance is defined as the difference between the number of vertices on the left side and the target size of i k Ω S Λn .Assuming W i makes it to each vertex v j , we let S j be the rectangle centered at v j with width w j := 2(1 − c 1 )d j and height h j := 2(1 − c 1 )d j − 2e j , where e j is the difference between d j and the vertical distance between v j and the top of the unit square, which is at most d j .For convenience, we define v j , w j , h j , and S j for j = −1, −2 as well, in the obvious way.Note that v j and S j will still be contained within the unit square since we know d 0 < 1 2 .We prove the following claim by induction on j: With probability at least p 0 (n)(ρ ′ ) j , all of the following events jointly occur: (C1) The walk W i eventually reaches a first vertex v j that is distance at most d j from the top.
(C2) Each of v 0 , v 1 , . . ., v j are within of line L i .
(C3) Each vertex encountered so far in W i has been within (C5) For any vertex v previously visited by W i within rectangle S j , the sub-path of P i,j from v to v j stays within S j−1 until reaching v j .
For the base case (j = 0), we have already noted that the walk makes it to v 0 while staying within the more stringent bound of ε with probability at least p 0 (n).This satisfies (C1), (C2), and (C3).When this happens, the maximum possible magnitude of imbalance is bounded by the initial imbalance of one plus the number of vertices in the ε-neighborhood of L i , which is a rectangle of dimensions 2ε × (1 − d 0 + e 0 ).Assuming n is sufficiently large so that Observation 29 applies, we may thus bound the absolute value of the imbalance by which establishes (C4).Finally, (C5) holds by the proof of Lemma 23, that is, the way in which we've assured that our walk is staying within ε of line L i .This proof uses balls of small radius at most ε/2 = 2(1 − c 1 ) 2 d 2 0 and bounds the probability the walk always makes progress toward a point further along L i , that is, a point higher up along L i .If such a path went below the bottom of S −1 , it would have had to backtrack through several circles of radius at most ε/2 (which is much smaller than h −1 = c −1 1 d 0 ) in the wrong direction, and the fact that it does not do so is already captured by our probability p 0 (n).This concludes the base case j = 0.
For the inductive case, suppose the statement holds for j − 1. Suppose the random walk W i has just reached vertex v j−1 in a way that satisfies all five properties (C1-5), which happens with probability at least p 0 (n)(ρ ′ ) j−1 .We have from (B6) that, with probability at least ρ ′ , W i will next leave S j−1 to a vertex within horizontal distance c 2 w j n of any given target t within the top of S j−1 .Since p 0 (n)(ρ ′ ) j−1 • ρ ′ = p 0 (n)(ρ ′ ) j , it suffices to show that there is some target t (that is, an x-coordinate) for which this event implies (C1-5) hold after step j.
Consider how imb(j) changes as we vary t.Recall the imbalance is calculated by extending P i,j straight upward until it hits the top of the unit square.We first focus on the contribution to the change in the imbalance from this extension of P i,j from v j to the top of the unit rectangle.Specifically, if we change t to be 1 4 w j−1 to the left or right, applying Observation 29 to the rectangle above v j to the top of the unit square, we know the imbalance will change by at least Here the −2 R n comes from the fact that the height of the precise rectangle we choose is shorter by up to R n on the bottom because that is how far v j might be above the top of S j−1 , and shorter by R n on the top because the vertices in Λ n within the top band of height R n might contain vertices that are outside of the boundary cycle C * .Using (B2), we know that so it follows that a lower bound on the imbalance change is given by On the other hand we are assuming the previous absolute imbalance is From how c 1 was chosen, we know, for example, that 1/c 2 1 ≤ 1/c 5 1 ≤ 2: Thus, there must be some target t in the middle half of the top boundary of S j−1 for which the imbalance contribution of vertices within d j − e j of the top of the unit square exactly cancels out imb(j − 1) (up to a single vertex, perhaps).In other words, if W i were to proceed from v j−1 to a vertex v j with x-coordinate exactly at the target t, taking a path that went straight upward to the top of S j−1 , then horizontally along the top of the square, then straight up to v j , the partition would be balanced up to one vertex.However, the path it takes through S j−1 can introduce further imbalance of the following magnitudes: • An imbalance of at most c max n 2 c 2 w j−1 d j coming from the fact that W i might exit S j−1 a distance of up to ±c 2 slightly to either side of the target t.(If there is a one-vertex imbalance from before, it can be accounted for in this term as well.) • An imbalance of c max n 2 w j−1 (h j−1 + e j ) ≤ c max w j−1 h j−1 + R n coming from the fact that we can make an arbitrary partition of the vertices in S j−1 , where the e j term accounts for including the vertices above S j−1 and below v j .
• An imbalance of c max n 2 w j−2 h j−2 coming from loop erasures that affect the previous rectangle S j−2 as well.For example, this happens in Figure 9 when the red dashed loop is erased shortly after the walk visits v 4 .Though we do not need to consider any rectangles further back in the sequence: By the inductive hypothesis of (C5), such a loop cannot extend below the bottom of S j−2 (which, in Figure 9, is the green rectangle centered at v 3 ).
Summing these up, we obtain the upper bound on |imb(j)| from (C4).
The other four properties are easy to check.(C1) is immediate because points above the top of S j−1 are within d j of the top of the unit square.(C2) holds because we exit within a c 2 fraction of w j−1 from the target, which needs to be at most a 1  4 fraction away from the current position, so the total additional drift left or right is at most ( 1 4 + c 2 )w j−1 .(C3) is simply a crude upper-bound on how far to the side any walk could have traveled while staying within the left and right boundaries of the rectangles S j , the biggest rectangle having width w 0 .For (C5), note that S j does not overlap with S j−2 , so any such vertex v must be in S j−1 \ S j−2 .Hence, v must have been visited by W i after v j−1 , so the path forward from v must first exit S j−1 to v j .Thus, by induction, Claim 4 holds for all 0 ≤ j ≤ L.
Returning to the proof of the theorem, we pick L so that Then with probability p 0 (n)(ρ ′ ) L , W i will satisfy (C1-5) with j = L. From vertex v L , we know from (B5) that, with probability at least ρ ′ , W i will continue all the way to the top of the unit square, hitting C * before exiting the top of a final2(1−c 1 )R ′ n × (5−c 1 )R ′ 2n rectangle, which is shown in purple at the very top of Figure 9. 2 Observe that the imbalance before the final part of the walk starts is at most Since the n 2 terms cancel and c 1 , c 2 , R ′ , and R are all constant, this is a constant.To bound the additional imbalance generated from this final part of the walk, observe that the final walk stays within a rectangle that does not overlap with S L−2 .This is because the final walk starts at least a distance of above the top of S L−2 and the distance from the start of the final walk to the bottom of the final rectangle is where the first inequality follows from (B4).Thus, we may bound the imbalance by applying (B1) to just the final two rectangles.The imbalance is at most which is also a constant.Summing these imbalances, we know that the total imbalance is at most a constant, not depending on n.Also, applying (C2) and (C3), the maximum horizontal deviation of W i from L i is at most so by the way we chose d 0 , no walk will hit the left or right sides of the unit square, and no two neighboring walks will collide with each other.
Figure 11: Distributions over component sizes after removing an edge from a random spanning tree for four specific edges in the 10×10 grid.The x-axis represents the size of the component below the edge, which can be any number between 1 and 99.Each bar represents a single value, with the one under the dashed red line representing exact balance.All plots are on the same logarithmic scale, with probability on the y-axis.Note that the probabilities sum to strictly less than one because sometimes the edge is not even included in the tree.The distribution is asymmetric for the two edges in the top row and symmetric for the edges in the middle row.
When a given edge is in the tree but does not give a balanced split, how imbalanced is it?Figure 11 shows the empirical distribution over component sizes for various edges in the 10 × 10 grid.As one can see, the most common component sizes are heavily imbalanced.Curiously though, at least for central edges on the 10 × 10 grid, being exactly balanced is more likely than being moderately balanced.Figure 12 shows that this trend holds for 50 × 50 and 100 × 100 grids as well.
Comparing these figures also illustrates the main point of Corollary 21.In each histogram, summing the area of a constant number of bars near the dashed line yields the probability that the parts are approximately balanced.As one can see, this probability does not appear to be vanishing as we increase the grid resolution; it should be lower-bounded by a constant.

Appendix
This section includes proofs omitted from the main body of the paper.
To prove Proposition 7, we will use the following propositions: Proposition 31.For vertices u, v in a graph G with M edges, the commute time τ u (v) + τ v (u) between u and v is equal to 2M R u,v , where R u,v denotes the effective resistance between u and v.
The above is proved, e.g., in [9].We will use the following bound on the effective resistance of the grid, which can be found, e.g., in Proposition 9.16 in [24]: Proposition 32.The effective resistance between opposite corners of a k × k grid graph is at most 2 log k.
Finally we recall the following monotonicity principles for effective resistance: Proposition 33.If G is a graph and G ′ is obtained from G by adding edges and/or gluing vertices, the effective resistance between any pair of vertices in G ′ is at most the effective resistance between the corresponding pair of vertices in G.
Proof of Proposition 7. Suppose the G is an m × n grid graph, with n ≤ m.By Propositions 6 and 31, it suffices that the effective resistance between any vertex v in the dual G * and the root r corresponding to the outer face of G satisfies R v,r ≤ 2 log n.We show this in the following way.Let G be an (m + 1) × (n + 1) grid graph.Observe that G * can be obtained from G by gluing all its boundary vertices (i.e., those incident with its outer face in the canonical drawing) to form a single vertex, which is then the root r of G * .By Proposition 33, for any vertex v ∈ G * , an upper bound on the effective resistance between v and r in G * can be obtained by considering the effective resistance between v and any boundary vertex in G.To this end, simply consider a largest square subgrid S of G which has v as its corner vertex.The opposite corner u will necessarily be a boundary vertex of G.Even just in S, the effective resistance between v and u is at most 2 log n, and thus by Proposition 33, it is at most 2 log n in G as well, proving the proposition.
Proof of Lemma 8.Note every k-forest of G can be obtained by removing k − 1 edges from some spanning tree of G.For each spanning tree, the number of ways in which to do this is exactly N −1 k−1 .This means there are at most N −1 k−1 • sp(G) k-forests of G.If the probability a uniformly random spanning tree of G is k-splittable is at least α, this means there are at least α • sp(G) splittable spanning trees of G.For a splittable spanning tree, exactly one of the ways of removing k − 1 edge produces a balanced k-forest.On the other hand, each forest can be obtained from a spanning tree in at most ways, since this is a bound for the number of choices for the additional k − 1 edges which belong to a spanning tree which contains the forest.This means there are at least α • sp(G)/(M − N + 1) k−1 balanced k-forests of G.
The probability a uniformly random k-forest is balanced is the number of balanced k-forests divided by the total number of k-forests.This is at least Proof of Theorem 9. We will refer to each time we begin again at Step 1 as a round of this algorithm.Note in Step 2, if there exist k − 1 edges whose removal disconnects T into k components of equal size, this collection of edges is unique; there are never two distinct ways to divide a tree into k components of equal size.
Correctness: Let P be a particular balanced k-partition of G. Let P 1 , . .., P k be the districts of P .In any given round of this algorithm, the probability we sample a spanning tree that can be divided to produce exactly P is sp(G/P ) k i=1 sp(P i ) sp (G) .
We then accept this sample with probability 1/s = 1/sp(G/P ).In all, the probability we sample partition P is proportional to k i=1 sp(P i ), meaning we are sampling exactly from the spanning tree distribution.
Runtime: In the interest of runtime, we can implement the first step by running Wilson's algorithm on the dual graph, with the vertex corresponding to the outer face of the grid as the root.In this way, Wilson's algorithm takes O(N log N ) steps to produce a uniformly random spanning tree of G.The resulting uniformly random spanning tree of the dual graph can be converted to a uniformly random spanning tree of the grid graph in linear time, via the bijection in Lemma 5.
Step 2 can be easily implemented using a greedy approach and depth-first search, which runs in time O(N ).Creating G/P takes at most O(N ) time, and computing its spanning tree count is constant time whenever k is a constant, as G/P has only k vertices.This means the runtime of each round of this algorithm is O(N log N ) in expectation.
The expected number of rounds until a random spanning tree of an N -vertex grid graph G is found to be k-splittable is O(N 2k−2 ) by our Theorem 15 when k is constant.Similarly as in the proof of Lemma 8, a trivial upper bound on s for any G/P is 2N k−1 = O(N k−1 ), as there are at most 2N edges in G and k −1 are in any spanning tree of G/P .This means the expected number of rounds we must do until a k-splittable partition is returned is O(N 3k−3 ) in expectation.Altogether, this gives an expected running time of O(N 3k−2 log N ).
Proof of Theorem 10.We will refer to each time we begin again at Step 1 as a round of this algorithm.
Correctness: The up-down walk is known to sample approximately uniformly from the k-forests of G, and walking for longer than its mixing time ensures this is the case.The probability a given partition P is returned is proportional to the number of k-forests whose connected components are the districts of P , which is exactly the spanning tree distribution.
Runtime: The mixing time of the up-down walk on a graph with N vertices is O(N log N ), and each step can be implemented O(log N ) amortized time [10,1].It then takes O(N ) steps to check if the sampled k-forest is balanced.Thus each round takes total time O(N log 2 N ).By Theorem 2, it takes O(N 4k−4 ) rounds in expectation to see a balanced k-forest.Thus the total expected running time is O(N 4k−3 log 2 N ).
Proof of Lemma 25.Let ε 1 be the minimum distance between any pair of points in the finite set V .For a curve γ, define a γ , b γ and then γ as in the statement of (A2), but with ε 1 in place of ε.The images of all the curves γ are compact sets, they are disjoint, and there are finitely many of them, so there is some minimum positive distance ε 2 between them.
We let ε = min(ε 1 , ε 2 )/3, and choose δ as follows.By uniform continuity of the curves, for any γ ∈ Γ(D) there is a δ γ such that for any s, t, we have that |s − t| < δ γ =⇒ d(γ(s) − γ(t)) < ε.Choose δ 1 to be the minimum of the δ γ , over all γ ∈ Γ.Now, given a compact set K ⊆ R 2 , consider the function f K : [0, 1] 2 ×[0, 1] 2 → R where f K (x, y) is defined to be the supremum, over all curves from x to y, of the distance between the curve and K: f K (x, y) = sup γ:γ(0)=x,γ(1)=y im(γ)∩K=∅ d(γ, K) for x, y / ∈ im(γ).(16) Note that the surpremum is over the infinite family of all curves from x to y, not over the finite family of curves that are the subject of the Lemma.(Note that if x and y lie in different connected components of R 2 \ K, we have that f K (x, y) = 0.) f is easily seen to be a continuous function of x and y; for example, a curve from x to y can be linearly extended to nearby alternative endpoints x ′ and y ′ when they are closer to x, y than K is.Observe that if x, y / ∈ K, and x, y belong to the same connected component of the open set R 2 \ K, there is a curve γ from x to y that is disjoint from K, since open connected subsets of Euclidean space are path connected.Its image is compact and thus has positive distance from K.This shows that when x, y belong to a common connected component of R 2 \K, f K (x, y) is positive.Now fix any inner face ϕ of D and consider the case where K = K ϕ,ε is the compact set consisting of all points in ϕ which are at distance ≥ ε from the boundary of the face.By uniform continuity, there is a minimum value δ ϕ,ε of f K over all points x, y ∈ K.We can then define δ to be, say, half the minimum of δ ϕ,ε over the finitely many choices for the inner face ϕ.

Figure 2 .Figure 2 :
Figure 2: A possible run of the dual graph spanning tree sampling algorithm in the proof of Lemma 12 when m is odd.In this example, m = 10 and n = 7.The primal graph G is depicted in gray, and the first two random walks in the dual graph G * are depicted in black.

Figure 3 :
Figure3: The cases in the proof of Lemma 12 when m is even, in which we must assume that the initial steps of the random walk from b * takes a specific path into the blue rectangle, from which it never leaves until hitting the outer face.

Figure 5 :
Figure 5: A possible run of the dual graph spanning tree sampling algorithm in the proof of Theorem 15 when m is odd.In this example, m = 12, n = 11, and k = 3.The primal graph G is depicted in gray, and the first four random walks in the dual graph G * are depicted in black.

Figure 6 :
Figure 6: Illustration accompanying the proof of Lemma 23.A random walk from v 0 in the dual lattice eventually reaches a vertex v L within ε 2 of γ(1) while staying within ε of the curve γ because each of the eventsL v 0 ,0 , L v 1 ,t 1 , L v 2 ,t 2 , . . ., L v L−1 ,t L−1 occur.A key step of the proof is lower-bounding the distance between γ(t j + 1) and γ(t j ), which we accomplish by observing that v j is closer to γ(t j ) than γ(t j+1 ), since it is close to a j and the arc A * (v j−1 , t j−1 ) is small.

Figure 8 :
Figure 8: A run of the first four phases of Wilson's algorithm approximating the first four inner curves γ I 1 , γ I 2 , γ I 3 , γ I 4 .Note that paths corresponding to γ I 2 and γ I 4 each are missing an edge, and in particular, the edges present do not disconnect the interior of C * .These missing edges are dual to the edges in the corresponding primal spanning tree whose removal would disconnect the tree into components approximating the faces of this drawing.

Figure 9 :
Figure9: Illustration accompanying the proof of Theorem 22, which gives an inverse polynomial lower bound on the probability of the first k − 1 walks of Wilson's algorithm follow paths like the windy thin black line on the right.In this diagram, we suppose k = 2 and there is roughly uniform density of dual vertices in the graph.Thus, there is only one such path, and it is supposed to split the unit square (which is the boundary of the figure, but also extending beyond the dashed line to the right) in two equal-area pieces.Parts of the path are magnified on the left.The dashed red curve is an erased loop, which we assume was traversed clockwise before continuing on the black path.The figure is drawn to-scale with the following parameters from the proof:c 1 = 7 8 , c 2 = 1 8 , c 3 = 1.8, d 0 = 1 4 , L = 6, ε = 1 256 , R n = R ′ n = 1 2048 , R ′ n = 1 16.Aside from c 1 being too small and c 2 being too large, these are all valid values for the parameters.

max (from how c 1 and c 2 were chosen) = 6 25 c
min n 2 w j−1 d j .

Figure 12 :
Figure 12: Distribution over component sizes for the central edges in the 50 × 50 and 100 × 100 grids, similar to the bottom-left histogram in Figure 11.In the 50 × 50 grid, each bar (except the ones on the very end) represents 25 possible values, and in the 100 × 100 grid they represent 101 possible values.These plots are on the same logarithmic scales and have the same numbers of bars as in Figure 11.
2ensures the desired lower bound is true.