algebraic structures and algorithms for matching and matroid problems l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Algebraic Structures and Algorithms for Matching and Matroid Problems PowerPoint Presentation
Download Presentation
Algebraic Structures and Algorithms for Matching and Matroid Problems

Loading in 2 Seconds...

play fullscreen
1 / 50

Algebraic Structures and Algorithms for Matching and Matroid Problems - PowerPoint PPT Presentation


  • 262 Views
  • Uploaded on

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. Matching History. Dense Graphs m=n 2. O(n 4 ) . All are non-trivial

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Algebraic Structures and Algorithms for Matching and Matroid Problems' - paul2


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
perfect matching
Perfect Matching
  • Given graph G=(V,E)
  • Perfect matching is M⊆E such that each vertex incident with exactlyone edge in M
slide3

Matching History

Dense Graphs

m=n2

O(n4)

  • All are non-trivial
  • Mucha-Sankowski uses sophisticateddynamic connectivity data structures (Holm et al. ’01)to maintain “canonical partition” (Cheriyan ’97)

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”.

(<2.38 is exponent for matrix multiplication)

slide4

Matching Algorithms

Dense Graphs

m=n2

  • Conceptually simple
  • Implemented in ~200 lines of MATLAB

*

*

* Randomized, but Las Vegas via [Cheriyan ’97]

linear matroid intersection
(Linear) Matroid Intersection
  • Find largest set of columns S such thatAS and BS are both linearly independent

AS

A =

BS

B =

matroid intersection
Matroid 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]
slide7

Matroid Intersection History

(for matrices of size n x m)

slide8

Matroid Intersection History

  • Essentially optimal:
    • Best known alg to compute rank takes O(mn-1)
    • Computing rank reduces to matroid intersection

*

*

*

O(mn1.38)

* Assumes matroids are linear

† Randomized, and assumes matroids can berepresented over same field

generic matching algorithm
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 algorithm10
Generic 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
matching outline
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
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.

± x{u,v}

if {u,v}∈E

Tu,v =

0

otherwise

a

b

c

properties of tutte matrix
Properties of Tutte Matrix

Lemma [Tutte’47]: G has a perfect matchingiff T is non-singular.

Lemma [RV’89]: G[V\{u,v}] has a perfect matching iff (T-1)u,v 0.

properties of tutte matrix14
Properties of Tutte Matrix

Lemma [Tutte’47]: G has a perfect matchingiff T is non-singular.

Lemma [RV’89]: G[V\{u,v}] has a perfect matching iff (T-1)u,v 0.

u

(T-1)u,v 0

v

properties of tutte matrix15
Properties of Tutte Matrix

Lemma [Tutte’47]: G has a perfect matchingiff T is non-singular.

Lemma [RV’89]: 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

properties of tutte matrix16
Properties of Tutte Matrix

Lemma [Tutte’47]: G has a perfect matchingiff T is non-singular.

Lemma [RV’89]: 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

properties of tutte matrix17
Properties of Tutte Matrix

Lemma [Tutte’47]: G has a perfect matchingiff T is non-singular.

Lemma [RV’89]: 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

properties of tutte matrix18
Properties of Tutte Matrix

Lemma [Tutte’47]: G has a perfect matchingiff 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
Matching Algorithm

Rabin-Vazirani ’89

(Takes O(n) time)

Compute T-1

For each {u,v}  E

If T-1u,v 0

Add {u,v} to matching

Recurse on G[V\{u,v}]

  • Total time: O(n+1) time
  • Natural question: Can we recomputeT-1 quickly in each iteration?
matching outline20
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
Rank-1 Updates
  • Let T be a n x n matrix
  • T + uvT is called a rank-1 update of T

+

T

u

vT

rank 1 updates22
Rank-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

+

T

uvT

rank 1 updates23
Rank-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 =

rank 1 updates24
Rank-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

matching outline25
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
RV 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

[MS’04]

rv algorithm rank 1 updates27
RV 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!

matching outline28
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
New Recursive Approach

(Here c=4 parts)

  • Partition into c parts {V1,…,Vc} (arbitrarily)
  • For each pair of parts {Va,Vb} (arbitrary order)
    • Recurse on G[Va ⋃Vb]
new recursive approach30
New Recursive Approach
  • Partition into c parts {V1,…,Vc} (arbitrarily)
  • For each pair of parts {Va,Vb} (arbitrary order)
    • Recurse on G[Va ⋃Vb]
new recursive approach31
New Recursive Approach
  • Partition into c parts {V1,…,Vc} (arbitrarily)
  • For each pair of parts {Va,Vb} (arbitrary order)
    • Recurse on G[Va ⋃Vb]
new recursive approach32
New Recursive Approach
  • Partition into c parts {V1,…,Vc} (arbitrarily)
  • For each pair of parts {Va,Vb} (arbitrary order)
    • Recurse on G[Va ⋃Vb]
  • Base case: 2 vertices
new recursive approach33
New Recursive Approach
  • Partition into c parts {V1,…,Vc} (arbitrarily)
  • For each pair of parts {Va,Vb} (arbitrary order)
    • Recurse on G[Va ⋃Vb]
  • Base case: 2 vertices {u,v}
    • If T-1u,v0, add {u,v} to matching, update T-1
recursion f a q
Recursion 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!
  • Isn’t this horribly slow?
    • No: we’ll see recurrence next
  • Partition into c parts {V1,…,Vc} (arbitrarily)
  • For each pair of parts {Va,Vb} (arbitrary order)
    • Recurse on G[Va ⋃Vb]
  • Base case: 2 vertices {u,v}
    • If T-1u,v0, add {u,v} to matching, update T-1
final matching algorithm
Final 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 G[Va ⋃Vb]

Apply updates to current subproblem

s = size of subproblem

final matching algorithm36
Final 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 G[Va ⋃Vb]

Apply updates to current subproblem

s = size of subproblem

final matching algorithm37
Final 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 G[Va ⋃Vb]

Apply updates to current subproblem

Assume:

O(s) time

s = size of subproblem

slide38

Time Analysis

  • Basic Divide-and-Conquer
    • If then
  • Since ,just choose c large enough!

c = 13 is large enough if  = 2.38

handling updates40
Handling Updates

v

v

u

u

u

u

v

v

T =

T-1 =

  • Delete vertices u and v
handling updates naively
Handling Updates (Naively)

v

v

u

u

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
matching outline42
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

Postponed

Just-in-time Updates

v

u

u

v

T-1 =

  • Don’t update entire matrix!
  • Just update parent in recursion tree
  • Updates outside of parent are postponed
postponed updates

Invert

Multiply

Postponed Updates

v

u

u

v

T-1 =

  • Accumulate batches of updates
  • Claim: New updates can be applied with matrix multiplication and inversion
final matching algorithm45
Final 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 G[Va ⋃Vb]

Apply updates to current subproblem

Invariant: Before / after child subproblem,parent’s submatrix is completely updated

 in every base case, T-1u,v is up-to-date!

slide46

Graph 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.

matching summary
Matching 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)
    • maximummatchings
    • Las Vegas
more extensions

J

A

Matroid Intersection

O(mn-1) algorithm

J

x3

x4

BT

x5

x6

x7

x8

More 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
more extensions49
More 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

open problems
Open 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