Sampling Arborescences in Parallel

Authors Nima Anari, Nathan Hu, Amin Saberi, Aaron Schild

Thumbnail PDF


  • Filesize: 0.53 MB
  • 18 pages

Document Identifiers

Author Details

Nima Anari
  • Stanford University, CA, USA
Nathan Hu
  • Stanford University, CA, USA
Amin Saberi
  • Stanford University, CA, USA
Aaron Schild
  • University of Washington, Seattle, WA, USA

Cite AsGet BibTex

Nima Anari, Nathan Hu, Amin Saberi, and Aaron Schild. Sampling Arborescences in Parallel. In 12th Innovations in Theoretical Computer Science Conference (ITCS 2021). Leibniz International Proceedings in Informatics (LIPIcs), Volume 185, pp. 83:1-83:18, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2021)


We study the problem of sampling a uniformly random directed rooted spanning tree, also known as an arborescence, from a possibly weighted directed graph. Classically, this problem has long been known to be polynomial-time solvable; the exact number of arborescences can be computed by a determinant [Tutte, 1948], and sampling can be reduced to counting [Jerrum et al., 1986; Jerrum and Sinclair, 1996]. However, the classic reduction from sampling to counting seems to be inherently sequential. This raises the question of designing efficient parallel algorithms for sampling. We show that sampling arborescences can be done in RNC. For several well-studied combinatorial structures, counting can be reduced to the computation of a determinant, which is known to be in NC [Csanky, 1975]. These include arborescences, planar graph perfect matchings, Eulerian tours in digraphs, and determinantal point processes. However, not much is known about efficient parallel sampling of these structures. Our work is a step towards resolving this mystery.

Subject Classification

ACM Subject Classification
  • Theory of computation → Parallel algorithms
  • Theory of computation → Generating random combinatorial structures
  • Theory of computation → Random walks and Markov chains
  • parallel algorithms
  • arborescences
  • spanning trees
  • random sampling


  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    PDF Downloads


  1. T Aardenne-Ehrenfest and NG Bruijn. Circuits and trees in oriented linear graphs. Classic Papers in Combinatorics, pages 149-163, 1987. Google Scholar
  2. David J Aldous. The random walk construction of uniform spanning trees and uniform labelled trees. SIAM Journal on Discrete Mathematics, 3.4:450-465, 1990. Google Scholar
  3. Nima Anari, Kuikui Liu, Shayan Oveis Gharan, and Cynthia Vinzant. Log-concave polynomials iv: Exchange properties, tight mixing times, and faster sampling of spanning trees. arXiv preprint arXiv:2004.07220, 2020. Google Scholar
  4. Nikhil Balaji and Samir Datta. Tree-width and logspace: Determinants and counting euler tours. arXiv preprint, 2013. URL:
  5. Lucas Boczkowski, Yuval Peres, and Perla Sousi. Sensitivity of mixing times in eulerian digraphs. SIAM Journal on Discrete Mathematics, 32(1):624-655, 2018. Google Scholar
  6. Andrei Broder. Generating random spanning trees. In Foundations of Computer Science, 1989., 30th Annual Symposium on, pages 442-447. IEEE, 1989. Google Scholar
  7. Charles J Colbourn, Wendy J Myrvold, and Eugene Neufeld. Two algorithms for unranking arborescences. Journal of Algorithms, 20(2):268-281, 1996. Google Scholar
  8. Patrick John Creed. Counting and sampling problems on Eulerian graphs. PhD thesis, The University of Edinburgh, 2010. Google Scholar
  9. Laszlo Csanky. Fast parallel matrix inversion algorithms. In Foundations of Computer Science, 1975., 16th Annual Symposium on, pages 11-12. IEEE, 1975. Google Scholar
  10. 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, pages 329-338. IEEE, 2010. Google Scholar
  11. 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, pages 730-742, 2017. Google Scholar
  12. David Durfee, John Peebles, Richard Peng, and Anup B Rao. Determinant-preserving sparsification of sddm matrices with applications to counting and sampling spanning trees. In 2017 IEEE 58th Annual Symposium on Foundations of Computer Science (FOCS), pages 926-937. IEEE, 2017. Google Scholar
  13. Martin Dyer, Alan Frieze, and Ravi Kannan. A random polynomial-time algorithm for approximating the volume of convex bodies. Journal of the ACM (JACM), 38(1):1-17, 1991. Google Scholar
  14. Ira M Gessel and Xavier Viennot. Determinants, paths, and plane partitions. preprint, 132(197.15), 1989. Google Scholar
  15. Igor Gorodezky and Igor Pak. Generalized loop-erased random walks and approximate reachability. Random Structures & Algorithms, 44(2):201-223, 2014. Google Scholar
  16. Mark Jerrum and Alistair Sinclair. The markov chain monte carlo method: an approach to approximate counting and integration. Approximation algorithms for NP-hard problems, pages 482-520, 1996. Google Scholar
  17. Mark Jerrum, Alistair Sinclair, and Eric Vigoda. A polynomial-time approximation algorithm for the permanent of a matrix with nonnegative entries. Journal of the ACM (JACM), 51(4):671-697, 2004. Google Scholar
  18. Mark R Jerrum, Leslie G Valiant, and Vijay V Vazirani. Random generation of combinatorial structures from a uniform distribution. Theoretical computer science, 43:169-188, 1986. Google Scholar
  19. Minghui Jiang, James Anderson, Joel Gillespie, and Martin Mayne. ushuffle: a useful tool for shuffling biological sequences while preserving the k-let counts. BMC bioinformatics, 9(1):192, 2008. Google Scholar
  20. Pieter W Kasteleyn. Dimer statistics and phase transitions. Journal of Mathematical Physics, 4(2):287-293, 1963. Google Scholar
  21. 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, pages 13-21. IEEE, 2009. Google Scholar
  22. Gustav Kirchhoff. Ueber die auflösung der gleichungen, auf welche man bei der untersuchung der linearen vertheilung galvanischer ströme geführt wird. Annalen der Physik, 148(12):497-508, 1847. Google Scholar
  23. David A Levin and Yuval Peres. Markov chains and mixing times, volume 107. American Mathematical Soc., 2017. Google Scholar
  24. Bernt Lindström. On the vector representations of induced matroids. Bulletin of the London Mathematical Society, 5(1):85-90, 1973. Google Scholar
  25. Aleksander Mądry, Damian Straszak, and Jakub Tarnawski. Fast generation of random spanning trees and the effective resistance metric. In Proceedings of the twenty-sixth annual ACM-SIAM symposium on Discrete algorithms, pages 2019-2036. Society for Industrial and Applied Mathematics, 2015. Google Scholar
  26. Peter Matthews. Covering problems for brownian motion on spheres. The Annals of Probability, 16(1):189–199, 1988. URL:
  27. Romain Rivière, Dominique Barth, Johanne Cohen, and Alain Denise. Shuffling biological sequences with motif constraints. Journal of Discrete Algorithms, 6(2):192-204, 2008. Google Scholar
  28. Aaron Schild. An almost-linear time algorithm for uniform random spanning tree generation. In Proceedings of the 50th Annual ACM SIGACT Symposium on Theory of Computing, pages 214-227. ACM, 2018. Google Scholar
  29. Paul D Seymour. Decomposition of regular matroids. Journal of combinatorial theory, Series B, 28(3):305-359, 1980. Google Scholar
  30. Shang-Hua Teng. Independent sets versus perfect matchings. Theoretical Computer Science, 145(1-2):381-390, 1995. Google Scholar
  31. Shang-Hua Teng. Independent sets versus perfect matchings. Theoretical Computer Science, 145.1-2:381-390, 1995. Google Scholar
  32. Prasad Tetali and Santosh Vempala. Random sampling of euler tours. Algorithmica, 30(3):376-385, 2001. Google Scholar
  33. W. T. Tutte. The dissection of equilateral triangles into equilateral triangles. Mathematical Proceedings of the Cambridge Philosophical Society, 44(4):463–482, 1948. URL:
  34. WT Tutte and Cedric AB Smith. On unicursal paths in a network of degree 4. The American Mathematical Monthly, 48(4):233-237, 1941. Google Scholar
  35. 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, pages 296-303, 1996. Google Scholar