arXiv:2012.09502v1 [cs.DS] 17 Dec 2020 loihsfr(prxmtl)cutn aiu combinat various counting (approximately) for Algorithms prxmt apigadcutn r nw ob equivalen be to known are counting and sampling Approximate rbescnb eaty ovdb ipycmuigadeter a computing simply by solved (exactly) be can problems such problems long-standing resolving counting, to proach below. ec ewe apoiae onigadsmln [ sampling and counting (approximate) between lence n ftemseiu prahst onigi i determin via is counting to approaches mysterious the MCMC. than of other One approaches via count countin can to we so sampling definition, for from by However, reduction sampling. the namely to equivalence, counting reducing [ of ones direction self-reducible so-called the [ sets convex of volume the computing wh counting, approximate to method (MCMC) Carlo Monte Chain Introduction 1 pnigtesi rp a ecutdb optn deter a computing by counted be can graph a in trees Spanning • h ubro efc acig napaa rp a ecomp be can graph planar a in matchings perfect of number The • roecne nadrce rp a ecutdb computi by counted be can graph directed a in Arborescences • h ubro ueintusi nElra irp sdirec is digraph Eulerian an in tours Eulerian of number The • aallagrtm o apig eso htsmln arb sampling that show We sampling. for algorithms parallel h rp,arsl nw stemti-reterm[ theorem matrix- the as known result a graph, the h eemnn)o naporaeysge eso ftea the of version signed appropriately [ an of determinant) the apigt onigsest eihrnl eunil Thi sequential. inherently be to seems counting to sampling bu fcetprle apigo hs tutrs u w Our structures. these of p sampling determinantal parallel efficient and about digraphs, in tours Eulerian matchings, ecs n osqetytedtriatrltdt h dir the to related determinant the consequently and cences, eemnn,wihi nw ob in be to known is which determinant, ob oyoiltm ovbe h xc ubro arbores of number exact the [ solvable; C polynomial-time graph. be directed weighted to possibly a from arborescence, an alca [ Laplacian Tut48 Kas63 o eea elsuidcmiaoilsrcue,count structures, combinatorial well-studied several For esuytepolmo apigauiomyrno directed random uniformly a sampling of problem the study We ,adsmln a erdcdt onig[ counting to reduced be can sampling and ], ]. iaAnari Nima Tut48 1 tnodUniversity, Stanford apigAbrsecsi Parallel in Arborescences Sampling ]. 2 nvriyo Washington, of University 1 ahnHu Nathan , JVV86 DFK91 ; eebr1,2020 18, December NC JS96 [ ]. {anari,zixia314,saberi}@stanford.edu Csa75 1 .Ti qiaec snnrva n otueu nthe in useful most and nontrivial is equivalence This ]. mnSaberi Amin , Abstract .Teeicueabrsecs lnrgahperfect graph planar arborescences, include These ]. 1 JVV86 JVV86 [email protected] r sase oad eovn hsmystery. this resolving towards step a is ork ; ra tutrsaeotnbsdo h equiva- the on based often are structures orial itpoess oee,ntmc sknown is much not However, processes. oint n a erdcdt h optto fa of computation the to reduced be can ing ascly hspolmhsln enknown been long has problem this lassically, Kir47 sapoiaigtepraet[ permanent the approximating as ; JS96 rsecscnb oein done be can orescences ,poe sfl o hs rbes almost problems, these For useful. proves g, ecscnb optdb determinant a by computed be can cences assteqeto fdsgigefficient designing of question the raises s JS96 epolm,te“air ieto fthis of direction “easier” the problems, me iat o-xasiels sprovided is list non-exhaustive A minant. .Hwvr h lsi euto from reduction classic the However, ]. 1 n opttos ag fcounting of range A computations. ant o iecaso rbes including problems, of class wide a for t ce alca [ Laplacian ected ]. .Ti side h ai fteMarkov the of basis the indeed is This ]. n ao Schild Aaron and , gadtriatrltdt h directed the to related determinant a ng jcnymti,aka h ut matrix Tutte the a.k.a. matrix, djacency l once otenme farbores- of number the to connected tly c sagal h otscesu ap- successful most the arguably is ich otdsann re lokonas known also tree, spanning rooted tda h ffa sur otof root (square Pfaffian the as uted iatrltdt h alca of Laplacian the to related minant AB87 RNC ; 2 . TS41 ]. JSV04 and ] Rd [n] • Given vectors v1,..., vn ∈ , the volume sampling distribution on subsets S ∈ ( d ) can be defined as follows: P 2 [S] ∝ det ([vi]i∈S) . ⊺ The partition function of this distribution is simply det(∑i vivi ) [see, e.g., DR10]. • The number of non-intersecting paths between specified terminals in a lattice, and more generally applications of the Lindström-Gessel-Viennot lemma [Lin73; GV89]. Efficient counting for these problems follows the polynomial-time computability of the associated deter- minants. In turn, one obtains efficient sampling algorithms for all of these problems; we remark that ot all of these problems are known to be self-reducible, but nevertheless “easy” slightly varied sampling to counting reductions exist for all of them. While polynomial-time sampling for all of these problems has long been settled, we reopen the investiga- tion of these problems by considering efficient parallel sampling algorithms. We focus on the computational model of PRAM, and specifically on the complexity classes NC and RNC. Here, a polynomially bounded number of processors are allowed access to a shared memory, and the goal is for the running time to be polylogarithmically bounded; the class RNC has additionally access to random bits. Determinants can be computed efficiently in parallel, in the class NC [Csa75], and as a result there are NC counting algorithms for all of aforementioned problems. However, the sampling to counting reductions completely break down for parallel algorithms, as there seems to be an inherent sequentiality in these reductions. Take spanning trees in a graph as an example. The classic reduction from sampling to counting proceeds as follows: for each edge e do A ← number of spanning trees containing e B ← total number spanning trees Flipping a coin with bias A/B, decide whether e should be part of the tree. Either contract or delete the edge e based on this decision.

Each iteration of this loop uses a counting oracle to compute A, B. However the decision of whether to include an edge e as part of the tree affects future values of A, B for other edges, and this seems to be the inherent sequentiality in this algorithm. The sampling-to-counting reduction for all other listed problems encounters the same sequentiality obstacle. In this paper, we take a step towards resolving the mysterious disparity between counting and sampling in the parallel algorithms world. We resolve the question of sampling arborescences in weighted directed graphs, and as a special case spanning trees in weighted undirected graphs, using efficient parallel algo- rithms with access to randomness, a.k.a. the class RNC. We remark that the special case of sampling spanning trees in unweighted undirected graphs was implic- itly solved by the work of Teng [Ten95a], who showed how to simulate random walks in RNC. When combined with earlier work of Aldous [Ald90] and Broder [Bro89], this algorithm would simulate a ran- dom walk on the graph, and from its transcript extract a random spanning tree. However, adding either weights or directions to the graph results in the need for potentially exponentially large random walks, which cannot be done in RNC. Our work removes this obstacle. Theorem 1. There is an RNC algorithm which takes a directed graph G = (V, E) together with edge weights R w : E → ≥0 as input and outputs a random directed rooted tree T, a.k.a. an arborescence. The output T follows the distribution P[T] ∝ ∏ w(e). e∈T

1.1 Related Work and Techniques There is a long line of research on algorithms for sampling and counting spanning trees and more gen- erally arborescences. The matrix-tree theorem of Kirchhoff [Kir47] showed how to count spanning trees

2 W 1 ... W 1

Figure 1: Starting from left it Figure 2: A random walk started from the left node covers all n takes Θ(W) steps to cover. nodes in time Θ(2n).

in undirected graphs, and later Tutte [Tut48] generalized this to arborescences in digraphs. Somewhat surprisingly Aldous [Ald90] and Broder [Bro89] showed that random spanning trees and more generally random arborescences of a graph can be extracted from the transcript of a random walk on the graph itself. The main focus of subsequent work on this problem has been on improving the total running time of sequential algorithms for sampling. After a long line of work [Wil96; CMN96; KM09; MST15; Dur+17b; Dur+17a], Schild [Sch18] obtained the first almost-linear time algorithm for sampling spanning trees. More recently Anari, Liu, Oveis Gharan, and Vinzant [Ana+20] improved this to nearly-linear time. Many of these works are based on speeding up the Aldous-Broder algorithm. Our main result, Theorem 1, is also built on the Aldous-Broder algorithm, but we focus on parallelizing it instead of optimizing the total running time. No almost-linear time algorithm is yet known for sampling arborescences in digraphs, as opposed to spanning trees in undirected graphs. While sampling spanning trees has a multitude of application [see Sch18], there are a number of applications for the directed graph generalization. Most notably, there is a many-to-one direct correspondence between Eulerian tours in an Eulerian digraph and arborescences of the graph. This correspondence, known as the BEST theorem [AB87; TS41] allows one to generate random Eulerian tours by generating random arborescences [see Cre10]. We leave the question of whether the correspondence in the BEST theorem is implementable in NC to future work, but note that sampling Eulerian tours has interesting applications in biology and sequence processing [Jia+08; Riv+08]. We remark that, unlike directed graphs, generating random Eulerian tours of undirected Eulerian graphs in polynomial time is a major open problem [TV01]. In a slightly different direction related to this work, Balaji and Datta [BD13] considered the space com- plexity of counting arborescences. They showed this problem is in L for graphs of bounded tree-width, obtaining algorithms for counting Eulerian tours in these digraphs as well. Perhaps in the first major result of its kind in the search for RNC sampling algorithms, Teng [Ten95b] showed implicitly how to sample spanning trees in undirected graphs in RNC. Teng [Ten95b] showed how to parallelize the simulation of a random walk on a graph; more precisely, he showed how to output a length L trace of a walk on size n Markov chains in parallel running time polylog(L, n) using only poly(L, n) many processors. The Aldous-Broder algorithm extracts an arborescence from the trace of a random walk by extracting the so-called first-visit edge to each vertex. If a random walk is simulated until all vertices are visited at least once, the trace of the random walk has enough information to extract all such first-visit edges. This allows RNC sampling of arborescences in graphs where the number of steps needed to visit all vertices, known as the cover time, is polynomially bounded. While the cover time of a random walk on an undirected unweighted graph is polynomially bounded in the size of the graph [see, e.g., LP17], adding either weights or directions can make the cover time exponentially large. See Figs. 1 and 2. We overcome the obstacle of exponentially large cover times, by taking a page from some of the recent advances on the sequential sampling algorithms for spanning trees. Instead of simulating the entirety of the random walk until cover time, we extract only the first-visit edges to each vertex. We use the same insight used in several prior works that once a region of the graph has been visited, subsequent visits of the random walk can be shortcut to the first edge that exits this region. However, this involves a careful construction of a hierarchy of “regions”, and bounding the number of steps needed inside each region to fully cover it. Unlike undirected graphs, in directed graphs arguing about the covering time of a region

3 becomes complicated. We build on some of the techniques developed by Boczkowski, Peres, and Sousi [BPS18] to bound these covering times in the case of Eulerian digraphs. We then reduce the arborescence sampling problem for arbitrary digraphs to that of Eulerian digraphs.

1.2 Overview of the Algorithm At a high-level, our algorithm first proceeds by reducing the problem to sampling an arborescence from an Eulerian graph. We then construct a “loose decomposition” of the Eulerian graph into weighted cycles. We then construct a hierarchy of vertex sets by starting with the empty graph and adding the weighted cycles one by one, from the lowest weight to the highest, adding the connected components in each iteration to the hierarchy. This results in a hierarchical clustering of vertices, with the intuitive property that once we enter a cluster, we spend a lot of time exploring inside before exiting. Our algorithm proceeds by “simulating” polynomially many jumps between the children of each cluster, before exiting that cluster. The resulting jumps are then stitched together at all levels of the hierarchy to form a partial subset of the transcript of a random walk. The shallow “simulation” of edges jumping across children of a cluster in the hierarchy can be done in RNC by using a doubling trick as in the work of Teng [Ten95b]; in order to “simulate” L jumping edges, we combine the first L/2 with the last L/2 in a recursive fashion. A naive implementation of this is not parallelizable however, as one needs to know where the first L/2 jumps eventually land before “simulating” the rest. However since the number of locations is polynomially bounded, one can precompute an answer for each possible landing location in parallel to simulating the first L/2 edges. Once shallow jumps are simulated, our algorithm then proceeds by stitching these jumping edges with jumping edges of one level lower (i.e., inside of the children clusters), and so on. Again, a naive implementation of this stitching is not in RNC, but we employ a similar doubling trick and an additional caching trick to parallelize everything. We then argue that with high probability all of the edges extracted by this algorithm contain the first-visit edges to every vertex.

2 Preliminaries

We use the notation [n] to denote the set {1, ..., n}. We use the notation O˜ (.) to hide polylogarithmic factors. 1 When we use the term high probability, we mean with probability 1 − poly( n ), where n is the size of the input, and the polynomial can be taken arbitrarily large by appropriately setting parameters.

2.1 Notations When a graph G =(V, E) is clear from the context, we use n to refer to |V| and m to refer to |E|. For a subset of vertices S ⊂ V, δ+(S) denotes the set all incoming edges {e = (u, v) | v ∈ S, u ∈/ S}. Similarly, δ−(S) will denote the set of all outgoing edges {e = (u, v) | u ∈ S, v ∈/ S}. Lastly, let G(S) denote the subgraph induced by S. R Definition 2. Given a weighed graph G = (V, E) with weights w : E → ≥0, a subset of the vertices S ⊆ V is said to be strongly connected by edges of weight wc if for every s, t, ∈ S, there exists a path of edges inside S connecting s to t such that every edge e of the path has weight w(e) ≥ wc. Definition 3. An arborescence is a directed graph rooted at vertex r such that for any other vertex v, there is exactly one path from v to r. Arborescences are also known as directed rooted trees and are a natural analog of spanning trees in directed graphs. When a background graph G =(V, E) is clear from context, by an arborescence we mean a subgraph of G that is an aborescence. R Given digraph G = (V, E) together with a weight function w : E → >0, the random arborescence

4 distribution is the distribution that assigns to each arborescence T probability

P[T] ∝ ∏ w(e). e∈T

When w is not given, it is assumed to be the constant 1 function, and the random arborescence distribution becomes uniformly distributed over all arborescences. We view an undirected graph G = (V, E) as a di- rected graph with double the number of edges, with each undirected edge producing two directed copies in the two possible directions. It is easy to see that the weighted/uniform random arborescence distribu- tion on the directed version of an undirected graph is the same as the weighted/uniform spanning tree distribution on the original graph; viewing each arborescence without directions yields the corresponding spanning tree. We call a (possibly weighted) digraph G =(V, E) Eulerian if

∑ w(e) = ∑ w(e) e∈δ+(v) e∈δ−(v) for all vertices v. Note that the directed version of an undirected graph is automatically Eulerian.

2.2 Random Walks and Arborescences Our approach centers around the Aldous-Broder algorithm on directed graphs [Ald90; Bro89]. Their work reduces the task of randomly generating a spanning tree or arborescence to simulating a random walk on the graph until all vertices have been visited. While most famously known for generating spanning trees, this algorithm can be used to generate arborescences as well.

A weighted digraph defines a natural random walk. This is a Markov process X0, X1,..., where each Xi is obtained as a random neighbor of Xi−1 by choosing an outgoing edge with probability proportional to its weight, and transitioning to its endpoint. P [Xi | Xi−1] ∝ w(Xi−1, Xi). π π A stationary distribution is a distribution on the vertices such that if X0 is chosen according to , then all π Xi are distributed as . Under mild conditions, namely strong connectivity and aperiodicity, the stationary distribution is unique.

A random walk on an undirected graph is known to be time-reversible. That is if X0 is started from the stationary distribution, then (Xi, Xi+1) is identical in distribution to (Xi+1, Xi). This does not hold for directed graphs. However the time reversal of the process . . ., Xi, Xi+1, . . . corresponds to a random walk on a different digraph. R Definition 4. For a weighted digraph G = (V, E) with weights w : E → ≥0 and stationary distribution π, define the time-reversal to be the graph G′ =(V, E′) on the same set of vertices, with edges reversed in direction, and weights given by w′(v, u) = π(u)w(u, v)/π(v).

The random walk on G′ shares the same stationary distribution π as G. The random walk on G′ (started from π) is identical in distribution to the time-reversed random walk on G (started from π); see [LP17]. Theorem 5 ([Ald90; Bro89]). Suppose that G = (V, E) is a strongly connected weighted graph, with weights R given by w : E → >0. Perform a time-reversed random walk, starting from a vertex r, until all vertices are visited at least once. For each vertex v ∈ V \ {r}, record the edge used in the random walk to reach v for the first time. Let T be the collection of all these first-visit edges (with directions reversed). Then T is an arboresence of G rooted at r, and P[T] ∝ ∏ w(e) e∈T

5 This allows us to sample r-rooted arborescence from a digraph by performing a random walk on the time- reversal. It is also known that among all arborescences, the total weight of those rooted at r is proportional to π(r), where π is the stationary distribution [Ald90; Bro89]. Therefore to resolve Theorem 1, it is enough to show how to sample r-rooted arborescences. Theorem 6. There is an RNC algorithm which takes a directed graph G = (V, E) together with edge weights R w : E → ≥0 and a root vertex r ∈ V as input and outputs a random r-rooted arborescence, where P[T] ∝ ∏ w(e). e∈T

We can fix the root because the stationary distribution π can be computed in NC, by solving a system of linear equations.

2.3 Parallel Algorithms In this paper we consider parallel algorithms run on the PRAM model, and we will construct algorithms to show that sampling problems are in the class RNC, the randomized version of NC. In this class, we are allowed to use polynomially (in the input size) many processors who share access to a common random access memory, and also have access to random bits. The running time of our algorithms must be polylogarithmic in the input size. While our work hinges upon the simulation of a random walk, a process which is inherently sequential, for polynomially many steps, such a task is known to be in RNC through the use of a “doubling trick.” R Theorem 7 ([Ten95b]). Suppose that G = (V, E) is a directed graph, with weights given by w : E → ≥0. The transcript of a random walk starting from a given vertex v0 ∈ V and running for L time steps can be produced in the PRAM model using poly(|E|, L) processors in polylog(|E|, L) time. Theorem 5 and Theorem 7 naturally lead to a parallel algorithm that randomly samples arborescences using poly(|E|, L) processors and polylog(|E|, L) time where L is the cover time of the digraph. However, L can be exponential in the size of the graph as the cover time depends closely on the edge weights of a graph. In directed graphs, the cover time can be exponential even if we do not allow weights. See Figs. 1 and 2. Luckily, Theorem 5 only needs the first-visit edges to produce the random arborescence. This insight has been heavily used to improve the running time of sequential algorithms for sampling spanning trees [KM09; MST15; Sch18], by shortcutting the random walk. Here we use the same insight to design an RNC algorithm. Our algorithm identifies a hierarchy of clusters of vertices S ⊆ V and will only simulate incoming and outgoing edges of each cluster as opposed to the entire walk. To do this, we will use a well- known primitive that the probability of entering or exiting a cluster through any edge can be computed using a system of linear equations. Lemma 8 ([see, e.g., Sch18]). Given a set S ⊂ V and vertex v ∈ S, the probability of a random walk started at v exiting S through any particular edge e ∈ δ−(S) can be computed by solving a system of linear equations involving the Laplacian. Some of the most powerful primitives for NC algorithms come from linear algebra. In particular, multiply- ing matrices, computing determinants, and inverting matrices all have NC algorithms [Csa75]. Combining this with Lemma 8 we obtain the following folklore result. Lemma 9. Given a set S ∈ V and vertex v ∈ S, the probability of a random walk started at v exiting S through any particular edge e ∈ δ−(S) can be computed in NC.

2.4 Schur Complements A key tool which we shall use in our analysis of random walks is Schur complements.

6 Definition 10. For any weighted digraph G = (V, E), for any subset of the vertices S ⊆ V, we define the graph GS to be the Schur complement of S¯. GS is the directed graph formed by starting with the induced sub-graph of S. Then, for every pair of vertices (u, v) in S, add an edge from u to v with weight deg(u) P[u −→ v], where P[u −→ v] is the probability that a random walk on G currently at u exits S with the next move and its first return to S is at the vertex v.

Then, it is easy to see that for any starting vertex v0 ∈ S, the distribution over random walk transcripts in GS starting at v0 is the same as the distribution over random walk transcripts in G starting at v0 with all vertices outside of S removed. We also observe that: Proposition 11. For any Eulerian weighted digraph G = (V, E), for any subset of the vertices S ⊂ V, the Schur complement GS is also an Eulerian weighted digraph and the degree of any vertex in S is the same in GS as in G.

3 Reduction to Eulerian Graphs

A key part of our algorithm is the analysis of the time it takes for random walks to cover regions of a digraph. Cover times are in general difficult to analyze on directed graphs, but the situation becomes much easier on Eulerian graphs. For more precise statements, see Section 6. As a first step in our algorithm, we show how to reduce the design of sampling algorithms on arbitrary digraphs to Eulerian ones. We can reduce the problem of sampling an arborescence of digraph G to sampling a random arborescence rooted at vertex r on strongly connected Eulerian digraph G′′ as follows in Algorithm 1. We begin by selecting the vertex at which the arborescence is rooted, using the Markov chain tree theorem [Ald90; Bro89]. Theorem 12 (The Markov chain tree theorem). Let G = (V, E) be a weighted directed graph. Assume that the π π π natural Markov chain associated with G has stationary distribution =( 1,..., n). Then we have the following relationship between π and the arborescences of G: ∑ {w(T) | T arborescence rooted at i} π = , i ∑ {w(T) | T arborescence} where w(T) is product of edge weights in T. Finding the stationary distribution of a random walk on some graph G reduces to solving a system of n linear equations and can be done in NC. After the root r ∈ V of an arborescence is selected, we can add outgoing edges from r to graph G to guarantee that G is strongly connected. As no arborescence rooted at r will contain these new edges, the addition of such edges does not affect the distribution of arborescences rooted at r. Then, we note that for any vertex v, if we multiply the weights of all edges in δ−(v) by some constant, the distribution of arborescences rooted at any vertex does not change. We can therefore rescale edges to ensure that the resulting graph is Eulerian. Proposition 13. Graph G′′ is Eulerian.

Proof. We have that, for all v in G′ ′ π′ w (u, v) π′ ∑ (u) ′ = (v) (u,v)∈δ+(v) degout(u) Then, considering G′′ : ′ π′ ′′ ′′ w (u, v) (u) π′ degin(v) = ∑ w (u, v) = ∑ ′ = (v) (u,v)∈δ+(v) (u,v)∈δ+(v) degout(u) ′ π′ w (v, x) ′′ ′′ = (v) ∑ ′ = ∑ w (v, x) = degout(v) (v,x)∈δ−(v) degout(v) (v,x)∈δ−(v)

7 Algorithm 1: Reduction to strongly-connected Eulerian graphs Compute the stationary distribution π(v) of a random walk on G Choose vertex r to be the root of the arborescence with probability π(r) G′ =(V, E′) ←− G for v ∈ V \ {r} in parallel do if e′ =(r, v) ∈/ E then Add e′ to E′ with weight w′(e) = 1 Compute the stationary distribution π′(v) of a random walk on G′ G′′ =(V, E′′) ←− G′ for v ∈ V do for e =(v, u) ∈ E′′ do ′′ w′(e) ′ w (e) ←− ′ π (v) degout(v) Randomly sample an arborescence rooted at r from G′′

Thus, in RNC, the task of randomly sampling an arborescence in some digraph can be reduced to the task of randomly sampling an arborescence rooted at some vertex r from a strongly connected Eulerian digraph.

4 Cycle Decomposition

Because Theorem 5 only needs the first-visit edges to produce a random arborescence, our main idea is to create a hierarchical clustering of the graph that we call T . Every element S ∈ T in the clustering is a subset of V which is strongly connected by edges of relatively high weight compared to the edges in δ−(S). Intuitively, a random walk will spend much time traversing edges inside a cluster, before venturing out. Aside from first visit edges, any other traversals do not need to be simulated, thus much of the work can be avoided by only simulating the first few edges which enter or exit a cluster. Consider the pseudocode in Algorithm 2 for generating one such decomposition:

Algorithm 2: Generating a hierarchical decomposition for edge e ∈ G in parallel do ′ we Find a cycle Ce of edges such that e ∈ Ce and for every e ∈ C, we′ ≥ m using Algorithm 3 Sort the cycles found by minimum edge weight in decreasing order C1, C2,..., Cm T ←−{} for i=1,2,...m in parallel do Find Si,1, Si,2 ... Si,j, the vertex sets of the connected components in (V, C1 ∪ C2 ∪···∪ Ci) Add all elements found to T

for Si,j ∈ T \ Sm,1 in parallel do Find the node of the form Si+1,k such that Si,j ⊂ Si+1,k and assign Si+1,k as the parent of Si,j Contract duplicate nodes in T

We use Algorithm 3 to construct a cycle of comparably high-weight edges containing a given edge e. The collection of these cycles is a “loose decomposition” of the Eulerian graph into cycles. While an Eulerian graph can be decomposed into cycles in general, we do not know if this can be done in NC. Instead we find a collection of cycles whose sum and poly(m) times it sandwich the Eulerian graph. For each edge e, Algorithm 3 successfully returns a cycle since, Proposition 14. In directed weighted Eulerian graph G = (V, E) for any edge e ∈ E, there exists a cycle of edges ′ ′ we Ce such that e ∈ Ce and for all e ∈ Ce, we ≥ m

8 Algorithm 3: FindCycle(e =(e0, e1), G =(E, V)) ′ ′ ′ ′ we Construct G =(V, E ), where E = {e ∈ E : we′ ≥ m } for v1, v2 ∈ V in parallel do ′ if (v1, v2) ∈ E then R(v1, v2,1) ←−True for v ∈ V in parallel do R(v, v,0) ←−True R(v, v,1) ←−True for l ∈ {2,4,...2ln n} do for v1, v2, v3 ∈ V in parallel do if R(v1, v2, l/2) and R(v2, v3, l/2) then R(v1, v3, l) ←−True

c0 ←− e1, c2⌈ln n⌉ ←− e0 for l ∈ {2⌈ln n⌉−1,2⌈ln n⌉−2,...1} do for i ∈ [2⌈ln n⌉] such that l is the largest power of 2 which divides i in parallel do Set ci to be some vertex such that R(ci−l, ci, l) and R(ci, ci+l, l)

Prune the transcript of vertices {c0, c1,..., c2⌈ln n⌉ } to remove any duplicates and return the resulting cycle.

Proof. Note that any Eulerian digraph can be decomposed into at most m cycles where each cycle contains we edges of uniform weight. Then, for any edge e, one of these cycles must have weight at least m .

Given that a cycle is found containing every edge in G, it follows that Algorithm 2 successfully generates a hierarchical decomposition which satisfies: Proposition 15. T is a laminar family, i.e. has the following properties: 1. Every node S of T is a subset of V and is the vertex set of a connected component of G. 2. Children of any node in T are proper subsets of it. 3. |T|≤ 2n. Given this clustering T , for any S ∈ T , we say an edge e ∈ E jumps between children of S if S is the lowest node in T which contains both endpoints of e. We call e a jumping edge of S. In addition, we note that

Lemma 16. For any S ∈ T , let wmax(S) be the maximum weight among the jumping edges of S. G(S) is strongly wmax(S) connected by edges of weight m .

Proof. We prove by contradiction. Assume that there is some edge e jumping between children of S and we two vertices u, v ∈ S such that every path between u, v contains an edge of weight less than m . Let the cycles which connect S in Algorithm 2 be C1,... Ck, with Ck being the cycle with an edge of minimum weight. Then, consider the path of edges connecting u to v only containing edges in these cycles. The weight of every edge in the path must be greater than w(Ck), the weight of the minimum weight edge in we > Ck. Thus by our assumption we must have that m w(Ck). we But now consider Ce, the cycle found containing edge e with minimum edge weight w(Ce) ≥ m . As w(Ce) > w(Ck), this cycle must have been used to construct a child of S in T . This implies the e is contained in a child of S and is therefore not a jumping edge of S, a contradiction.

9 Lemma 16 intuitively states that the nodes in T are tightly connected by edges of relatively high weight compared to incoming or outgoing edges. This will be critical in bounding the number of edges which need to be simulated.

5 Parallel Sampling

For clarity, a partially sampled random walk shall be represented as an alternating series of clusters and δ− δ+ edges: S1, e1, S2, e2,..., where each Si ∈ T and ei ∈ (Si) ∩ (Si+1). The sequence has a natural interpretation of a random walk in Si which then exits Si through ei to continue in Si+1 before traversing ei+1 and so on. Once we have a hierarchical decomposition T found in Section 4, a natural way to use such a decomposi- tion is to simulate a random walk as follows: 1. Simulate just the edges jumping between high-level clusters of a random walk, producing a transcript of the form S1, e1, S2, e2,....

2. For each i, recursively simulate a random walk on Si conditioned on exiting Si though edge ei. While this recursive procedure as described is not in RNC, using doubling tricks and memoization, we show how to perform this in RNC. One can view this as a generalization of the doubling trick used by Teng [Ten95b].

5.1 Simulating Jumping Edges To simulate edges jumping across children of a node, we generalize the techniques of [Ten95b] to the following: R Theorem 17. Suppose that G =(V, E) is a directed graph, with weights given by w : E → ≥0. Let S ⊆ V be the disjoint union of S1, S2,... Sk, where S and each Si is strongly connected. The transcript of first L edges jumping across different Si in a random walk starting from a given vertex v0 ∈ S and conditioned on exiting S though some edge e ∈ δ−(S) can produced in the PRAM model using poly(|E|, L) processors and polylog(|E|, L) time.

Proof. We denote this function JumpingEdges(S, v0, e, L). See Algorithm 4 for pseudocode. Note that we can condition a walk on S to exit via some edge e ∈ δ−(S) by considering a random walk on the graph induced by S with an additional edge e and an absorbing state at the endpoint of e. For any vertex v ∈ S, let Sv denote the unique Si which contains v.

From Lemma 9, for any v ∈ S, the probability that a random walk currently at v exits Sv though each − edge in δ (Sv) can be computed in NC. Thus, after using poly(|E|, L) processors and polylog(|E|, L) time to compute all such probabilities for every vertex v ∈ S, we can assume access to a deterministic function − Next(v, X) which takes a vertex v ∈ S and number X ∈ [0,1] and outputs and edge e ∈ δ (Sv) such that − if X is chosen uniformly from [0,1], then the probability that Next(v, X) returns some edge e ∈ δ (Sv) is the probability a random walk currently at v exits Sv through edge e.

Given this function, if we generate independent uniformly random numbers X1,..., XL ∈ [0,1], the tran- script of the jumping edges in random walk can be extracted by starting at v = v0 and repeatedly applying Next(v, Xi) to get the next vertex v, for i ∈ [L]. Of course, a naive implementation does not leverage paral- lelism, so we instead use a doubling trick. We compute the values End(v, t, l) which would be the final edge jumping between children of S when we run a random walk starting at v, and applying Next with random inputs Xt, Xt+1,..., Xt+l−1. For l = 1, these are 1-step random walks and we use Next to compute them. For simplicity, we allow the first argument of End to also be an edge, in which case the random walk starts at the ending vertex of that edge. Then we use the following identity, which allows us to compute End values for a particular l from l End values for 2 . End(v, t, l) = End(End(v, t, l/2), t, l/2)

10 This is because we can break an l-step random walk into two l/2-step random walks. So we can compute all End values when l ranges over powers of 2, in log(L) steps. Finally to compute the edge taken by the random walk at any time l = 1, ..., L, we simply write down l as a sum of powers of 2, and repeatedly use the End function to compute the l-th edge of the random walk which jumps between children of S.

Algorithm 4: JumpingEdges(S, v0, eend, L) for t ∈ {1,2,... L} in parallel do Let Xt be a uniformly random number sampled from [0,1] for v ∈ S in parallel do End(v, t,1) ←− Next(v, S)

for l ∈ {2,4,8,...,2⌊ln L⌋} do for v ∈ S, t ∈ {0,1,... L − 1 − l} in parallel do l l End(v, t, l) ←− End(End(v, t, 2 ), t, 2 ) for l ∈ 1,2,... L in parallel do Decompose l as a sum of subset S ⊂ {1,2,...2⌊ln L⌋−1} e ←− (∗, v0) t ←− 0 for s ∈ S do e ←− End(e, t, s) t ←− t + s

el ←− e vl ←− the ending vertex of el if ek = eend for some k then

return Sv0 , e1, Sv1 , e2,... Svk−1, ek = eend else

return Sv0 , e1, Sv1 , e2,..., SL−1, eL, S, eend

Remark 18. For clarity of exposition, we allow sampling numbers from [0,1]. However sampling a number with polynomially many bits is enough for our purposes. In our algorithms, we only need to compare our samples Xt with deterministic numbers derived from the input. To this end, we can simply sample the first N digits of the binary expansion of Xt for some large N. The probability that the comparison of Xt and a fixed number is not determined from the first N digits is 2−N. By taking N to be polynomially large, the probability of failure will be bounded by an exponentially small number. If one insists on avoiding even this small probability of failure, we can continue sampling digits of Xt whenever we run into a situation where the first N are not enough. Since the probability of running into failure is very small, the overall expected running time still remains polylogarithmic.

5.2 Extracting First-Visit Edges For a cluster, once we know which edges jump across its children, we can recursively fill in the transcript of the walk. This is because we now have a similar subproblem for each child node, where we have a starting vertex, and a prespecified exit edge. However, a naive implementation of this is not in RNC. Instead our strategy is to again use a doubling trick. Consider a node S of T and a vertex v ∈ S. Using the algorithm JumpingEdges, we can extract the edges that jump across children of S. We can then extend these to include edges that jump across children of children of S by more applications of JumpingEdges. We will construct a function AllEdges(S, v, e, L, l) that besides the arguments to JumpingEdges also takes an integer l ≥ 1. The goal of this function is to extract from the transcript of a random walk started at v and conditioned on exiting S through e, the first L edges which jump between descendants of depth

11 at most l below S in T . Then, each intermediate node in the transcript is either an individual vertex, an lth descendant of S, or a cluster for with L edges jumping between its children have already been found. We will show that for polynomially large L, this transcript will contain all first-visit edges with high probability. A natural approach for computing AllEdges is as follows. We already know how to compute AllEdges for l = 1; that is just a call to JumpingEdges. Once the value of AllEdges has been computed for all settings of parameters for a particular l, we can compute it for 2l by the following procedure:

1. Let the transcript returned by AllEdges(S, v, e, L, l) be S1, e2, S2, e2,..., Sk, ek.

2. For each intermediate node Si that is not a single vertex, if the transcript does not already con- tain L edges jumping between children of Si, let u be the endpoint of ei−1 and replace Si, ei with AllEdges(Si, u, e, L, l) 3. Trim the transcript to only contain at most the first L edges jumping between children of any node There is one key problem with this approach. We cannot precompute AllEdges(·, ·, ·, ·, l) and use the same precomputed answer to fill in the gaps for larger values of l. Each time we need to use AllEdges for a particular setting of its input parameters, we really need to use fresh randomness; otherwise the transcript we extract will not be from a true random walk. We resolve this by using a caching trick. Instead of computing AllEdges(S, v, e, L, l) for each setting of parameters once and reusing the same output for larger subproblems, we compute M possible answers for a large enough M and store all M answers. For larger subproblems, every time that we need to use the values of a smaller subproblem, we randomly pick one of the stored M answers. We will inevitably reuse some of the answers in this process; however when we restrict our attention to the unraveling of a particular answer for a subproblem there is a high probability of not having reused any answers. We will formalize this in Lemma 19. Pseudocode for computing AllEdges can be found in Algorithm 5. In the end we use AllEdges(V, v, ∅, L, |V|) to extract a list of edges, and with high probability all first-visit edges will be among this list

Algorithm 5: Computing the random walk transcript extracts for S ∈ T , e ∈ δ−(S) ∪ {∅}, v ∈ S, i ∈ [M] in parallel do AllEdges(S, v, e, L,1)[i] ←− JumpingEdges(S, v, e, L) for l ∈ {1,2,...2⌈lg L⌉−1} do for S ∈ T , e ∈ δ−(S) ∪ {∅}, v ∈ S, i ∈ [M] in parallel do if l is greater than depth of the deepest child of S then AllEdges(S, v, e, L,2l)[i] ←− AllEdges(S, v, e, L, l)[i] else Let S1, e1, S2, e2,... Sk be the output of AllEdges(S, v, e, L, l)[i] for j ∈ [k] in parallel do if the transcript does not already contain L edges jumping between children of Sj then ′ ′ Replace Si, ei with a randomly chosen instance of AllEdges(Sj, v , ej, L, l) where v is the endpoint of ej−1 Trim the resulting transcript to only contain at most the first L edges jumping between children of any node. Save the resulting transcript as a solution to AllEdges(S, v, e, L,2l)[i]

if the final transcript of AllEdges(V, v, ∅, L, |V|) contain multiple subsequences which depend on the same call to JumpingEdges then Replace all but the first subsequence with a freshly sampled transcript

12 Lemma 19. For M = poly(L), when we unravel the recursion tree for the computation of the value AllEdges(V, v, ∅, L, |V|), no stored answer of AllEdges for any of the subproblems will be used more than once with high probability.

Proof. Note that for any any S ∈ T, v ∈ S, e ∈ δ−(S), the recursion tree for an answer to AllEdges(V, v, ∅, L, |V|) will rely on at most L calls to JumpingEdges(S, v, e, L) since each call to JumpingEdges(S, v, e, L) corre- sponds to a subsequence of the final transcript which ends in e, and e can only occur L times in the transcript by the definition of AllEdges. As each sample of JumpingEdges(S, v, e, L) is chosen uniformly at random from M samples, for polynomially large M, the probability of the same sample being chosen 1 twice can be made small and of the form poly(n) . Lastly via a union bound over polynomially many pos- sible combinations of arguments for JumpingEdges, we have that for polynomially large M, which high probability no stored answer of JumpingEdges or AllEdges will be used more than once.

Putting everything together, we have shown that: R Theorem 20. Suppose that G = (V, E) is a directed graph, with weights given by w : E −→ >0. Let T denote a hierarchical decomposition of G. The transcript of a random walk starting at v0 ∈ V which contains first L edges jumping between children of S for any S ∈ T can produced in the PRAM model using poly(|E|, L) processors in polylog(|E|, L) expected time.

6 Hierarchical Exploration Time

The last element needed to obtain an RNC algorithm for the random sampling of arborescences is to show that for the decomposition achieved above, for polynomially large L, simulating the first L edges which jump across each node S ∈ T will contain all first-visit edges to each vertex with high probability. We do this by bounding the number of edge traversals between children of each node before that node is covered. We build on techniques developed by Boczkowski, Peres, and Sousi [BPS18]. We start by bounding the number of times a given vertex is visited before cover time. For any v, s, t ∈ V, let Hv(s, t) denote the expected number of times a random walk starting at s visits v before reaching t; in the case that s = t, Hv(s, s) denotes the number of times a walk starting at s reaches v before returning to s.

It is easy to see that Hv satisfies a triangle inequality, namely:

Proposition 21. On any directed graph G =(V, E), for any v, s, t, u, ∈ V:Hv(s, t) ≤ Hv(s, u) + Hv(u, t). Additionally, as the stationary distribution of vertices on an Eulerian graph is proportional to the degree of a vertex, it follows that: 1 π deg(v) Proposition 22. On any directed Eulerian graph G =(V, E), for any v, s ∈ V:Hv(s, s) = π(s) (v) = deg(s)

Proof. Consider the Schur complement GS where S = {v, s}. Since G is Eulerian, so is GS and the degrees of v, s are the same in G and GS. Letting the weights of edges in GS be w(v, s), w(s, v), w(v, v), w(s, s), we must have w(s, v) = w(v, s) for GS to be Eulerian. As random walks on GS are distributed like random walks on G whose transcripts have been restricted to only contain vertices in S, the values of Hv(s, s), Hv(v, s) are the same for a walk on G as for one on GS. Considering one-step transitions, we can construct the following system of equations:

w(s, v) w(s, s) H (s, s) = (H (v, s) + 1) + 0, v deg(s) v deg(s) w(v, v) w(v, s) H (v, s) = (H (v, s) + 1) + 0. v deg(v) v deg(v)

w(v,v) w(s,v) w(v,v) w(s,v) deg(v) deg(v) Solving yields Hv(v, s) = w(v,s) and Hv(s, s) = deg(s)  w(v,s) + 1 = deg(s) w(v,s) = deg(s) .

13 For any two vertices which are connected by an edge, we have:

Lemma 23. On any directed Eulerian graph G = (V, E), for any v, s, t ∈ V such that e = (s, t) ∈ E,Hv(s, t) ≤ deg(v) w(s,t)

w(s,t) Proof. Note that every time the walk is currently at s, there is a deg(s) chance of moving to t, thus, in deg(s) expectation, the expected number of times the walk returns to s before reaching t is at most w(s,t) . Between deg(v) each return to s, the expected number of visits to v is deg(s) by Proposition 22. Thus, we conclude that:

deg(s) deg(v) deg(v) H (s, t) ≤ = . v w(s, t) deg(s) w(s, t)

On graphs which are strongly connected by edges of some weight wc, this observation leads to the conclu- sion that:

Lemma 24. On an Eulerian directed graph G =(V, E) strongly connected by edges of weight wc, for any s, t ∈ V, H (s, t) ≤ deg(s)n s wc

Proof. By connectivity assumptions, there exists a sequence of at most n vertices s = v0, v1,..., vk = t which form a path connecting s and t such that w(vi−1, vi) ≥ wc for all i ∈ [k]. Then, combining Proposition 21 with Lemma 23,

k k deg(s) n deg(s) Hs(s, t) ≤ ∑ Hs(vi−1, vi) ≤ ∑ ≤ . i=1 i=1 w(vi−1, vi) wc

This trivially bounds the expected number of returns to a vertex s before a graph G is covered by a random 2 walk by n deg(s). wc Remark 25. While this bound is sufficient for our purposes, using Matthew’s trick, this bound can be further tightened to n log n deg(s) [Mat88]. wc Lemma 26. For any node S ∈ T in the decomposition obtained by Algorithm 2, the expected number of edges traversed between children of S before every vertex in S has been visited is at most n2m2.

Proof. For each edge e = (u, v) which jumps between children of S, the expected number of times edge we e is traversed is deg(u) times the expected number of times vertex u is reached by a random walk before all vertices in S are reached. To bound the number of times u is reached before S is covered, consider a random walk on the Schur complement GS . The expected number of times u is reached in a random walk on G before S is covered is the same as the expected number of times u is reached by a random walk on GS before GS is covered.

By Proposition 11, GS will be Eulerian and the degrees of all vertices in S will be the same in G and wmax(S) GS . By Lemma 16, S is strongly connected by edges of weight m , and so GS is as well. Then, by ( ) 2 Lemma 24, the expected number of times u is hit before G is covered is at most by deg u n m . Thus, the S wmax expected number of times edge e is traversed before S is covered is at most

deg(u)n2m w e ≤ n2m wmax deg(u)

we 2 2 since wc ≥ m . As there are at most m jumping edges of S, in expectation, at most n m edge traversals between children of S will occur before every vertex in S has been reached.

14 Thus, for large enough L = poly(n, m), by Markov’s inequality, with high probability every node S ∈ T is covered by the time L edges have jumped across S. This means the transcript returned by AllEdges will contain all first visit edges with high probability. As this transcript is polynomial in length, all first visit edges and the corresponding arborescence they form can be extracted and returned in NC.

7 Discussion and Open Problems

We showed how to sample arborescences, and as a special case spanning trees, from a given weighted graph using an RNC algorithm. While this is a step in resolving the disparity between parallel sampling and parallel counting algorithms, more investigation is needed. In particular, for the list of problems with determinant-based counting in Section 1, designing RNC sampling algorithms remains open. One of these problems in particular, namely sampling Eulerian tours from an Eulerian digraph, is in- timately connected to sampling arborescences, due to the BEST theorem [AB87; TS41]. However the reduction, while polynomial-time implementable, is not known to be in NC. Question 27. Is there an algorithm for sampling Eulerian tours uniformly at random in Eulerian digraphs? The important tool our result relied on was the Aldous-Broder algorithm. So it is natural to ask whether there are generalizations of the Aldous-Broder result to settings beyond spanning trees and arborescences. In particular the bases of a regular matroid are a proper generalization of spanning trees in a graph, and they have a decomposition in terms of graphic, co-graphic, and some special constant-sized matroids [Sey80]. Question 28. Can we sample from a regular matroid, or equivalently from a volume-based distribution defined by totally unimodular vectors in RNC? Yet another direction for generalization are higher-dimensional equivalents of spanning trees and arbores- cences. For example, Gorodezky and Pak [GP14] provided a generalization of the algorithm of Wilson [Wil96] for sampling arborescences from graphs to hypergraphs. While Wilson’s algorithm is different from that of Aldous-Broder, it is closely related. Can these generalizations be efficiently parallelized?

References [AB87] T Aardenne-Ehrenfest and NG Bruijn. “Circuits and Trees in Oriented Linear Graphs”. In: Classic Papers in Combinatorics (1987), pp. 149–163. [Ald90] David J Aldous. “The random walk construction of uniform spanning trees and uniform labelled trees”. In: SIAM Journal on Discrete Mathematics 3.4 (1990), pp. 450–465. [Ana+20] Nima Anari, Kuikui Liu, Shayan Oveis Gharan, and Cynthia Vinzant. “Log-Concave Polyno- mials IV: Exchange Properties, Tight Mixing Times, and Faster Sampling of Spanning Trees”. In: arXiv preprint arXiv:2004.07220 (2020). [BD13] Nikhil Balaji and Samir Datta. “Tree-width and logspace: Determinants and counting Euler tours”. In: arXiv preprint arXiv:1312.7468 (2013). [BPS18] Lucas Boczkowski, Yuval Peres, and Perla Sousi. “Sensitivity of mixing times in Eulerian digraphs”. In: SIAM Journal on Discrete Mathematics 32.1 (2018), pp. 624–655. [Bro89] Andrei Broder. “Generating random spanning trees”. In: Foundations of Computer Science, 1989., 30th Annual Symposium on. IEEE, 1989, pp. 442–447. [CMN96] Charles J Colbourn, Wendy J Myrvold, and Eugene Neufeld. “Two algorithms for unranking arborescences”. In: Journal of Algorithms 20.2 (1996), pp. 268–281. [Cre10] Patrick John Creed. “Counting and sampling problems on Eulerian graphs”. In: (2010). [Csa75] Laszlo Csanky. “Fast parallel matrix inversion algorithms”. In: Foundations of Computer Science, 1975., 16th Annual Symposium on. IEEE. 1975, pp. 11–12. [DFK91] Martin Dyer, Alan Frieze, and Ravi Kannan. “A random polynomial-time algorithm for ap- proximating the volume of convex bodies”. In: Journal of the ACM (JACM) 38.1 (1991), pp. 1– 17.

15 [DR10] Amit Deshpande and Luis Rademacher. “Efficient volume sampling for row/column subset selection”. In: Foundations of Computer Science (FOCS), 2010 51st Annual IEEE Symposium on. IEEE. 2010, pp. 329–338. [Dur+17a] David Durfee, Rasmus Kyng, John Peebles, Anup B Rao, and Sushant Sachdeva. “Sampling random spanning trees faster than matrix multiplication”. In: Proceedings of the 49th Annual ACM SIGACT Symposium on Theory of Computing. 2017, pp. 730–742. [Dur+17b] David Durfee, John Peebles, Richard Peng, and Anup B Rao. “Determinant-preserving spar- sification of SDDM matrices with applications to counting and sampling spanning trees”. In: 2017 IEEE 58th Annual Symposium on Foundations of Computer Science (FOCS). IEEE. 2017, pp. 926–937. [GP14] Igor Gorodezky and Igor Pak. “Generalized loop-erased random walks and approximate reachability”. In: Random Structures & Algorithms 44.2 (2014), pp. 201–223. [GV89] Ira M Gessel and Xavier Viennot. “Determinants, paths, and plane partitions”. In: preprint 132.197.15 (1989). [Jia+08] Minghui Jiang, James Anderson, Joel Gillespie, and Martin Mayne. “uShuffle: a useful tool for shuffling biological sequences while preserving the k-let counts”. In: BMC bioinformatics 9.1 (2008), p. 192. [JS96] Mark Jerrum and Alistair Sinclair. “The Markov chain Monte Carlo method: an approach to approximate counting and integration”. In: Approximation algorithms for NP-hard problems (1996), pp. 482–520. [JSV04] Mark Jerrum, Alistair Sinclair, and Eric Vigoda. “A polynomial-time approximation algorithm for the permanent of a matrix with nonnegative entries”. In: Journal of the ACM (JACM) 51.4 (2004), pp. 671–697. [JVV86] Mark R Jerrum, Leslie G Valiant, and Vijay V Vazirani. “Random generation of combinatorial structures from a uniform distribution”. In: Theoretical computer science 43 (1986), pp. 169–188. [Kas63] Pieter W Kasteleyn. “Dimer statistics and phase transitions”. In: Journal of Mathematical Physics 4.2 (1963), pp. 287–293. [Kir47] Gustav Kirchhoff. “Ueber die Auflösung der Gleichungen, auf welche man bei der Unter- suchung der linearen Vertheilung galvanischer Ströme geführt wird”. In: Annalen der Physik 148.12 (1847), pp. 497–508. [KM09] Jonathan A Kelner and Aleksander Madry. “Faster generation of random spanning trees”. In: Foundations of Computer Science, 2009. FOCS’09. 50th Annual IEEE Symposium on. IEEE. 2009, pp. 13–21. [Lin73] Bernt Lindström. “On the vector representations of induced matroids”. In: Bulletin of the Lon- don Mathematical Society 5.1 (1973), pp. 85–90. [LP17] David A Levin and Yuval Peres. Markov chains and mixing times. Vol. 107. American Mathe- matical Soc., 2017. [Mat88] Peter Matthews. “Covering Problems for Brownian Motion on Spheres”. In: The Annals of Probability 16.1 (1988), pp. 189–199. doi: 10.1214/aop/1176991894. [MST15] Aleksander M ˛adry, Damian Straszak, and Jakub Tarnawski. “Fast generation of random span- ning trees and the effective resistance metric”. In: Proceedings of the twenty-sixth annual ACM- SIAM symposium on Discrete algorithms. Society for Industrial and Applied Mathematics. 2015, pp. 2019–2036. [Riv+08] Romain Rivière, Dominique Barth, Johanne Cohen, and Alain Denise. “Shuffling biological sequences with motif constraints”. In: Journal of Discrete Algorithms 6.2 (2008), pp. 192–204. [Sch18] Aaron Schild. “An almost-linear time algorithm for uniform random spanning tree genera- tion”. In: Proceedings of the 50th Annual ACM SIGACT Symposium on Theory of Computing. ACM. 2018, pp. 214–227. [Sey80] Paul D Seymour. “Decomposition of regular matroids”. In: Journal of combinatorial theory, Series B 28.3 (1980), pp. 305–359. [Ten95a] Shang-Hua Teng. “Independent sets versus perfect matchings”. In: Theoretical Computer Science 145.1-2 (1995), pp. 381–390. [Ten95b] Shang-Hua Teng. “Independent sets versus perfect matchings”. In: Theoretical Computer Science 145.1-2 (1995), pp. 381–390.

16 [TS41] WT Tutte and Cedric AB Smith. “On unicursal paths in a network of degree 4”. In: The American Mathematical Monthly 48.4 (1941), pp. 233–237. [Tut48] W. T. Tutte. “The dissection of equilateral triangles into equilateral triangles”. In: Mathematical Proceedings of the Cambridge Philosophical Society 44.4 (1948), pp. 463–482. doi: 10.1017/S030500410002449X. [TV01] Prasad Tetali and Santosh Vempala. “Random sampling of Euler tours”. In: Algorithmica 30.3 (2001), pp. 376–385. [Wil96] David Bruce Wilson. “Generating random spanning trees more quickly than the cover time”. In: Proceedings of the twenty-eighth annual ACM symposium on Theory of computing. 1996, pp. 296– 303.

17