a fast approximation for maximum weight matroid intersection€¦ · matroid intersection...

Post on 21-May-2020

26 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

A Fast Approximation forMaximum Weight

Matroid Intersection

Chandra Chekuri Kent Quanrud

University of Illinois at Urbana-Champaign

UIUC Theory SeminarFebruary 8, 2016

Max. weight bipartite matching

5

7

2 4

6

91

72

83 64

3

Input:

bipartite graph G = (LtR,E)

weights w : E → R≥0

Output:

matching M ⊆ E maximizing

w(M)def=∑

e∈Mw(e)

Approximate output:

matching M ⊆ E s.t. w(M) ≥ (1− ε)OPT

Max. weight bipartite matching

7

6

9

7

6

total weight = 355

2 4

1

2

834

3

Input:

bipartite graph G = (LtR,E)

weights w : E → R≥0

Output:

matching M ⊆ E maximizing

w(M)def=∑

e∈Mw(e)

Approximate output:

matching M ⊆ E s.t. w(M) ≥ (1− ε)OPT

Max. weight bipartite matching

7

6

9

7

6

total weight = 355

2 4

1

2

834

3

Input:

bipartite graph G = (LtR,E)

weights w : E → R≥0

Output:

matching M ⊆ E maximizing

w(M)def=∑

e∈Mw(e)

Approximate output:

matching M ⊆ E s.t. w(M) ≥ (1− ε)OPT

Fast approximations: bipartite matching

exact approximate

cardinality O(m√n) Hopcroft and Karp [1973]

O(m10/7) Mądry [2013]O(m/ε)

weighted O(mn+ n2 log n) Fredman and Tarjan [1987]

O(m√n logW ) Duan and Su [2012]

O(m log(1/ε)/ε)Duan and Pettie [2014]

(m = edges, n = vertices, W = max weight)

(!) For fixed ε, weighted approximation is faster thanunweighted exact

Fast approximations: bipartite matching

exact approximate

cardinality O(m√n) Hopcroft and Karp [1973]

O(m10/7) Mądry [2013]O(m/ε)

weighted O(mn+ n2 log n) Fredman and Tarjan [1987]

O(m√n logW ) Duan and Su [2012]

O(m log(1/ε)/ε)Duan and Pettie [2014]

(m = edges, n = vertices, W = max weight)

(!) For fixed ε, weighted approximation is faster thanunweighted exact

Duan and Pettie [2014]

(extends to general matching)

1. Primal-dual

- Only approximates dual optimal conditions

2. Scaling reduces weighted problem to unweighted

3. Runs an approximate subroutine at each scale

4. Updates dual variables with small loss fromapproximation

Matroids

M = (N , I)N : ground set of elements

I ⊆ 2N : independent (feasible) sets

Matroidskred = 2kblue = 3kgreen = 1

x

y

- Empty set is independent

- Subsets of independent setsare independent

- Maximal independent setshave same cardinalitymax independent set is a base

max cardinality is the rank

- If A,B ∈ I and |A| < |B|,then there is b ∈ B \ A s.t.A+ b ∈ I

Matroid Intersection

M1 = (N , I1) M2 = (N , I2)

M1 ∩M2 , (N , I1 ∩ I2)

(same ground set)

e.g. bipartite matchings, arborescences

Matroid intersection problems

Maximum cardinality matroid intersection

Input: matroidsM1 = (N , I1),M2 = (N , I2)Output: S ∈ I1 ∩ I2 maximizing |S|

Maximum weight matroid intersection

Input: matroids M1 = (N , I1), M2 = (N , I2),weights w : N → R≥0

Output: S ∈ I1 ∩I2 maximizing w(S) def=∑

e∈S w(s)

Oracle Model

Independence queries of the form “Is S ∈ I?”

Matroid intersection problems

Maximum cardinality matroid intersection

Input: matroidsM1 = (N , I1),M2 = (N , I2)Output: S ∈ I1 ∩ I2 maximizing |S|

Maximum weight matroid intersection

Input: matroids M1 = (N , I1), M2 = (N , I2),weights w : N → R≥0

Output: S ∈ I1 ∩I2 maximizing w(S) def=∑

e∈S w(s)

Oracle Model

Independence queries of the form “Is S ∈ I?”

Matroid intersection problems

Maximum cardinality matroid intersection

Input: matroidsM1 = (N , I1),M2 = (N , I2)Output: S ∈ I1 ∩ I2 maximizing |S|

Maximum weight matroid intersection

Input: matroids M1 = (N , I1), M2 = (N , I2),weights w : N → R≥0

Output: S ∈ I1 ∩I2 maximizing w(S) def=∑

e∈S w(s)

Oracle Model

Independence queries of the form “Is S ∈ I?”

Running times for matroid intersection

CardinalityO(nk1.5Q) Cunningham [1986]

(n = |N |, k = rank(M1 ∩M2), Q = cost of indep. query)

Weighted (W = max{w(e) : e ∈ N})O(nk2Q) Frank [1981], Brezovec et al. [1986], Schrijver [2003]

O(n2√k log(kW )Q) Fujishige and Zhang [1995]

O(nk1.5WQ) Huang et al. [2014]

O((n2 log(n)Q+ n3 polylog(n)) log(nW ))Lee et al. [2015]

Running times for matroid intersection

CardinalityO(nk1.5Q) Cunningham [1986]

(n = |N |, k = rank(M1 ∩M2), Q = cost of indep. query)

Weighted (W = max{w(e) : e ∈ N})O(nk2Q) Frank [1981], Brezovec et al. [1986], Schrijver [2003]

O(n2√k log(kW )Q) Fujishige and Zhang [1995]

O(nk1.5WQ) Huang et al. [2014]

O((n2 log(n)Q+ n3 polylog(n)) log(nW ))Lee et al. [2015]

Running times for matroid intersection

CardinalityO(nk1.5Q) Cunningham [1986]

(n = |N |, k = rank(M1 ∩M2), Q = cost of indep. query)

Weighted (W = max{w(e) : e ∈ N})O(nk2Q) Frank [1981], Brezovec et al. [1986], Schrijver [2003]

O(n2√k log(kW )Q) Fujishige and Zhang [1995]

O(nk1.5WQ) Huang et al. [2014]

O((n2 log(n)Q+ n3 polylog(n)) log(nW ))Lee et al. [2015]

Approximate matroid intersection

Input: M1 = (N , I1),M2 = (N , I2),w : N → R≥0, ε > 0

Output: S ∈ I1 ∩ I2 s.t. w(S) ≥ (1− ε)OPT(OPT = max{w(T ) : T ∈ I1 ∩ I2})

Previous bound:O(nk1.5 log(k)Q/ε) Huang et al. [2014]

Main result: (1− ε)-approximation in time

O(nkQ log2(ε)/ε2)

Approximate matroid intersection

Input: M1 = (N , I1),M2 = (N , I2),w : N → R≥0, ε > 0

Output: S ∈ I1 ∩ I2 s.t. w(S) ≥ (1− ε)OPT(OPT = max{w(T ) : T ∈ I1 ∩ I2})

Previous bound:O(nk1.5 log(k)Q/ε) Huang et al. [2014]

Main result: (1− ε)-approximation in time

O(nkQ log2(ε)/ε2)

Fast approximations: matroid intersection

exact approximate

cardinality O(nk1.5Q) Cunningham [1986] O(nkQ/ε)

weighted

(nk2Q) Frank [1981] and others

O(n2√k log(kW )Q)

Fujishige and Zhang [1995]

O(nk1.5WQ) Huang et al. [2014]

O((n2 log(n)Q+ n3 polylog(n)) log(nW ))

Lee et al. [2015]

O(nkQ log2(1/ε)/ε2)

(n = elements, k = rank, Q = indep. query, W = max weight)

(!) For fixed ε, weighted approximation is faster thanunweighted exact

Fast approximations: matroid intersection

exact approximate

cardinality O(nk1.5Q) Cunningham [1986] O(nkQ/ε)

weighted

(nk2Q) Frank [1981] and others

O(n2√k log(kW )Q)

Fujishige and Zhang [1995]

O(nk1.5WQ) Huang et al. [2014]

O((n2 log(n)Q+ n3 polylog(n)) log(nW ))

Lee et al. [2015]

O(nkQ log2(1/ε)/ε2)

(n = elements, k = rank, Q = indep. query, W = max weight)

(!) For fixed ε, weighted approximation is faster thanunweighted exact

A Fast Approximation forMaximum WeightBipartite Matching

Chandra Chekuri Kent Quanrud

University of Illinois at Urbana-Champaign

UIUC Theory SeminarFebruary 8, 2016

Max. weight bipartite matching

7

6

9

7

6

total weight = 355

2 4

1

2

834

3

Input:

bipartite graphG = (LtR,E)weights w : E → R≥0

Output:

matching M ⊆ E maximizing

w(M)def=∑

e∈Mw(e)

Approximate output:

matching M ⊆ E s.t. w(M) ≥ (1− ε)OPT

Fast approximations: bipartite matching

exact approximate

cardinality O(m√n) Hopcroft and Karp [1973]

O(m10/7) Mądry [2013]O(m/ε)

weighted O(mn+ n2 log n) Fredman and Tarjan [1987]

O(m√n logW ) Duan and Su [2012]

O(m log(1/ε)/ε)Duan and Pettie [2014]

(m = edges, n = vertices, W = max weight)

(!) For fixed ε, weighted approximation is faster thanunweighted exact

faster

Maximum cardinality matching

- Augmenting paths

Hopcroft-Karp

- Augment in batch- Most paths are short

faster

Integral Hungarian

- primal-dual- (small) integral weights

- fixed scaling

Hungarian algo.

- primal-dual- combinatorial scaling

APX Hungarian

- APX primal-dual- exponential scaling

weighted

APX Hopcroft-Karpfaster

weighted

faster

weighted

faster

Maximum cardinality matching

- Augmenting paths

Hopcroft-Karp

- Augment in batch- Most paths are short

faster

Integral Hungarian

- primal-dual- (small) integral weights

- fixed scaling

Hungarian algo.

- primal-dual- combinatorial scaling

APX Hungarian

- APX primal-dual- exponential scaling

weighted

APX Hopcroft-Karpfaster

weighted

faster

weighted

1 2 3

4 5 6

faster

Maximum cardinality matching

- Augmenting paths

Hopcroft-Karp

- Augment in batch- Most paths are short

faster

Integral Hungarian

- primal-dual- (small) integral weights

- fixed scaling

Hungarian algo.

- primal-dual- combinatorial scaling

APX Hungarian

- APX primal-dual- exponential scaling

weighted

APX Hopcroft-Karpfaster

weighted

faster

weighted

1 2 3

4 5 6

Augmenting paths

Augmenting paths

= Exposed vertices

Augmenting paths

= Exposed vertices

Augmenting paths

= Exposed vertices

Augmenting paths

= Exposed vertices

Augmenting paths

= Exposed vertices

Augmenting paths

= Exposed vertices

Augmenting paths

Max. matching ⇔ no aug. paths

Max. matching ⇔ no aug. paths

Max. matching ⇔ no aug. paths

Finding augmenting paths

= Exposed vertices

Finding augmenting paths

= Exposed vertices

Finding augmenting paths

= Exposed vertices

= Exposed vertices

Finding augmenting paths

= Exposed vertices

= Exposed vertices

M ;

does M have anaugmenting path? M M4P

yes, P

return M

nope!

M ;

does M have anaugmenting path? M M4P

yes, P

return M

nope!

O(m)

n paths

O(mn)

faster

Maximum cardinality matching

- Augmenting paths

Hopcroft-Karp

- Augment in batch- Most paths are short

faster

Integral Hungarian

- primal-dual- (small) integral weights

- fixed scaling

Hungarian algo.

- primal-dual- combinatorial scaling

APX Hungarian

- APX primal-dual- exponential scaling

weighted

APX Hopcroft-Karpfaster

weighted

faster

weighted

1 2 3

4 5 6

König 1931

O(mn)

Hopcroft-Karp

Most augmenting paths are short

Augment in batch and increase shortest aug. pathlength

MatchingM, k def= |M| < OPT

Lemma. M has aug. path P of length

|P | ≤ 2

⌊k

OPT− k

⌋+ 1

MatchingM, k def= |M| < OPT

Lemma. M has aug. path P of length

|P | ≤ 2

⌊k

OPT− k

⌋+ 1

|M|

|P |

MatchingM, k def= |M| < OPT

Lemma. M has aug. path P of length

|P | ≤ 2

⌊k

OPT− k

⌋+ 1

|M|

|P |

MatchingM, k def= |M| < OPT

Lemma. M has aug. path P of length

|P | ≤ 2

⌊k

OPT− k

⌋+ 1

|M|

|P |

2p

n

n �pn

batch-augment

batch-augment

batch-augment

L0

L1L2

L3

L4

batch-augment

L0

L1L2

L3

L4

batch-augment

L0

L1L2

L3

L4

M ;

does M have anaugmenting path? M M4P

yes, P

return M

nope!

O(m)

n paths

O(mn)

M ;

does M have anaugmenting path?

return M

nope!

O(m)

batch-augment

yes

O(mp

n)

O(p

n) times

faster

Maximum cardinality matching

- Augmenting paths

Hopcroft-Karp

- Augment in batch- Most paths are short

faster

Integral Hungarian

- primal-dual- (small) integral weights

- fixed scaling

Hungarian algo.

- primal-dual- combinatorial scaling

APX Hungarian

- APX primal-dual- exponential scaling

weighted

APX Hopcroft-Karpfaster

weighted

faster

weighted

1 2 3

4 5 6

König 1931

O(mn)Hopcroft and Karp

1973

O(mp

n)

MatchingM, k def= |M| < OPT

Lemma. M has aug. path P of length

|P | ≤ 2

⌊k

OPT− k

⌋+ 1

|M|

|P |

2p

n

n �pn

MatchingM, k def= |M| < OPT

Lemma. M has aug. path P of length

|P | ≤ 2

⌊k

OPT− k

⌋+ 1

|M|

|P |

2p

n

n �pn

1/✏(1 � ✏)n

M ;

return M

nope!

O(m)

batch-augmentrepeat O(1/✏)times

O(m/✏)

faster

Maximum cardinality matching

- Augmenting paths

Hopcroft-Karp

- Augment in batch- Most paths are short

faster

Integral Hungarian

- primal-dual- (small) integral weights

- fixed scaling

Hungarian algo.

- primal-dual- combinatorial scaling

APX Hungarian

- APX primal-dual- exponential scaling

weighted

APX Hopcroft-Karpfaster

weighted

faster

weighted

1 2 3

4 5 6

König 1931

O(mn)Hopcroft and Karp

1973

O(mp

n)O(m/✏)

Weighted matchings

Weighted matchings

4367

84

25

34

Primal

maxx

e∈E

w(e) · x(e)

s. t.∑

e∈δ(v)

x(e) ≤ 1 v ∈ L ∪R,

x ≥ 0 e ∈ E

4367

84

25

34

Dual

miny

v∈L∪R

y(v)

s. t. y(`) + y(r) ≥ w({`, r}) {`, r} ∈ Ey(v) ≥ 0 v ∈ L ∪R

Primal

maxx

e∈E

w(e) · x(e)

s. t.∑

e∈δ(v)

x(e) ≤ 1 v ∈ L ∪R,

x ≥ 0 e ∈ E

4367

84

25

34Dual

miny

v∈L∪R

y(v)

s. t. y(`) + y(r) ≥ w({`, r}) {`, r} ∈ Ey(v) ≥ 0 v ∈ L ∪R

maxx

X

e2E

w(e) · x(e)

s. t.X

e2�(v)

x(e) 1 8v,

x � 0 8e

miny

X

v2L[R

y(v)

s. t. y(`) + y(r) � w(e) 8e = {`, r}y(v) � 0 8v

y

Primal Dual

x

x, y optimal if:

x({`, r}) > 0 ) y(`) + y(r) = w({`, r}) {`, r} 2 E

y(`) > 0 )X

e2�(`)

x(e) = 1 ` 2 L

y(r) > 0 ) x(e) = 1 r 2 R

Orthogonality

maxx

X

e2E

w(e) · x(e)

s. t.X

e2�(v)

x(e) 1 8v,

x � 0 8e

miny

X

v2L[R

y(v)

s. t. y(`) + y(r) � w(e) 8e = {`, r}y(v) � 0 8v

y

Primal Dual

x

x, y optimal if:

x({`, r}) > 0 ) y(`) + y(r) = w({`, r}) {`, r} 2 E

y(`) > 0 )X

e2�(`)

x(e) = 1 ` 2 L

y(r) > 0 ) x(e) = 1 r 2 R

Orthogonality

{`, r} 2 M ) y(`) + y(r) = w({`, r}) {`, r} 2 E

y(`) > 0 ) ` 2 V (M) ` 2 L

y(r) > 0 ) r 2 V (M) r 2 R

y

Dualy(`) + y(r) � w({`, r}) {`, r} 2 E

y(v) � 0 v 2 L [ R

436

78

42

5

34

Primal

M

w(M) = OPT

Orthogonality

y(`) + y(r) = w({`, r}) 8{`, r} 2 M` 2 V (M) 8` : y(`) > 0

r 2 V (M) 8r : y(r) > 0

Orthogonality

y(`) + y(r) � w({`, r}) {`, r} 2 E

y(v) � 0 v 2 L [ R

Dual

436

7

8

4

25

34

y(`) + y(r) = w({`, r}) 8{`, r} 2 M` 2 V (M) 8` : y(`) > 0

r 2 V (M) 8r : y(r) > 0

Orthogonality

y(`) + y(r) � w({`, r}) {`, r} 2 E

y(v) � 0 v 2 L [ R

Dual

436

7

8

4

25

34

M ;y(`) max

e2Ew(e)

8` 2 L

y(r) 0 8r 2 R

88

8

8

8

0

0

0

0

0

y(`) + y(r) = w({`, r}) 8{`, r} 2 M` 2 V (M) 8` : y(`) > 0

r 2 V (M) 8r : y(r) > 0

Orthogonality

y(`) + y(r) � w({`, r}) {`, r} 2 E

y(v) � 0 v 2 L [ R

Dual

436

7

8

4

25

34

M ;y(`) max

e2Ew(e)

8` 2 L

y(r) 0 8r 2 R

88

8

8

8

0

0

0

0

0

y(`) + y(r) = w({`, r}) 8{`, r} 2 M` 2 V (M) 8` : y(`) > 0

r 2 V (M) 8r : y(r) > 0

Orthogonality

y(`) + y(r) � w({`, r}) {`, r} 2 E

y(v) � 0 v 2 L [ R

Dual

436

7

8

4

25

34

M ;y(`) max

e2Ew(e)

8` 2 L

y(r) 0 8r 2 R

88

8

8

8

0

0

0

0

0

GOALpush y(`) # 0

8 exposed ` 2 L

return M

y(`) maxe2E

w(e)8` 2 L

M ;

y(r) 0 8r 2 R

y(`) = 0for all exposed

` 2 L?

yesno

? ? ?

y(`) + y(r) = w({`, r}) 8{`, r} 2 M` 2 V (M) 8` : y(`) > 0

r 2 V (M) 8r : y(r) > 0

Orthogonality

y(`) + y(r) � w({`, r}) {`, r} 2 E

y(v) � 0 v 2 L [ R

Dual

436

7

8

4

25

34

GOALpush y(`) # 0

8 exposed ` 2 L

88

8

8

8

0

0

0

0

0

y(`) + y(r) = w({`, r}) 8{`, r} 2 M` 2 V (M) 8` : y(`) > 0

r 2 V (M) 8r : y(r) > 0

Orthogonality

y(`) + y(r) � w({`, r}) {`, r} 2 E

y(v) � 0 v 2 L [ R

Dual

436

7

8

4

25

34

GOALpush y(`) # 0

8 exposed ` 2 L

we can add“tight” edges

to our matching

88

8

8

8

0

0

0

0

0

return M

y(`) maxe2E

w(e)8` 2 L

M ;

y(r) 0 8r 2 R

y(`) = 0for all exposed

` 2 L?

yesno

is there atight aug. path?

yes

augment

? ? ?

no

y(`) + y(r) � w({`, r})

y(`) + y(r) � w({`, r})

y(`) + y(r) � w({`, r})

y(`) + y(r) � w({`, r})

y(`) + y(r) � w({`, r})

y(`) + y(r) � w({`, r})

y(`) + y(r) � w({`, r})

exposed weights go down

y(`) + y(r) � w({`, r})

exposed weights go down

tight edges stay covered

y(`) + y(r) � w({`, r})

exposed weights go down

tight edges stay covered

new tight edges

y(`) + y(r) � w({`, r})

return M

y(`) maxe2E

w(e)8` 2 L

M ;

y(r) 0 8r 2 R

y(`) = 0for all exposed

` 2 L?

yesno

is there atight aug. path?

yes

augment

shift weight

no

return M

y(`) maxe2E

w(e)8` 2 L

M ;

y(r) 0 8r 2 R

y(`) = 0for all exposed

` 2 L?

yesno

is there atight aug. path?

yes

augment

shift weight

no

O(m)' n times

O(m)'

O(mn)

n times

Using Egerváry’s reduction and Konig’s maximummatching alorithm, in the fall of 1953 I solved several12 by 12 assignment problems (with 3-digit integers asdata) by hand. Each of these examples took undertwo hours to solve and I was convinced that thecombined algorithm was ‘good’.

This must have been one of the last times when penciland paper could beat the largest and fastest electroniccomputer in the world.

- Harold Kuhn,On the origin of the Hungarian method

faster

Maximum cardinality matching

- Augmenting paths

Hopcroft-Karp

- Augment in batch- Most paths are short

faster

Integral Hungarian

- primal-dual- (small) integral weights

- fixed scaling

Hungarian algo.

- primal-dual- combinatorial scaling

APX Hungarian

- APX primal-dual- exponential scaling

weighted

APX Hopcroft-Karpfaster

weighted

faster

weighted

1 2 3

4 5 6

König 1931

O(mn)Hopcroft and Karp

1973

O(mp

n)

Egerváry 1931

Kuhn 1955

O(mn)

O(m/✏)

Jacobi 1890

What if the weights are small and integral?

w(e) ∈ {1, . . . ,W} ∀e ∈ E

return M

y(`) maxe2E

w(e)8` 2 L

M ;

y(r) 0 8r 2 R

y(`) = 0for all exposed

` 2 L?

yesno

is there atight aug. path?

yes

augment

shift weight

no

return M

y(`) maxe2E

w(e)8` 2 L

M ;

y(r) 0 8r 2 R

y(`) = 0for all exposed

` 2 L?

yes

is there atight aug. path?

augment

shift weight

no

no

yes

return M

M ;

y(r) 0 8r 2 R

y(`) = 0for all exposed

` 2 L?

yes

is there atight aug. path?

augment

shift weight

no

no

yes

y(`) W 8` 2 L

return M

M ;

y(r) 0 8r 2 R

y(`) = 0for all exposed

` 2 L?

yes

is there atight aug. path?

augmentno

no

yes

y(`) W 8` 2 L shift 1 unitof weight

return M

M ;

y(r) 0 8r 2 R

is there atight aug. path?

augment

no

yes

y(`) W 8` 2 L

repeatW times

shift 1 unitof weight

return M

M ;

y(r) 0 8r 2 R

y(`) W 8` 2 L

repeatW times

shift 1 unitof weight

Hopcroft-Karp

return M

M ;

y(r) 0 8r 2 R

y(`) W 8` 2 L

repeatW times

shift 1 unitof weight

Hopcroft-Karp

O(mp

n)

O(mp

nW )

faster

Maximum cardinality matching

- Augmenting paths

Hopcroft-Karp

- Augment in batch- Most paths are short

faster

Integral Hungarian

- primal-dual- (small) integral weights

- fixed scaling

Hungarian algo.

- primal-dual- combinatorial scaling

APX Hungarian

- APX primal-dual- exponential scaling

weighted

APX Hopcroft-Karpfaster

weighted

faster

weighted

1 2 3

4 5 6

König 1931

O(mn) Hopcroft and Karp

1973

O(mp

n)

Egerváry 1931

Kuhn 1955

O(mn)

O(m/✏)

O(mp

nW )

Jacobi 1890

Goal: beat O(m√n)

1. Approximate primal-dual conditions

2. Exponential scaling

3. Approximate cardinality at each scale

4. Lossy weight shift

return M

M ;

y(r) 0 8r 2 R

y(`) W 8` 2 L

repeatW times

shift 1 unitof weight

Hopcroft-Karp

O(mp

n)

O(mp

nW )

return M

M ;

y(r) 0 8r 2 R

y(`) W 8` 2 L

repeatW times

shift 1 unitof weight

Hopcroft-Karp

O(mp

n)

O(mp

nW ) O(m)

return M

M ;

y(r) 0 8r 2 R

y(`) W 8` 2 L

repeatW times

shift 1 unitof weight

Hopcroft-Karp

O(mp

n)

O(mp

nW ) O(m)

return M

M ;

y(r) 0 8r 2 R

y(`) W 8` 2 L

repeatW times

shift 1 unitof weight

O(m)

APX Hopcroft-Karp

eO(m/✏)

O(mW/✏)

return M

M ;

y(r) 0 8r 2 R

y(`) W 8` 2 L

repeatW times

shift 1 unitof weight

O(m)

APX Hopcroft-Karp

eO(m/✏)

O(mW/✏)

y(`) + y(r) � w({`, r})

y(`) + y(r) � w({`, r})

y(r) = 0 8r 2 R \ V (M)

y(`) + y(r) � w({`, r})

y(r) = 0 8r 2 R \ V (M)

never touchexposed weights

y(`) + y(r) � w({`, r})

y(r) = 0 8r 2 R \ V (M)

bad news bears

return M

M ;

y(r) 0 8r 2 R

y(`) W 8` 2 L

repeatW times

O(m)

APX Hopcroft-Karp

eO(m/✏)

O(mW/✏)

aug. pathsare long

shift 1 unitof weight

y(`) + y(r) � w({`, r}) y(r) = 0 8r 2 R \ V (M)

O(1/✏)layers

y(`) + y(r) � w({`, r}) y(r) = 0 8r 2 R \ V (M)

O(1/✏)layers

y(`) + y(r) � w({`, r}) y(r) = 0 8r 2 R \ V (M)

O(1/✏)layers

no longer tight

y(`) + y(r) � w({`, r}) y(r) = 0 8r 2 R \ V (M)

O(1/✏)layers

artificially increase weight

y

Dualy(`) + y(r) � w({`, r}) {`, r} 2 E

y(v) � 0 v 2 L [ R

436

78

42

5

34

Primal

M

w(M) = OPT

y(`) + y(r) = w({`, r}) 8{`, r} 2 M` 2 V (M) 8` : y(`) > 0

r 2 V (M) 8r : y(r) > 0

Orthogonality

y

Dualy(`) + y(r) � w({`, r}) {`, r} 2 E

y(v) � 0 v 2 L [ R

436

78

4

25

34

Primal

M � : E ! R“excess”

y(`) + y(r) w({`, r}) + �({`, r}) 8{`, r} 2 M` 2 V (M) 8` : y(`) > 0

r 2 V (M) 8r : y(r) > 0X

e2M�(e) ✏ · w(M)

w(M) (1 + ✏) OPT

APX Orthogonality

y(`) + y(r) � w({`, r}) y(r) = 0 8r 2 R \ V (M)

O(1/✏)layers

artificially increase weight

y(`) + y(r) � w({`, r}) y(r) = 0 8r 2 R \ V (M)

O(1/✏)layers

addweightto �(e)

y(`) + y(r) � w({`, r}) y(r) = 0 8r 2 R \ V (M)

O(1/✏)layers

addweightto �(e)

choose layer that cuts✏-fraction of edges

return M

M ;

y(r) 0 8r 2 R

y(`) W 8` 2 L

repeatW times

O(m)

APX Hopcroft-Karp

eO(m/✏)

O(mW/✏)

aug. pathsare long

shift weightand cheat

return M

M ;

y(r) 0 8r 2 R

y(`) W 8` 2 L

repeatW times

O(m)

APX Hopcroft-Karp

eO(m/✏)

O(mW/✏)

aug. pathsare long

shift weightand cheat

return M

M ;

y(r) 0 8r 2 R

y(`) W 8` 2 L

repeatW times

O(m)

APX Hopcroft-Karp

eO(m/✏)

O(mW/✏)

aug. pathsare long

shift weightand cheat

(a) too slow

return M

M ;

y(r) 0 8r 2 R

y(`) W 8` 2 L

repeatW times

O(m)

APX Hopcroft-Karp

eO(m/✏)

O(mW/✏)

aug. pathsare long

shift weightand cheat

(a) too slow(b) too much cheating

Approximate scaling

1. Round up edge weights to powers of (1 + ε):

w(e) = (1 + ε)dlog(1+ε) w(e)e e ∈ EW = max

e∈Ew(e)

(1− ε)-APX w/r/t w ⇒ (1−O(ε))-APX w/r/t w

2. Operate in units of ε(1 + ε)i−1 for “scales”

i = log1+ε W , . . . , blog1+ε εc

Approximate scaling

1. Round up edge weights to powers of (1 + ε):

w(e) = (1 + ε)dlog(1+ε) w(e)e e ∈ EW = max

e∈Ew(e)

(1− ε)-APX w/r/t w ⇒ (1−O(ε))-APX w/r/t w

2. Operate in units of ε(1 + ε)i−1 for “scales”

i = log1+ε W , . . . , blog1+ε εc

return M

M ;

y(r) 0 8r 2 R

O(m)

APX Hopcroft-Karp

eO(m/✏)

aug. pathsare long

i =

8>><>>:

log1+✏fW,

...

blog1+✏ ✏c

shift ✏(1 + ✏)i�1

weight and cheaty(`) fW 8` 2 L

y(`) � (1 + ✏)i 8` 2 L

y(`) = (1 + ✏)i

8 exposed ` 2 L

O(m log2(W/✏)/✏2)

return M

M ;

y(r) 0 8r 2 R

APX Hopcroft-Karp

eO(m/✏)

aug. pathsare long

i =

8>><>>:

log1+✏fW,

...

blog1+✏ ✏c

shift ✏(1 + ✏)i�1

weight and cheaty(`) fW 8` 2 L

y(`) � (1 + ✏)i 8` 2 L

y(`) = (1 + ✏)i

8 exposed ` 2 L

✏ · ew(e) 8e 2 Mbecause

O(m)O(m log2(W/✏)/✏2)

return M

M ;

y(r) 0 8r 2 R

APX Hopcroft-Karp

eO(m/✏)

aug. pathsare long

i =

8>><>>:

log1+✏fW,

...

blog1+✏ ✏c

shift ✏(1 + ✏)i�1

weight and cheaty(`) fW 8` 2 L

y(`) � (1 + ✏)i 8` 2 L

y(`) = (1 + ✏)i

8 exposed ` 2 L

O(m log2(W/✏)/✏2)

A few more low level details

O(m log2(1/✏)/✏)2

faster

Maximum cardinality matching

- Augmenting paths

Hopcroft-Karp

- Augment in batch- Most paths are short

faster

Integral Hungarian

- primal-dual- (small) integral weights

- fixed scaling

Hungarian algo.

- primal-dual- combinatorial scaling

APX Hungarian

- APX primal-dual- exponential scaling

weighted

APX Hopcroft-Karpfaster

weighted

faster

weighted

1 2 3

4 5 6

König 1931

O(mn)Hopcroft and Karp

1973

O(mp

n)

Egerváry 1931

Kuhn 1955

O(mn) Duan and Pettie 2014

O(m/✏)

O(m/✏)

O(mp

nW )

Jacobi 1890

exact algorithm

{`, r} 2 M ) y(`) + y(r) = w({`, r}) {`, r} 2 E

y(`) > 0 ) ` 2 V (M) ` 2 L

y(r) > 0 ) r 2 V (M) r 2 R

y

Dualy(`) + y(r) � w({`, r}) {`, r} 2 E

y(v) � 0 v 2 L [ R

436

78

42

5

34

Primal

M

w(M) = OPT

Orthogonality

return M

y(`) maxe2E

w(e)8` 2 L

M ;

y(r) 0 8r 2 R

y(`) = 0for all exposed

` 2 L?

yesno

is there atight aug. path?

yes

augment

shift weight

no

O(m)' n times

O(m)'

O(mn)

n times

approximate algorithm

y

Dualy(`) + y(r) � w({`, r}) {`, r} 2 E

y(v) � 0 v 2 L [ R

436

78

4

25

34

Primal

M � : E ! R“excess”

y(`) + y(r) w({`, r}) + �({`, r}) 8{`, r} 2 M` 2 V (M) 8` : y(`) > 0

r 2 V (M) 8r : y(r) > 0X

e2M�(e) ✏ · w(M)

w(M) (1 + ✏) OPT

APX Orthogonality

return M

M ;

y(r) 0 8r 2 R

APX Hopcroft-Karp

eO(m/✏)

aug. pathsare long

i =

8>><>>:

log1+✏fW,

...

blog1+✏ ✏c

shift ✏(1 + ✏)i�1

weight and cheaty(`) fW 8` 2 L

y(`) � (1 + ✏)i 8` 2 L

y(`) = (1 + ✏)i

8 exposed ` 2 L

O(m log2(W/✏)/✏2)

A few more low level details

O(m log2(1/✏)/✏)2

Bibliography I

C. Brezovec, G. Cornuéjols, and F. Glover. Two algorithms for weightedmatroid intersection. Math. Prog., 36(1):39–53, 1986.

W. H. Cunningham. Improved bounds for matroid partition andintersection algorithms. SIAM J. Comput., 15(4):948–957, 1986.

R. Duan and S. Pettie. Linear-time approximation for maximum weightmatching. J. Assoc. Comput. Mach., 61(1), January 2014.

R. Duan and H. Su. A scaling algorithm for maximum weight matching inbipartite graphs. In Proc. 23rd ACM-SIAM Sympos. Discrete Algs.(SODA), pages 1413–1424, 2012.

A. Frank. A weighted matroid intersection algorithm. J. Algorithms, 2:328–336, 1981.

M. L. Fredman and R. E. Tarjan. Fibonacci heaps and their uses inimproved network optimization algorithms. J. Assoc. Comput. Mach.,34(3):596–615, 1987.

S. Fujishige and X. Zhang. An efficient cost scaling algorithm for theindependent assignment problem. J. Oper. Res. Soc. Japan, 38(1):124–136, 1995.

Bibliography II

J. Hopcroft and R. Karp. An n5/2 algorithm for maximum matchings inbipartite graphs. SIAM J. Comput., pages 225–231, 1973.

C. Huang, N. Kakimura, and N. Kamiyama. Exact and approximationalgorithms for weighted matroid intersection. MI Preprint Series, Math.for Industry, Kyushu University, November 2014. To appear in Proc.27th ACM-SIAM Symp. Discrete Algs. (SODA), 2016.

Y.T. Lee, A. Sidford, and S.C. Wong. A faster cutting plane method andits implications for combinatorial and convex optimization. In Proc.56th Annu. IEEE Symp. Found. Comput. Sci. (FOCS), 2015.

A. Mądry. Navigating central path with electrical flows: from flows tomatchings, and back. In Proc. 54th Annu. IEEE Symp. Found.Comput. Sci. (FOCS), pages 253–262, 2013.

A. Schrijver. Combinatorial Optimization: Polyhedra and Efficiency,volume 24 of Algorithms and Combinatorics. Springer, 2003.

top related