Algebraic Structures and Algorithms for Matching and Matroid Problems Nick Harvey.

Slides:



Advertisements
Similar presentations
Great Theoretical Ideas in Computer Science
Advertisements

C&O 355 Lecture 23 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A A A A A A A A A.
Dynamic Graph Algorithms - I
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.
Totally Unimodular Matrices
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 20 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AA A.
Lecture 17 Path Algebra Matrix multiplication of adjacency matrices of directed graphs give important information about the graphs. Manipulating these.
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.
Matrix sparsification (for rank and determinant computations) Raphael Yuster University of Haifa.
Lectures on Network Flows
CSL758 Instructors: Naveen Garg Kavitha Telikepalli Scribe: Manish Singh Vaibhav Rastogi February 7 & 11, 2008.
Great Theoretical Ideas in Computer Science.
I/O-Efficient Batched Union-Find and Its Applications to Terrain Analysis Pankaj K. Agarwal, Lars Arge, Ke Yi Duke University University of Aarhus.
1 Discrete Structures & Algorithms Graphs and Trees: II EECE 320.
Introduction to Approximation Algorithms Lecture 12: Mar 1.
Totally Unimodular Matrices Lecture 11: Feb 23 Simplex Algorithm Elliposid Algorithm.
The Complexity of Matrix Completion Nick Harvey David Karger Sergey Yekhanin.
Haplotyping via Perfect Phylogeny Conceptual Framework and Efficient (almost linear-time) Solutions Dan Gusfield U.C. Davis RECOMB 02, April 2002.
Greedy Algorithms Reading Material: Chapter 8 (Except Section 8.5)
Deterministic Network Coding by Matrix Completion Nick Harvey David Karger Kazuo Murota.
An Algebraic Algorithm for Weighted Linear Matroid Intersection
Greedy Algorithms Like dynamic programming algorithms, greedy algorithms are usually designed to solve optimization problems Unlike dynamic programming.
Query Lower Bounds for Matroids via Group Representations Nick Harvey.
Randomness in Computation and Communication Part 1: Randomized algorithms Lap Chi Lau CSE CUHK.
Packing Element-Disjoint Steiner Trees Mohammad R. Salavatipour Department of Computing Science University of Alberta Joint with Joseph Cheriyan Department.
C&O 355 Mathematical Programming Fall 2010 Lecture 17 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AA A.
C&O 355 Lecture 2 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A.
Minimal Spanning Trees What is a minimal spanning tree (MST) and how to find one.
1 A fast algorithm for Maximum Subset Matching Noga Alon & Raphael Yuster.
A Fast Algorithm for Enumerating Bipartite Perfect Matchings Takeaki Uno (National Institute of Informatics, JAPAN)
Simple and Improved Parameterized Algorithms for Multiterminal Cuts Mingyu Xiao The Chinese University of Hong Kong Hong Kong SAR, CHINA CSR 2008 Presentation,
Graph Sparsifiers Nick Harvey University of British Columbia Based on joint work with Isaac Fung, and independent work of Ramesh Hariharan & Debmalya Panigrahi.
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.:
Approximating Minimum Bounded Degree Spanning Tree (MBDST) Mohit Singh and Lap Chi Lau “Approximating Minimum Bounded DegreeApproximating Minimum Bounded.
Theory of Computing Lecture 13 MAS 714 Hartmut Klauck.
Edge-disjoint induced subgraphs with given minimum degree Raphael Yuster 2012.
Batch Scheduling of Conflicting Jobs Hadas Shachnai The Technion Based on joint papers with L. Epstein, M. M. Halldórsson and A. Levin.
Greedy Algorithms and Matroids Andreas Klappenecker.
3.2 Matchings and Factors: Algorithms and Applications This copyrighted material is taken from Introduction to Graph Theory, 2 nd Ed., by Doug West; and.
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
Billy Timlen Mentor: Imran Saleemi.  Goal: Have an optimal matching  Given: List of key-points in each image/frame, Matrix of weights between nodes.
Speeding Up Enumeration Algorithms with Amortized Analysis Takeaki Uno (National Institute of Informatics, JAPAN)
Generating a d-dimensional linear subspace efficiently Raphael Yuster SODA’10.
Computer Sciences Department1.  Property 1: each node can have up to two successor nodes (children)  The predecessor node of a node is called its.
10/11/10 A. Smith; based on slides by E. Demaine, C. Leiserson, S. Raskhodnikova, K. Wayne Adam Smith Algorithm Design and Analysis L ECTURE 21 Network.
Exponential random graphs and dynamic graph algorithms David Eppstein Comp. Sci. Dept., UC Irvine.
Happy 80th B’day Dick.
Introduction to Graph Theory By: Arun Kumar (Asst. Professor) (Asst. Professor)
C&O 355 Lecture 19 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A A A A A A A A A.
1 Chapter 7 Network Flow Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
Generating Random Spanning Trees via Fast Matrix Multiplication Keyulu Xu University of British Columbia Joint work with Nick Harvey TexPoint fonts used.
Proof of correctness of Dijkstra’s algorithm: Basically, we need to prove two claims. (1)Let S be the set of vertices for which the shortest path from.
TU/e Algorithms (2IL15) – Lecture 8 1 MAXIMUM FLOW (part II)
Lap Chi Lau we will only use slides 4 to 19
Hans Bodlaender, Marek Cygan and Stefan Kratsch
Topics in Algorithms Lap Chi Lau.
Maximum Matching in the Online Batch-Arrival Model
Lectures on Network Flows
Chapter 5. Optimal Matchings
CIS 700: “algorithms for Big Data”
Hiroshi Hirai University of Tokyo
Analysis of Algorithms
CSCI B609: “Foundations of Data Science”
Problem Solving 4.
Algorithms (2IL15) – Lecture 7
Lecture 14 Shortest Path (cont’d) Minimum Spanning Tree
Major Design Strategies
Lecture 13 Shortest Path (cont’d) Minimum Spanning Tree
Presentation transcript:

Algebraic Structures and Algorithms for Matching and Matroid Problems Nick Harvey

Perfect Matching Given graph G=(V,E) Perfect matching is M ⊆ E such that each vertex incident with exactly one edge in M

Edmonds ’65 Blossom Alg. O(n 2 m) Micali-Vazirani ’80-’90 Blossoms + “Blocking Flow” O( √ n m) Mucha-Sankowski ’04 Fast Matrix Multiplication O(n  ) Matching History All are non-trivial Mucha-Sankowski uses sophisticated dynamic connectivity data structures (Holm et al. ’01) to maintain “canonical partition” (Cheriyan ’97) O(n 4 ) O(n 2.5 ) (n = # vertices, m = # edges) All are non-trivial! Mucha ’05: “[Our] algorithm is quite complicated and heavily relies on graph theoretic results and techniques. It would be nice to have a strictly algebraic, and possibly simpler, matching algorithm”. O(n 2.38 ) (  <2.38 is exponent for matrix multiplication) Dense Graphs m=n 2

Edmonds ’65 Blossom Alg. O(n 4 ) Micali-Vazirani ’80-’90 Blossoms + “Blocking Flow” O(n 2.5 ) Mucha-Sankowski ’04 Fast Matrix Multiplication O(n 2.38 ) This Work Purely Algebraic, Clean Divide-and-Conquer, Fast Matrix Multiplication O(n 2.38 ) Matching Algorithms Conceptually simple Implemented in ~200 lines of MATLAB * * Randomized, but Las Vegas via [Cheriyan ’97] * Dense Graphs m=n 2

(Linear) Matroid Intersection Find largest set of columns S such that A S and B S are both linearly independent A = B = ASAS BSBS

Matroid Intersection Find largest set of columns S such that A S and B S are both linearly independent Why? Many problems are a special case: –Bipartite matching –Arboresence (directed spanning tree), … Powerful tool: –Bounded-Degree Sp. Tree [Goemans ’06]

Edmonds ’65-’70, Lawler ’75 Augmenting Paths O(mn 2 ) oracle Cunningham ’86 “Blocking Flows” O(mn 2 log n) Gabow-Xu ’89-’96 “Blocking Flows” & Fast Matrix Mult. O(mn 1.62 ) Matroid Intersection History (for matrices of size n x m)

Essentially optimal: –Best known alg to compute rank takes O(mn  -1 ) –Computing rank reduces to matroid intersection Edmonds ’65-’70, Lawler ’75 Augmenting Paths O(mn 2 ) oracle Cunningham ’86 “Blocking Flows” O(mn 2 log n) Gabow-Xu ’89-’96 “Blocking Flows” & Fast Matrix Mult. O(mn 1.62 ) This paper Purely Algebraic, Fast Matrix Mult. O(mn  -1 ) Matroid Intersection History * * * * Assumes matroids are linear † † Randomized, and assumes matroids can be represented over same field O(mn 1.38 )

Generic Matching Algorithm For each e  E If e is contained in a perfect matching Add e to solution Delete endpoints of e Else Delete edge e

Generic Matching Algorithm How can we test this? Randomization and linear algebra play key role For each e  E If e is contained in a perfect matching Add e to solution Delete endpoints of e Else Delete edge e

Matching Outline Implementing Generic Algorithm –Tutte Matrix & Properties –Rabin-Vazirani Algorithm –Rank-1 Updates –Rabin-Vazirani with Rank-1 Updates –Our Recursive Algorithm (overview) –Our Recursive Algorithm (fast updates)

Matching & Tutte Matrix Let G=(V,E) be a graph Define variable x {u,v}  {u,v} ∈ E Define a skew-symmetric matrix T s.t. T u,v = ± x {u,v} 0 cb a 0-x {a,b} -x {a,c} x {a,b} 0-x {b,c} x {a,c} x {b,c} 0 if {u,v} ∈ E otherwise

Properties of Tutte Matrix Lemma [Tutte’47]: G has a perfect matching iff T is non-singular. Lemma [RV’89]: G[ V\{u,v} ] has a perfect matching iff (T -1 ) u,v  0.

Properties of Tutte Matrix Lemma [Tutte’47]: G has a perfect matching iff T is non-singular. Lemma [RV’89]: G[ V\{u,v} ] has a perfect matching iff (T -1 ) u,v  0. v u (T -1 ) u,v  0

Properties of Tutte Matrix Lemma [Tutte’47]: G has a perfect matching iff T is non-singular. Lemma [RV’89]: G[ V\{u,v} ] has a perfect matching iff (T -1 ) u,v  0. (T -1 ) u,v  0 G[ V\{u,v} ] has perfect matching

Properties of Tutte Matrix Lemma [Tutte’47]: G has a perfect matching iff T is non-singular. Lemma [RV’89]: G[ V\{u,v} ] has a perfect matching iff (T -1 ) u,v  0. (T -1 ) u,v  0 G[ V\{u,v} ] has perfect matching

Properties of Tutte Matrix Lemma [Tutte’47]: G has a perfect matching iff T is non-singular. Lemma [RV’89]: G[ V\{u,v} ] has a perfect matching iff (T -1 ) u,v  0. (T -1 ) u,v  0 G[ V\{u,v} ] has perfect matching v u

Properties of Tutte Matrix Lemma [Tutte’47]: G has a perfect matching iff T is non-singular. Lemma [RV’89]: G[ V\{u,v} ] has a perfect matching iff (T -1 ) u,v  0. Computing T -1 very slow: Contains variables! Lemma [Lovász’79]: These results hold w.h.p. if we randomly choose values for x {u,v} ’s.

Matching Algorithm Compute T -1 For each {u,v}  E If T -1 u,v  0 Add {u,v} to matching Recurse on G[ V\{u,v} ] (Takes O(n  ) time) Total time: O(n  +1 ) time Natural question: Can we recompute T -1 quickly in each iteration? Rabin-Vazirani ’89

Matching Outline –Tutte Matrix & Properties –Rabin-Vazirani Algorithm –Rank-1 Updates –Rabin-Vazirani with Rank-1 Updates –Our Recursive Algorithm (overview) –Our Recursive Algorithm (fast updates)

Rank-1 Updates Let T be a n x n matrix T + uv T is called a rank-1 update of T n n ∙ + TuvTvT

123n 2462n 3693n n2n3nn2n2 Let T be a n x n matrix T + uv T is called a rank-1 update of T Computing rank-1 update takes O(n 2 ) time Rank-1 Updates Tuv T

Rank-1 Updates Let T be a n x n matrix T + uv T is called a rank-1 update of T Claim: If you modify one entry of T, then T -1 is modified by a rank-1 update. T =T -1 =

Rank-1 Updates Let T be a n x n matrix T + uv T is called a rank-1 update of T Claim: If you modify one entry of T, then T -1 is modified by a rank-1 update. Claim: If you delete O(1) rows and columns of T then T -1 is affected by O(1) rank-1 updates.  T -1 can be updated in O(n 2 ) time

Matching Outline –Tutte Matrix & Properties –Rabin-Vazirani Algorithm –Rank-1 Updates –Rabin-Vazirani with Rank-1 Updates –Our Recursive Algorithm (overview) –Our Recursive Algorithm (fast updates)

RV Algorithm + Rank-1 Updates Compute T -1 For each {u,v}  E If T -1 u,v  0 Add {u,v} to matching Update T -1 (via rank-1 updates) Recurse on G[ V\{u,v} ] Total runtime: O(n 3 ) time Can updates use Fast Matrix Multiplication? –Bipartite graphs: Yes –Non-bip. graphs: Yes, but non-trivial Mucha-Sankowski ’04 [MS’04]

RV Algorithm + Rank-1 Updates Compute T -1 For each {u,v}  E If T -1 u,v  0 Add {u,v} to matching Update T -1 (via rank-1 updates) Recurse on G[ V\{u,v} ] Total runtime: O(n 3 ) time Can updates use Fast Matrix Multiplication? Mucha-Sankowski ’04 New approach: An unusual recursion!

Matching Outline –Tutte Matrix & Properties –Rabin-Vazirani Algorithm –Rank-1 Updates –Rabin-Vazirani with Rank-1 Updates –Our Recursive Algorithm (overview) –Our Recursive Algorithm (fast updates)

New Recursive Approach (Here c=4 parts) Partition into c parts {V 1,…,V c } (arbitrarily) For each pair of parts {V a,V b } (arbitrary order) –Recurse on G[V a ⋃ V b ]

New Recursive Approach Partition into c parts {V 1,…,V c } (arbitrarily) For each pair of parts {V a,V b } (arbitrary order) –Recurse on G[V a ⋃ V b ]

New Recursive Approach Partition into c parts {V 1,…,V c } (arbitrarily) For each pair of parts {V a,V b } (arbitrary order) –Recurse on G[V a ⋃ V b ]

New Recursive Approach Partition into c parts {V 1,…,V c } (arbitrarily) For each pair of parts {V a,V b } (arbitrary order) –Recurse on G[V a ⋃ V b ] Base case: 2 vertices

New Recursive Approach Partition into c parts {V 1,…,V c } (arbitrarily) For each pair of parts {V a,V b } (arbitrary order) –Recurse on G[V a ⋃ V b ] Base case: 2 vertices {u,v} –If T -1 u,v  0, add {u,v} to matching, update T -1

Recursion F.A.Q. Why not just recurse on G[ V a ]? –Edges between parts would be missed –Claim: Our recursion examines every pair of vertices  examines every edge Why does algorithm work? –It implements Rabin-Vazirani Algorithm! Isn’t this horribly slow? –No: we’ll see recurrence next Partition into c parts {V 1,…,V c } (arbitrarily) For each pair of parts {V a,V b } (arbitrary order) –Recurse on G[V a ⋃ V b ] Base case: 2 vertices {u,v} –If T -1 u,v  0, add {u,v} to matching, update T -1

Final Matching Algorithm If base case with 2 vertices {u,v} If T -1 u,v  0, add {u,v} to matching Else Partition into c parts {V 1,…,V c } For each pair {V a,V b } Recurse on G[V a ⋃ V b ] Apply updates to current subproblem s = size of subproblem

Final Matching Algorithm If base case with 2 vertices {u,v} If T -1 u,v  0, add {u,v} to matching Else Partition into c parts {V 1,…,V c } For each pair {V a,V b } Recurse on G[V a ⋃ V b ] Apply updates to current subproblem s = size of subproblem

Final Matching Algorithm If base case with 2 vertices {u,v} If T -1 u,v  0, add {u,v} to matching Else Partition into c parts {V 1,…,V c } For each pair {V a,V b } Recurse on G[V a ⋃ V b ] Apply updates to current subproblem Assume: O(s  ) time s = size of subproblem

Basic Divide-and-Conquer –If then Since, just choose c large enough! Time Analysis c = 13 is large enough if  = 2.38

Handling Updates T =

Handling Updates T =T -1 = Delete vertices u and v u v u v u v u v

Handling Updates (Naively) T =T -1 = Delete vertices u and v  clear rows / columns Causes rank-1 updates to T -1 Algorithm still takes  (n 3 ) time u v u v u v u v

Matching Outline –Tutte Matrix & Properties –Rabin-Vazirani Algorithm –Rank-1 Updates –Rabin-Vazirani with Rank-1 Updates –Our Recursive Algorithm (overview) –Our Recursive Algorithm (fast updates)

Just-in-time Updates T -1 = Don’t update entire matrix! Just update parent in recursion tree Updates outside of parent are postponed u v u v

Postponed Updates T -1 = Accumulate batches of updates Claim: New updates can be applied with matrix multiplication and inversion u v u v

Final Matching Algorithm If base case with 2 vertices {u,v} If T -1 u,v  0, add {u,v} to matching Else Partition into c parts {V 1,…,V c } For each pair {V a,V b } Recurse on G[V a ⋃ V b ] Apply updates to current subproblem Invariant: Before / after child subproblem, parent’s submatrix is completely updated  in every base case, T -1 u,v is up-to-date!

Graph G children All edges chosen in base cases Only take edges that can be extended to a perfect matching in the whole graph. This decision is possible because invariant ensures that T -1 u,v is up-to-date. Just apply postponed updates

Matching Summary Can compute a perfect matching in O(n  ) = O(n 2.38 ) time Algorithm uses only simple randomization, linear algebra and divide-and-conquer Easy to implement Extensions for: (by existing techniques) –maximum matchings –Las Vegas

More Extensions Same philosophy applies to many matching-like problems –Design matrix capturing problem –Design algorithm to test if element in OPT –Design method to efficiently do updates x3x3 x4x4 x5x5 x6x6 x7x7 x8x8 A BTBT J J Matroid Intersection O(mn  -1 ) algorithm – Design “algebraic structure” capturing problem

More Extensions Same philosophy applies to many matching-like problems –Design matrix capturing problem Bipartite Matroid Matching & Basic Path-Matching O(n  ) algorithm – Design “algebraic structure” capturing problem

Open Problems Fast, deterministic methods to choose values for indeterminates? –Implications for Matching in NC Scaling algorithms for weighted problems? O(n 2 ) algorithms for matching by completely different techniques? –e.g., via Karger-Levine randomized max flow