Top Banner
Dynamic Matching in Bipartite Graphs Aaron Bernstein and Cliff Stein
30

Dynamic Matching in Bipartite Graphs Aaron Bernstein and Cliff Stein.

Jan 20, 2018

Download

Documents

Terence Welch

Dynamic Exact MCM  Trivial:  O(mn 1/2 ) per update  O(MM(n)) ~ O(n 2.36 ) per update  Sankowski’s algorithm:  O(n ) randomized.  Bosek, Leniowski, Sankowski, Zych:  O(n 1/2 ) for incremental or decremental
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Dynamic Matching in Bipartite Graphs Aaron Bernstein and Cliff Stein.

Dynamic Matching in Bipartite Graphs

Aaron Bernstein and Cliff Stein

Page 2: Dynamic Matching in Bipartite Graphs Aaron Bernstein and Cliff Stein.

Static Maximum Cardinality Matching

Unweighted graph G Goal: find a maximum matching (MCM) in G Exact algorithms:

O(mn1/2) (Vazirani) O(MM(n)) ~ O(n2.36) (Sankowski) Õ(m10/7) for bipartite graphs (Madry).

Approximate algorithms: (1 + ε)-approximation in time O(m/ε)

Page 3: Dynamic Matching in Bipartite Graphs Aaron Bernstein and Cliff Stein.

Dynamic Exact MCM

Trivial: O(mn1/2) per update O(MM(n)) ~ O(n2.36) per update

Sankowski’s algorithm: O(n1.495) randomized.

Bosek, Leniowski, Sankowski, Zych: O(n1/2) for incremental or decremental

Page 4: Dynamic Matching in Bipartite Graphs Aaron Bernstein and Cliff Stein.

Dynamic Approximate MCMApprox. Update

TimeRandomization

SpecificSetting

Authors

2-or-worse-approximate matching2 O(n) D Trivial

O(1) O(log2(n)) R Onak and Rubinfeld

2 O(log(n)) R Baswana et al.

O(log(n)) O(log2(n)) D Onak and Rubinfeld

(3 + ε) O(m1/3) D Bhattacharya et al.

2 O(log(n)) D Constant Arboricity

Neiman and Solomon

(2 + ε) O(log(n)) D Fractional Matching

Bhattacharya et al.

Better-than-2-approximate matching3/2 O(m1/2) D Neiman and Solomon

(1+ε) O(m1/2) D Gupta and Peng

(1+ε) O(1/ε) D Inc/Decremental,Bipartite

Bosek et al.

Page 5: Dynamic Matching in Bipartite Graphs Aaron Bernstein and Cliff Stein.

What makes for a good approximation?

Best approximation: (1+ε)-approx, O(m1/2) update Does not rely on specific structural properties of

approximate matchings Uses linear-time static (1+ ε)-approx. as a black box.

Algorithm Description: Construct a (1+ ε)-approx. M’ on the current graph M’ remains a (1+ ε)2 approx. for ε μ(G) updates. Amortized update m/μ(G) (can be made worst-case) If μ(G) ≥ m1/2, we have m/μ(G) = O(m1/2) Else, can easily prune edges until m’ ≤ μ(G)2 without

destroying the maximum matching m’/μ(G) = O(μ(G)) = O(m1/2).

Page 6: Dynamic Matching in Bipartite Graphs Aaron Bernstein and Cliff Stein.

What makes for a good approximation?

What about the other better-than-2 approximations? All rely on the following lemma. Lemma: if all augmenting paths w.r.t M have length >

(2k-1) then M is a (1+1/k)-approx. matching. All path lengths > 1 2-approximation All path lengths > 3 3/2-approximation. All path lengths > 1+1/ε (1+O(ε))-approximation.

Augmenting paths seem problematic in dynamic case Little local structure hard to maintain dynamically. Hard to verify their existence/non-existence

Page 7: Dynamic Matching in Bipartite Graphs Aaron Bernstein and Cliff Stein.

Dynamic Matching Lower Bound

Abboud and Williams Conditional lower bound:

Assume 3-sum requires Ω(n2) time Thm: Say that a fully dynamic algorithm A

maintains a matching M such that all augmenting paths w.r.t M have length > 19 Then, A must have amortized update time Ω(m1/3)

Provides some evidence: a better than 1.1-approximation requires Ω(m1/3) time. Potential solution: might be possible to beat this bound

by going beyond an augmenting-paths-based analysis.

Page 8: Dynamic Matching in Bipartite Graphs Aaron Bernstein and Cliff Stein.

Our results

State of the art: (1+ε)-approx., O(m1/2) update, deterministic (3+ε)-approx., O(m1/3) update, deterministic 2-approx., O(log) update, randomized 2-approx., O(log) update, deterministic, constant

arboricity Our results:

Only bipartite graphs (3/2+ε)-approx., O(m1/4) update, deterministic Fastest deterministic algorithm Fastest better-than-2 approximation. Also: (1+ε)-approx., O(log(n)) update, deterministic,

Constant Arboricity

Page 9: Dynamic Matching in Bipartite Graphs Aaron Bernstein and Cliff Stein.

Characterizing Approximate Matchings

Ideally show: A matching M with property P is a (1+ε)-approx. matching

We were unable to do this. Might be able to use LP-duality techniques from

matching in the semi-streaming model.

Page 10: Dynamic Matching in Bipartite Graphs Aaron Bernstein and Cliff Stein.

Matching-Perserving Subgraph

Have a dynamic graph G Want to maintain a large subgraph M with max

degree 1. Idea: Use a matching-perserving subgraph H

First used by Bhattacharya et al (kernel). Update in G Maintain H in G. Update in H Maintain good matching M in H

What we want from H: 1. M is easy to maintain in H 2. Good matching in H is good matching in G 3. Easy to maintain H dynamically.

We develop entirely new subgraph H.

Page 11: Dynamic Matching in Bipartite Graphs Aaron Bernstein and Cliff Stein.

Matching-Perserving Subgraph H

Want: maintain an approx. matching M in H, not G Requirement 1: H should be matching-perserving

µ(H) should be a good approximation to µ(G) Requirement 2: H should be easier to work with

Option 1: H is sparse ~O(n1/2) update Option 2: H has bounded degree B O(B) update Perhaps more complicated properties

Requirement 3: H should be easy to maintain dynamically Approximate matching seems hard to maintain directly

because it lacks local structure. Want definition of H in terms of “local” constraints.

Page 12: Dynamic Matching in Bipartite Graphs Aaron Bernstein and Cliff Stein.

Dynamic matching in bounded degree graphs

Let H be a dynamic graph with max degree Δ Lemma: (Gupta and Peng): can maintain a

(1+ε) matching in H in update time O(Δ) Proof:

Lazy rebuilding update time O(m/µ(G)) Easy to see: m ≤ 2Δ*µ(G) m/µ(G) = O(Δ)

Want the matching-perserving subgraph H to have bounded degree.

Page 13: Dynamic Matching in Bipartite Graphs Aaron Bernstein and Cliff Stein.

Almost-maximal B-matching

The following subgraph H used by Bhattacharya et al. All vertex degrees bounded by B If (u,v) not in H then u or v have degree ≥ B(1-ε)

H easy to work with: bounded degree B Matching-Perserving:

Claim (new): µ(H) ≥ (1/2 – ε) µ(G) They show something less modular Proof surprisingly difficult (and possibly false) for non-

bipartite case. H easy to maintain: maximal completely local. Recourse to maximality cannot go beyond 2-approx. Want: local properties that capture global structure.

Page 14: Dynamic Matching in Bipartite Graphs Aaron Bernstein and Cliff Stein.

Edge Degree Constrained Subgraph (EDCS)

Let λ ~ ε-2 be a small fixed constant. Defn: δ(u) = (weighted) degree of u in H. Defn: for (u,v) in G, Edge Degree(u,v) = δ(u)+δ(v) Defn: a weighted EDCS(B, λ) is a subgraph H of

G with the following properties: Edges on H have “virtual” positive integral weights. The actual subgraph is support(H). 1. For each edge (u,v) in H, δ(u)+δ(v) ≤ B 2. For each edge (u,v) in G, δ(u)+δ(v) ≥ B(1- λ)

Page 15: Dynamic Matching in Bipartite Graphs Aaron Bernstein and Cliff Stein.

Weighted EDCS contains a good approximation.

Defn: a weighted EDCS(B, λ) is a subgraph H of G with the following properties: Edges on H have “virtual” positive integral weights. 1. For each edge (u,v) in H, δ(u)+δ(v) ≤ B 2. For each edge (u,v) in G, δ(u)+δ(v) ≥ B(1- λ)

Thm: let H be a weighted EDCS(B, λ) of a bipartite graph G. Viewing the support of H as an unweighted graph, we have μ(H) ≥ (1-ε) μ(G) Note: H has bounded degree B

Page 16: Dynamic Matching in Bipartite Graphs Aaron Bernstein and Cliff Stein.

Maximal B/2-matching VS. EDCS(B, λ)

Green dotted edges = maximum matching in G

H = maximal B/2-matching in G μ(H) is only a 2-approx to μ(G).

R S

P Q

B/2-matching

Weighted EDCS(B, λ): 1. For each edge (u,v) in H, δ(u)+δ(v) ≤ B 2. For each edge (u,v) in G, δ(u)+δ(v) ≥ B(1- λ)

Edges in G\H violate property 2: must add them to H Edges in H now violate property 1: must remove

them from H.

B/2

0

0

B/2

+

+

+

+

Page 17: Dynamic Matching in Bipartite Graphs Aaron Bernstein and Cliff Stein.

Maintaining a Weighted EDCS

Weighted EDCS(B,λ) properties: 1. For each edge (u,v) in H, δ(u)+δ(v) ≤ B 2. For each edge (u,v) in G, δ(u)+δ(v) ≥ B(1- λ)

Insertion of edge (u,v) in G: If (u,v) doesn’t violate Prop. 2, ignore it. δ(u) and δ(v) increase – incident edges might violate Prop. 1 Rebalance δ(v) by deleting violating edge (v,w) δ(w) decreases – incident edges might violate Prop. 2 Rebalance δ(w) by adding weight to violating edge (w,x) Now need to rebalance δ(x) and so on.

Can show: only need small number of rebalances. Easy: rebalance in time O(degree). Can achieve: rebalance in time O(arboricity)

Relies on dynamic orientation

Page 18: Dynamic Matching in Bipartite Graphs Aaron Bernstein and Cliff Stein.

Weighted EDCS hard to maintain

Weights only used internally to determine H. Final result: unweighted subgraph H that

contains a large matching. When adversary deletes (u,v), if (u,v) had a

large weight must do a lot of fix-up work. Want: Every edge plays a limited role so that

any single edge change can be easily processed.

Page 19: Dynamic Matching in Bipartite Graphs Aaron Bernstein and Cliff Stein.

Unweighted EDCS

Let λ ~ ε-2 be a small fixed constant. Defn: an unweighted EDCS(B, λ) is an unweighted

subgraph H of G with the following properties: 1. For each edge (u,v) in H, δ(u)+δ(v) ≤ B 2. For each edge (u,v) in G, δ(u)+δ(v) ≥ B(1- λ)

Page 20: Dynamic Matching in Bipartite Graphs Aaron Bernstein and Cliff Stein.

Unweighted EDCS

Let λ ~ ε-2 be a small fixed constant. Defn: an unweighted EDCS(B, λ) is an unweighted

subgraph H of G with the following properties: 1. For each edge (u,v) in H, δ(u)+δ(v) ≤ B 2. For each edge (u,v) in G\H, δ(u)+δ(v) ≥ B(1- λ)

Thm: If H is an unweighted EDCS(B, λ) of a bipartite graph G then μ(H) ≥ (2/3 – ε) μ(G)

weighted VS. unweighted: (1+ ε) approximation VS. (3/2+ε) approximation. Unweighted is easier to maintain. Both capture some global structure of the graph.

Page 21: Dynamic Matching in Bipartite Graphs Aaron Bernstein and Cliff Stein.

Unweighted VS. Weighted

Unweighted EDCS: μ(H) = 2n/3. Weighted EDCS: P-S and R-U edges violate Prop. 2.

Must add weight to P-S and R-U edges. Must then remove weight from P-T and Q-U edges (Prop. 1) Must now add weight to Q-T edges (Prop. 2).

(B/2-1)-matching

Blue edges = In H Green edges = In G\H Unweighted EDCS:

1. For edge (u,v) in H, δ(u)+δ(v) ≤ B 2. For edge (u,v) in G\H, δ(u)+δ(v) ≥ B(1- λ)

Weighted EDCS: 1. For edge (u,v) in H, δ(u)+δ(v) ≤ B (same) 2. For edge (u,v) in G, δ(u)+δ(v) ≥ B(1- λ)

(B/2-1)-matching

P

Q

R

S

T

U

B/2

B/2 B/2

B/21

1

+ +

+ +

- -

Page 22: Dynamic Matching in Bipartite Graphs Aaron Bernstein and Cliff Stein.

Unbounded Arboricity: Maintaining an Unweighted EDCS

Arboricity = O(m1/2) < O(n) Unweighted: only small # of rebalances per update Time for rebalance: O(m1/2) Gap of λB = Ω(B) between EDCS properties Intuition: only need to rebalance a vertex after λB

degree changes. Requires Unweighted EDCS. “Amortized” rebalance time:

O(m1/2/ λB ) = O(m1/2/B) Analysis actually worst-case.

Page 23: Dynamic Matching in Bipartite Graphs Aaron Bernstein and Cliff Stein.

Small Arboricity Bipartite Graphs

At all times arboricity ≤ α Thm: Weighted EDCS(B,λ) (1+ε)-approx. Thm: Can maintain a weighted EDCS(B,λ) H in

time Õ(α2B) per update in G Algorithm:

Set B ~ ε-2 = O(1) Directly maintain a (1+ ε)-approx. matching M in H. M will be our final matching in G as well. Update in G fix H in time Õ(αB) = Õ(α2) Change to H Fix up M in time O(B) = O(1) M is a (1+ ε)2-approx. matching in G:

|M| is (1+ε)-approximation to μ(H). Extra (1+ε) gap between μ(H) and μ(G).

Page 24: Dynamic Matching in Bipartite Graphs Aaron Bernstein and Cliff Stein.

General Bipartite Graphs

Thm: Unweighted EDCS(B,λ) (3/2+ε)-approx. Thm: Can maintain an unweighted EDCS(B,λ) H

in time O(B + m1/2/B) per update in G. Algorithm:

Set B = O(m1/4) Directly maintain a (1+ ε)-approx. matching M in H. M will be our final matching in G as well. Update in G fix H in time O(B + m1/2/B) = O(m1/4). Changes to H Fix up M in time O(B) = O(m1/4). M is a (3/2+ ε)-approx. matching in G:

|M| is (1+ε)-approximation to μ(H). Extra (3/2+ε) error between μ(H) and μ(G).

Page 25: Dynamic Matching in Bipartite Graphs Aaron Bernstein and Cliff Stein.

EDCS contains a good approximation

Let H be an unweighted EDCS(B,λ). Assume G has a perfect matching: μ(G) = n Want to show: μ(H) ≥ (2/3-ε)n Contradiction Assumption: μ(H) < (2/3-ε)n Let M be some maximum matching in H.

|M| < (2/3-ε)n Can view M as a matching in G, and look at the

residual graph in G w.r.t M.

Page 26: Dynamic Matching in Bipartite Graphs Aaron Bernstein and Cliff Stein.

The residual graph (n vertices per side).

Contradiction Assumption: μ(H) < (2/3-ε)n

S*L

SL

SR

TR

TL T*R

H contains no edges crossing cut. |S*L| = |T*R| ≥ (n/3)(1+ε) Assume: |SL|=|SR|=|TL|=|TR| < n/3 ≥ (n/3)(1+ε) disjoint crossing edges in G\H Assume: crossing edges go from S*L to T*R

Then: average degree of |S*L| U |T*R| ≥ B/2(1-λ) ~ B/2 (Prop. 2)

Can’t fit degree of S*L in smaller SR (Prop. 1) Weighted EDCS: edges from SL to SR take

up even more space in SR (Prop 2.)

1. For edge (u,v) in H, δ(u)+δ(v) ≤ B 2. For edge (u,v) in G\H, δ(u)+δ(v) ≥ B(1- λ

Page 27: Dynamic Matching in Bipartite Graphs Aaron Bernstein and Cliff Stein.

EDCS review

λ = O(ε-2) = O(1) Weighted EDCS(B,λ) H

1. For each edge (u,v) in H, δ(u)+δ(v) ≤ B 2. For each edge (u,v) in G, δ(u)+δ(v) ≥ B(1- λ) µ(H) ≥ (1- ε) µ(G)

Unweighted EDCS(B, λ) H 1. For each edge (u,v) in H, δ(u)+δ(v) ≤ B 2. For each edge (u,v) in G\H, δ(u)+δ(v) ≥ B(1- λ) µ(H) ≥ (2/3- ε) µ(G)

Bounded Degree B easy to maintain (1+ε)-matching in H

Page 28: Dynamic Matching in Bipartite Graphs Aaron Bernstein and Cliff Stein.

Upcoming Work: Non-Bipartite Graphs

Weighted EDCS only a 3/2-approximation G = complete graph on 6 vertices. µ(G) = 3 H = 2 triangles with edge weights B/4 all vertex degree B/2. But µ(H) = 2

Focus on unweighted EDCS H Can probably show: µ(H) ≥ (3/2-ε) µ(G)

Significantly more involved than in bipartite case Can probably show: can maintain EDCS in

same time as in bipartite case

Page 29: Dynamic Matching in Bipartite Graphs Aaron Bernstein and Cliff Stein.

Open problems: EDCS

Want: faster update times for better-than-2 approximation. We achieve O(m1/4) compared to the previous O(m1/2). Is O(polylog) possible for general bipartite graphs?

Possible approach: faster algorithms for maintaining an EDCS? Randomization Layering

Page 30: Dynamic Matching in Bipartite Graphs Aaron Bernstein and Cliff Stein.

Characterizing Approximate Matchings

Want: if some matching M has property P then it is a (1+ε)-approximation There might already exist LP-duality characterizations,

especially in the semi-streaming literature. Also want: other possible transitional subgraphs

that guarantee a (1+ε)-approximation. The transitional subgraph H needs to have small

bounded degree (or some other property that makes it easy to deal with).

For non-bipartite graphs, we so far only have a characterizations of 3/2-approximate matchings