Title: Algebraic%20Structures%20and%20Algorithms%20for%20Matching%20and%20Matroid%20Problems
1Algebraic Structures and Algorithmsfor Matching
and Matroid Problems
2Perfect Matching
- Given graph G(V,E)
- Perfect matching is M?E such that each vertex
incident with exactlyone edge in M
3Matching History
Dense Graphs mn2
Edmonds 65 Blossom Alg. O(n2 m)
Micali-Vazirani 80-90 Blossoms Blocking Flow O(vn m)
Mucha-Sankowski 04 Fast Matrix Multiplication O(n?)
O(n4)
O(n2.5)
O(n2.38)
(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.
- All are non-trivial
- Mucha-Sankowski uses sophisticateddynamic
connectivity data structures (Holm et al. 01)to
maintain canonical partition (Cheriyan 97)
(?lt2.38 is exponent for matrix multiplication)
4Matching Algorithms
Dense Graphs mn2
Edmonds 65 Blossom Alg. O(n4)
Micali-Vazirani 80-90 Blossoms Blocking Flow O(n2.5)
Mucha-Sankowski 04 Fast Matrix Multiplication O(n2.38)
This Work Purely Algebraic,Clean Divide-and-Conquer,Fast Matrix Multiplication O(n2.38)
- Conceptually simple
- Implemented in 200 lines of MATLAB
Randomized, but Las Vegas via Cheriyan 97
5(Linear) Matroid Intersection
- Find largest set of columns S such thatAS and BS
are both linearly independent
AS
1 1 1 0 1 0 1 0
1 0 0 1 1 1 0 1
0 0 1 1 0 1 1 0
0 1 0 1 1 0 1 1
A
BS
7 6 6 3 7 1 9 0
9 2 9 2 4 9 6 1
3 3 4 7 0 4 3 3
1 4 8 4 2 2 5 3
B
6Matroid Intersection
- Find largest set of columns S such thatAS and BS
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
7Matroid Intersection History
Edmonds 65-70, Lawler 75 Augmenting Paths O(mn2) oracle
Cunningham 86 Blocking Flows O(mn2 log n)
Gabow-Xu 89-96 Blocking Flows Fast Matrix Mult. O(mn1.62)
(for matrices of size n x m)
8Matroid Intersection History
Edmonds 65-70, Lawler 75 Augmenting Paths O(mn2) oracle
Cunningham 86 Blocking Flows O(mn2 log n)
Gabow-Xu 89-96 Blocking Flows Fast Matrix Mult. O(mn1.62)
This paper Purely Algebraic,Fast Matrix Mult. O(mn?-1)
O(mn1.38)
- Essentially optimal
- Best known alg to compute rank takes O(mn?-1)
- Computing rank reduces to matroid intersection
Assumes matroids are linear
Randomized, and assumes matroids can be
represented over same field
9Generic 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
10Generic Matching Algorithm
Key step
- For each e ? E
- If e is contained in a perfect matching
- Add e to solution
- Delete endpoints of e
- Else
- Delete edge e
- How can we test this?
- Randomization and linear algebra play key role
11Matching 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)
12Matching Tutte Matrix
- Let G(V,E) be a graph
- Define variable xu,v ?u,v?E
- Define a skew-symmetric matrix T s.t.
xu,v
if u,v?E
Tu,v
0
otherwise
0 -xa,b -xa,c
xa,b 0 -xb,c
xa,c xb,c 0
a
c
b
13Properties of Tutte Matrix
- Lemma Tutte47 G has a perfect matchingiff T
is non-singular. - Lemma RV89 G V\u,v has a perfect
matching iff (T-1)u,v ? 0.
14Properties of Tutte Matrix
- Lemma Tutte47 G has a perfect matchingiff T
is non-singular. - Lemma RV89 G V\u,v has a perfect
matching iff (T-1)u,v ? 0.
u
(T-1)u,v ? 0
v
15Properties of Tutte Matrix
- Lemma Tutte47 G has a perfect matchingiff T
is non-singular. - Lemma RV89 G V\u,v has a perfect
matching iff (T-1)u,v ? 0.
G V\u,v has perfectmatching
(T-1)u,v ? 0
16Properties of Tutte Matrix
- Lemma Tutte47 G has a perfect matchingiff T
is non-singular. - Lemma RV89 G V\u,v has a perfect
matching iff (T-1)u,v ? 0.
G V\u,v has perfectmatching
(T-1)u,v ? 0
17Properties of Tutte Matrix
- Lemma Tutte47 G has a perfect matchingiff T
is non-singular. - Lemma RV89 G V\u,v has a perfect
matching iff (T-1)u,v ? 0.
u
G V\u,v has perfectmatching
(T-1)u,v ? 0
v
18Properties of Tutte Matrix
- Lemma Tutte47 G has a perfect matchingiff T
is non-singular. - Lemma RV89 G V\u,v has a perfect
matching iff (T-1)u,v ? 0. - Computing T-1 very slow Contains variables!
- Lemma Lovász79 These results hold w.h.p. if
we randomly choose values for xu,vs.
19Matching Algorithm
Rabin-Vazirani 89
- Compute T-1
- For each u,v ? E
- If T-1u,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 recomputeT-1 quickly in
each iteration?
20Matching 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)
21Rank-1 Updates
- Let T be a n x n matrix
- T uvT is called a rank-1 update of T
1 1 1 1
1 1 1
1 1
1
1
2
3
n
1 2 3 n
T
u
vT
22Rank-1 Updates
- Let T be a n x n matrix
- T uvT is called a rank-1 update of T
- Computing rank-1 update takes O(n2) time
1 1 1 1
1 1 1
1 1
1
1 2 3 n
2 4 6 2n
3 6 9 3n
n 2n 3n n2
T
uvT
23Rank-1 Updates
- Let T be a n x n matrix
- T uvT 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
24Rank-1 Updates
- Let T be a n x n matrix
- T uvT 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(n2) time
25Matching 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)
26RV Algorithm Rank-1 Updates
Mucha-Sankowski 04
- Compute T-1
- For each u,v ? E
- If T-1u,v ? 0
- Add u,v to matching
- Update T-1 (via rank-1 updates)
- Recurse on G V\u,v
- Total runtime O(n3) time
- Can updates use Fast Matrix Multiplication?
- Bipartite graphs Yes
- Non-bip. graphs Yes, but non-trivial
MS04
27RV Algorithm Rank-1 Updates
Mucha-Sankowski 04
- Compute T-1
- For each u,v ? E
- If T-1u,v ? 0
- Add u,v to matching
- Update T-1 (via rank-1 updates)
- Recurse on G V\u,v
- Total runtime O(n3) time
- Can updates use Fast Matrix Multiplication?
New approach An unusual recursion!
28Matching 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)
29New Recursive Approach
(Here c4 parts)
- Partition into c parts V1,,Vc
(arbitrarily) - For each pair of parts Va,Vb (arbitrary
order) - Recurse on GVa ? Vb
30New Recursive Approach
- Partition into c parts V1,,Vc
(arbitrarily) - For each pair of parts Va,Vb (arbitrary
order) - Recurse on GVa ? Vb
31New Recursive Approach
- Partition into c parts V1,,Vc
(arbitrarily) - For each pair of parts Va,Vb (arbitrary
order) - Recurse on GVa ? Vb
32New Recursive Approach
- Partition into c parts V1,,Vc
(arbitrarily) - For each pair of parts Va,Vb (arbitrary
order) - Recurse on GVa ? Vb
- Base case 2 vertices
33New Recursive Approach
- Partition into c parts V1,,Vc
(arbitrarily) - For each pair of parts Va,Vb (arbitrary
order) - Recurse on GVa ? Vb
- Base case 2 vertices u,v
- If T-1u,v ? 0, add u,v to matching, update T-1
34Recursion F.A.Q.
- Why not just recurse on G Va ?
- 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!
- Isnt this horribly slow?
- No well see recurrence next
- Partition into c parts V1,,Vc
(arbitrarily) - For each pair of parts Va,Vb (arbitrary
order) - Recurse on GVa ? Vb
- Base case 2 vertices u,v
- If T-1u,v ? 0, add u,v to matching, update T-1
35Final Matching Algorithm
- If base case with 2 vertices u,v
- If T-1u,v ? 0, add u,v to matching
- Else
- Partition into c parts V1,,Vc
- For each pair Va,Vb
- Recurse on GVa ? Vb
- Apply updates to current subproblem
s size of subproblem
36Final Matching Algorithm
- If base case with 2 vertices u,v
- If T-1u,v ? 0, add u,v to matching
- Else
- Partition into c parts V1,,Vc
- For each pair Va,Vb
- Recurse on GVa ? Vb
- Apply updates to current subproblem
s size of subproblem
37Final Matching Algorithm
- If base case with 2 vertices u,v
- If T-1u,v ? 0, add u,v to matching
- Else
- Partition into c parts V1,,Vc
- For each pair Va,Vb
- Recurse on GVa ? Vb
- Apply updates to current subproblem
Assume O(s?) time
s size of subproblem
38Time Analysis
- Basic Divide-and-Conquer
- If then
- Since ,just
choose c large enough!
c 13 is large enough if ? 2.38
39Handling Updates
T
40Handling Updates
u
v
u
v
u
u
v
v
T
T-1
41Handling Updates (Naively)
u
v
u
v
u
u
v
v
T
T-1
- Delete vertices u and v ? clear rows / columns
- Causes rank-1 updates to T-1
- Algorithm still takes ?(n3) time
42Matching 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)
43Just-in-time Updates
u
v
u
v
T-1
- Dont update entire matrix!
- Just update parent in recursion tree
- Updates outside of parent are postponed
44Postponed Updates
u
v
u
v
T-1
- Accumulate batches of updates
- Claim New updates can be applied with matrix
multiplication and inversion
45Final Matching Algorithm
- If base case with 2 vertices u,v
- If T-1u,v ? 0, add u,v to matching
- Else
- Partition into c parts V1,,Vc
- For each pair Va,Vb
- Recurse on GVa ? Vb
- Apply updates to current subproblem
Invariant Before / after child
subproblem,parents submatrix is completely
updated
? in every base case, T-1u,v is up-to-date!
46Graph G
children
Just apply postponed updates
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-1u,v is
up-to-date.
47Matching Summary
- Can compute a perfect matching inO(n?)
O(n2.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
48More Extensions
- Same philosophy applies to manymatching-like
problems - Design matrix capturing problem
- Design algorithm to test if element in OPT
- Design method to efficiently do updates
- Design algebraic structure capturing problem
49More Extensions
- Same philosophy applies to manymatching-like
problems - Design matrix capturing problem
- Design algebraic structure capturing problem
Bipartite Matroid Matching Basic
Path-Matching O(n?) algorithm
50Open Problems
- Fast, deterministic methods to choosevalues for
indeterminates? - Implications for Matching in NC
- Scaling algorithms for weighted problems?
- O(n2) algorithms for matching bycompletely
different techniques? - e.g., via Karger-Levine randomized max flow