Generating Random Spanning Trees via Fast Matrix Multiplication Keyulu Xu University of British Columbia Joint work with Nick Harvey TexPoint fonts used.

Slides:



Advertisements
Similar presentations
Generating Random Spanning Trees Sourav Chatterji Sumit Gulwani EECS Department University of California, Berkeley.
Advertisements

The Cover Time of Random Walks Uriel Feige Weizmann Institute.
Great Theoretical Ideas in Computer Science
Matroid Bases and Matrix Concentration
Backtrack Algorithm for Listing Spanning Trees R. C. Read and R. E. Tarjan (1975) Presented by Levit Vadim.
C&O 355 Mathematical Programming Fall 2010 Lecture 22 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A A.
Great Theoretical Ideas in Computer Science for Some.
The Combinatorial Multigrid Solver Yiannis Koutis, Gary Miller Carnegie Mellon University TexPoint fonts used in EMF. Read the TexPoint manual before you.
Minimum Spanning Trees Definition Two properties of MST’s Prim and Kruskal’s Algorithm –Proofs of correctness Boruvka’s algorithm Verifying an MST Randomized.
C&O 355 Mathematical Programming Fall 2010 Lecture 21 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AA A.
Combinatorial Algorithms
1 Maximum matching in graphs with an excluded minor Raphael Yuster University of Haifa Uri Zwick Tel Aviv University TexPoint fonts used in EMF. Read the.
Great Theoretical Ideas in Computer Science.
Graph Sparsifiers by Edge-Connectivity and Random Spanning Trees Nick Harvey U. Waterloo Department of Combinatorics and Optimization Joint work with Isaac.
Graph Sparsifiers by Edge-Connectivity and Random Spanning Trees Nick Harvey University of Waterloo Department of Combinatorics and Optimization Joint.
Graph Sparsifiers by Edge-Connectivity and Random Spanning Trees Nick Harvey U. Waterloo C&O Joint work with Isaac Fung TexPoint fonts used in EMF. Read.
Approximation Algorithms: Combinatorial Approaches Lecture 13: March 2.
Randomized Algorithms and Randomized Rounding Lecture 21: April 13 G n 2 leaves
What is the next line of the proof? a). Let G be a graph with k vertices. b). Assume the theorem holds for all graphs with k+1 vertices. c). Let G be a.
Great Theoretical Ideas in Computer Science.
DAST 2005 Tirgul 11 (and more) sample questions. DAST 2005 Q.Let G = (V,E) be an undirected, connected graph with an edge weight function w : E→R. Let.
Greedy Algorithms Reading Material: Chapter 8 (Except Section 8.5)
Is the following graph Hamiltonian- connected from vertex v? a). Yes b). No c). I have absolutely no idea v.
CSE 421 Algorithms Richard Anderson Lecture 4. What does it mean for an algorithm to be efficient?
Algebraic Structures and Algorithms for Matching and Matroid Problems Nick Harvey.
Greedy Algorithms Like dynamic programming algorithms, greedy algorithms are usually designed to solve optimization problems Unlike dynamic programming.
Randomness in Computation and Communication Part 1: Randomized algorithms Lap Chi Lau CSE CUHK.
Approximation Algorithms: Bristol Summer School 2008 Seffi Naor Computer Science Dept. Technion Haifa, Israel TexPoint fonts used in EMF. Read the TexPoint.
ECE 250 Algorithms and Data Structures Douglas Wilhelm Harder, M.Math. LEL Department of Electrical and Computer Engineering University of Waterloo Waterloo,
cover times, blanket times, and majorizing measures Jian Ding U. C. Berkeley James R. Lee University of Washington Yuval Peres Microsoft Research TexPoint.
Approximating the MST Weight in Sublinear Time Bernard Chazelle (Princeton) Ronitt Rubinfeld (NEC) Luca Trevisan (U.C. Berkeley)
Nirmalya Roy School of Electrical Engineering and Computer Science Washington State University Cpt S 223 – Advanced Data Structures Graph Algorithms: Minimum.
Theory of Computing Lecture 10 MAS 714 Hartmut Klauck.
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
Graph Sparsifiers Nick Harvey University of British Columbia Based on joint work with Isaac Fung, and independent work of Ramesh Hariharan & Debmalya Panigrahi.
The Best Algorithms are Randomized Algorithms N. Harvey C&O Dept TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A AAAA.
C&O 750 Randomized Algorithms Winter 2011 Lecture 24 Nicholas Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.:
C&O 355 Mathematical Programming Fall 2010 Lecture 19 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AA A.
Graph Theory Topics to be covered:
Approximating Minimum Bounded Degree Spanning Tree (MBDST) Mohit Singh and Lap Chi Lau “Approximating Minimum Bounded DegreeApproximating Minimum Bounded.
Graph Sparsifiers Nick Harvey Joint work with Isaac Fung TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A A.
DATA MINING LECTURE 13 Pagerank, Absorbing Random Walks Coverage Problems.
Spectrally Thin Trees Nick Harvey University of British Columbia Joint work with Neil Olver (MIT  Vrije Universiteit) TexPoint fonts used in EMF. Read.
Graphs. Definitions A graph is two sets. A graph is two sets. –A set of nodes or vertices V –A set of edges E Edges connect nodes. Edges connect nodes.
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
C&O 355 Mathematical Programming Fall 2010 Lecture 16 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A A.
Approximation Algorithms for TSP Tsvi Kopelowitz 1.
C&O 355 Lecture 24 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AA A A A A A A A A.
Union By Rank Ackermann’s Function Graph Algorithms Rajee S Ramanikanthan Kavya Reddy Musani.
An algorithmic proof of the Lovasz Local Lemma via resampling oracles Jan Vondrak IBM Almaden TexPoint fonts used in EMF. Read the TexPoint manual before.
Great Theoretical Ideas in Computer Science for Some.
The Best Algorithms are Randomized Algorithms
Introduction to Algorithms
Approximating the MST Weight in Sublinear Time
CS4234 Optimiz(s)ation Algorithms
EECS 203 Lecture 20 More Graphs.
Great Theoretical Ideas in Computer Science
Algorithms and Complexity
Density Independent Algorithms for Sparsifying
Approximation Algorithms for TSP
CS200: Algorithm Analysis
Connected Components Minimum Spanning Tree
Chapter 23 Minimum Spanning Tree
CS 583 Analysis of Algorithms
Chapter 11 Graphs.
Minimum Spanning Tree Algorithms
Shortest Paths and Minimum Spanning Trees
Weighted Graphs & Shortest Paths
On Solving Linear Systems in Sublinear Time
Presentation transcript:

Generating Random Spanning Trees via Fast Matrix Multiplication Keyulu Xu University of British Columbia Joint work with Nick Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAA

What are random spanning trees? Goal: Output a uniformly random spanning tree More precisely: T(G) = set of all spanning trees of graph G Output a spanning tree T’ such that T’ is equal to any of the trees in T(G) with prob. 1/|T(G)| Note: |T(G)| can be exponentially large

Why random spanning trees? Fundamental probabilistic object [K’1847] Connections to trending topics in theoretical computer science: spectral graph theory, electrical network flows, and graph structures Many applications in theoretical computer science, computer networks, statistical physics Recreation! (Generating random maze puzzles)

Why random spanning trees? Applications in theoretical computer science Estimating the coefficients of the reliability polynomial [CDM’88] Generating expander graphs [GRV’09] Traveling salesman problem [AGMO’10] [OSS’11] Submodular optimization [CVZ’10]

How to generate RST? Laplacian-based algorithms [CMN’96] Matrix Tree theorem [Kirchoff 1847] Pr[e in RST] = Reff(e) For each edge e: – Compute Reff(e) and add e to T with prob Reff(e) – Update G by contracting e if e is in T and delete e o.w. Running time O(n ω )

How to generate RST? Random walks [Border’89, Aldous’90 ] Start a random walk at some vertex s Whenever visiting a new vertex v, add to T the edge through which we reached v Running time = O(cover time) = O(mn) Can get O(mean hitting time) but still O(mn) in the worst case [Wilson’96]

How to generate RST? Approximate algorithms [KM’09, MST’15] Nearly-linear time approximate Laplacian system solvers Accelerate the random graph algorithms by identifying regions where the random walk will be slow Most efficient on sparse graphs

Our work A new Laplacian-based algorithm for generating random spanning trees with running time O(n ω ) Advantages: Conceptually simpler and cleaner No need to introduce directed graphs Uses fast matrix multiplication as a black box, thus avoiding the intricate details of LU-decomposition Uses a simple recursion framework that could be applied to many graph algorithms

Main idea Pr[e in RST] = Reff(e) For e = {u, v}, Reff(e) = X u T L + X v X is the characteristic function L is the Laplacian matrix of the graph G L = D - A

Main idea Pr[e in RST] = Reff(e) For e = {u, v}, Reff(e) = X u T L + X v For each edge e: – Compute Reff(e) and add e to T with prob Reff(e) – Update L + by contracting e if e is in T and delete e o.w Faster way to update L + ? Lazy updates Visit the edges in a specific order Recursion!

Main idea For e = {u, v}, Reff(e) = X u T L + X v Observation: Reff(e) only depends on 4 entries of L +  lazy updates! Need formula for updating L + whenever we contract or delete edges Sherman-Morrison-Woodbury formula for inverse updates Sherman-Morrison-like formula for Laplacian pseudo-inverse

Pseudo-inverse update formulas Theorem 1 (Update formula for deletion) Let G = (V, E) be a connected, undirected graph and D ⊆ E. If G ∖ D contains at least one spanning tee, then (L – L D ) + = L + - L + (L D L + - I) -1 L D L + Update running time O(|V| ω ), can we do better? No need to update/clean up the entire matrix

Pseudo-inverse update formulas Corollary 1 (Improved update formula) Let G = (V, E) be a connected, undirected graph and S ⊆ V. Define E[S] as the set of edges whose vertices are in S. Suppose D ⊆ E[S] and G ∖ D contains at least one spanning tee, then (L – L D ) + S,S = L + S,S - L + S,S (L D_S,S L + S,S - I) -1 L D_S,S L + S,S Runtime of each update is O(|S| ω )!

Pseudo-inverse update formulas Contract edges while avoiding the cumbersome updates to the Laplacian that result from decreasing the number of vertices Our approach: increase the weight of the edge to a large value k. This is equivalent to contracting the edge in the limit as k→∞. Can obtain similar update formula for contraction! Note: The object of interest to us is L + and L + does have a finite limit as k→∞.

Recursive algorithm Our pseudo-inverse update formulas indicate that if we have only made sampling decisions for edges in a submatrix, then we can update the submatrix of L + with a small cost, using values from that submatrix. Recursively sample edges in submatrices! Apply update formulas to clean up the matrix

Recursive Decomposition of Graph Define: E[S] = { {u,v} : u,v ∈ S and {u,v} ∈ E } “within” E[S 1,S 2 ] = { {u,v} : u ∈ S 1, v ∈ S 2, and {u,v} ∈ E } “crossing” Claim: Let S=S 1 ⋃ S 2. Then E[S] = E[S 1 ] ⋃ E[S 2 ] ⋃ E[S 1,S 2 ] E[S] S1S1 S2S2 E[S 1 ] E[S 2 ] E[S 1,S 2 ]

Recursive Decomposition of Graph Define: E[S] = { {u,v} : u,v ∈ S and {u,v} ∈ E } “within” E[R,S] = { {u,v} : u ∈ R, v ∈ S, and {u,v} ∈ E } “crossing” Claim: Let R=R 1 ⋃ R 2 and S=S 1 ⋃ S 2. Then E[R,S] = E[R 1,S 1 ] ⋃ E[R 1,S 2 ] ⋃ E[R 2,S 1 ] ⋃ E[R 2,S 2 ] RS

Recursive Decomposition of Graph Define: E[S] = { {u,v} : u,v ∈ S and {u,v} ∈ E } “within” E[R,S] = { {u,v} : u ∈ R, v ∈ S, and {u,v} ∈ E } “crossing” Claim: Let R=R 1 ⋃ R 2 and S=S 1 ⋃ S 2. Then E[R,S] = E[R 1,S 1 ] ⋃ E[R 1,S 2 ] ⋃ E[R 2,S 1 ] ⋃ E[R 2,S 2 ] RS R1R1 S2S2 R2R2 S1S1

SampleWithin(S) If |S|=1 then Return Partition S=S 1 ⋃ S 2 For i ∈ {1,2} SampleWithin(S i ) Update N S,S SampleCrossing(S 1,S 2 ) GeneratingRST( G=(V,E) ) Construct L and N=L + SampleWithin(V) SampleCrossing(R,S) If |R|=|S|=1 Try to sample R-S edge; Return Partition R=R 1 ⋃ R 2 and S=S 1 ⋃ S 2 For i ∈ {1,2} and j ∈ {1,2} SampleCrossing(R i,S j ) Update N R,S V S1S1 S2S2 E[S 1 ] E[S 2 ] E[S 1,S 2 ] SampleWithin(S 1 ) SampleWithin(S 2 ) SampleCrossing(S 1,S 2 ) Recursively sample edges

SampleWithin(S) If |S|=1 then Return Partition S=S 1 ⋃ S 2 For i ∈ {1,2} SampleWithin(S i ) Update N S,S SampleCrossing(S 1,S 2 ) SampleCrossing(R,S) If |R|=|S|=1 Try to sample R-S edge; Return Partition R=R 1 ⋃ R 2 and S=S 1 ⋃ S 2 For i ∈ {1,2} and j ∈ {1,2} SampleCrossing(R i,S j ) Update N R,S S1S1 S2S2 SampleWithin(S 1 ) SampleWithin(S 2 ) SampleCrossing(S 1,S 2 ) GeneratingRST( G=(V,E) ) Construct L and N=L + SampleWithin(V) Recursively sample edges

SampleWithin(S) If |S|=1 then Return Partition S=S 1 ⋃ S 2 For i ∈ {1,2} SampleWithin(S i ) Update N S,S SampleCrossing(S 1,S 2 ) SampleCrossing(R,S) If |R|=|S|=1 Try to sample R-S edge; Return Partition R=R 1 ⋃ R 2 and S=S 1 ⋃ S 2 For i ∈ {1,2} and j ∈ {1,2} SampleCrossing(R i,S j ) Update N R,S SampleWithin(S 1 ) SampleWithin(S 2 ) SampleCrossing(S 1,S 2 ) S1S1 S2S2 GeneratingRST( G=(V,E) ) Construct L and N=L + SampleWithin(V) Recursively sample edges

SampleWithin(S) If |S|=1 then Return Partition S=S 1 ⋃ S 2 For i ∈ {1,2} SampleWithin(S i ) Update N S,S SampleCrossing(S 1,S 2 ) SampleCrossing(R,S) If |R|=|S|=1 Try to delete R-S edge; Return Partition R=R 1 ⋃ R 2 and S=S 1 ⋃ S 2 For i ∈ {1,2} and j ∈ {1,2} SampleCrossing(R i,S j ) Update N R,S SampleWithin(S 1 ) SampleWithin(S 2 ) SampleCrossing(S 1,S 2 ) S1S1 S2S2 Try to sample R-S edge; Return GeneratingRST( G=(V,E) ) Construct L and N=L + SampleWithin(V) Recursively sample edges

Runtime Analysis g(n) = 4∙g(n/2) + O(n  )f(n) = 2∙f(n/2)+g(n)+O(n  )  g(n) = O(n  )  f(n) = O(n  ) SampleWithin(S) If |S|=1 then Return Partition S=S 1 ⋃ S 2 For i ∈ {1,2} SampleWithin(S i ) Update N S,S SampleCrossing(S 1,S 2 ) SampleCrossing(R,S) If |R|=|S|=1 Try to sample R-S edge; Return Partition R=R 1 ⋃ R 2 and S=S 1 ⋃ S 2 For i ∈ {1,2} and j ∈ {1,2} SampleCrossing(R i,S j ) Update N R,S By Sherman-Morrison-Woodbury Formula, can do each update in O(n  ) time Runtime: f(n), where n=|S|Runtime: g(n), where n=|R|=|S| Total runtime of algorithm is O(n  ) time

Conclusion Generating random spanning trees is a fundamental and important problem in TCS We provided a simpler algorithm that also achieves O(n ω ) Open questions: Bridging the generation of random spanning trees for dense and sparse graphs?