ESI 6448 Discrete Optimization Theory - PowerPoint PPT Presentation

1 / 29
About This Presentation
Title:

ESI 6448 Discrete Optimization Theory

Description:

Bipartite (maximum cardinality) matching. can be solved efficiently by augmenting ... Start from a matching M (possibly empty) ... – PowerPoint PPT presentation

Number of Views:79
Avg rating:3.0/5.0
Slides: 30
Provided by: Min26
Category:

less

Transcript and Presenter's Notes

Title: ESI 6448 Discrete Optimization Theory


1
ESI 6448Discrete Optimization Theory
  • Section number 5643
  • Lecture 6

2
Last class
  • Bipartite (maximum cardinality) matching
  • can be solved efficiently by augmenting
  • more efficiently, by max flow solver
  • Bipartite weighted matching
  • Assignment problem
  • primal-dual method

3
Augmenting path and matching
  • Given a matching M and an augmenting path P
    w.r.t. M, M M ? P (M?P) \ (M?P) is a
    matching w/ M gt M
  • A matching M is optimal iff there is no
    augmenting path w.r.t. M

4
Bipartite matching
  • Given a bipartite graph B (V, U, E), find a
    maximum size matching in B (maximum cardinality
    matching)
  • Start from a matching M (possibly empty),
  • if an augmenting path P is found, augment M by
    replacing P?M by P\M
  • if no augmenting path is found, M is optimal
  • Augmenting path is of odd length and the graph is
    bipartite, one exposed node is in V and the other
    in U

5
Idea of algorithm
  • Idea
  • systematically search for an augmenting path by
    enumerating all possible alternating paths from
    an exposed node
  • breadth-first search simultaneous search

6
Example
2
1
1
2
2
2
6
3
5
3
3
3
4
5
4
4
1
4
6
5
5
6
6
1
7
Auxiliary digraph
1
1
1
2
2
2
3
3
3
4
4
4
5
5
5
6
6
6
  • Algorithm in Fig 10-3, PS p.224
  • O(min(V, U)E) for B (V, U, E)

8
Nonbipartite matching
  • Can we use bipartite matching solver for
    nonbipartite matching?
  • an augmenting path corresponds to a path in
    auxiliary digraph from an exposed node to a
    target node
  • But the converse does not hold!

10
9
8
7
10
9
8
7
1
2
6
5
1
2
6
5
3
4
3
4
9
Odd cycles in nonbipartite graphs
  • the only difference between bipartite and
    nonbipartite graphs
  • folding
  • when? maximum matched edges... (blossom)

1
2
3
4
11
12
13
14
9
10
8
7
6
0
w
v
10
6
5
8
7
3
2
1
4
5
9
10
Blossom
  • cycle w/ 2k1 nodes and k matched edges
  • 2 paths from v
  • basis latest common matched node the only
    node not matched with another node in the
    blossom
  • how to detect?
  • mate of current node is already matched (matched
    edge (5, 6) is used twice)

9
10
8
7
6
7
9
5
3
1
0
w
v
0
v
3
2
1
4
5
6
4
2
8
10
11
Shrinking a blossom
  • replacing a blossom b with a single node
  • G (V, E) ? G/b (V/b, E/b)
  • shrinking does not add / omit augmenting paths!

10
9
8
7
10
9
8
7
1
2
6
5
1
2
vb
b
b
3
4
3
10
9
8
7
1
vb
12
Shrinking and alternating path
  • If while searching for an augmenting path from an
    exposed node u in G w.r.t. M, we discovered a
    blossom b, then there is an alternating path from
    u to any node of b ending with a matched edge.

v
u
13
Shrinking and augmenting path
  • If while searching for an augmenting path from an
    exposed node u in G w.r.t. M, we discovered a
    blossom b, then there is an augmenting path from
    u in G w.r.t. M iff there is one from u in G/b
    w.r.t. M/b.
  • ?

uj
u
w
vb
w
u
w
u0
w
14
Shrinking and augmenting path
  • ?

uj
u
w
u0
w
u
w
vb
w
u0
u
w
uj
w
u
w
vb
w
ui
u
w
uj
w
u
w
vb
w
u0
w
15
Algorithm
  • Start from an empty matching and repeatedly
    choose an exposed vertex u to find an augmenting
    path from it
  • If a blossom is found, shrink it and continue
    search
  • If no augmenting path is found, u will never be
    chosen again, choose a different exposed node
  • If augmenting path is found, reconstruct blossom
    and backtrack the path and augment the matching

16
Example
2
1
2
1
4
3
15
4
3
15
6
8
5
9
6
8
5
9
7
17
10
11
16
7
17
10
11
16
14
13
12
14
13
12
17
Example
2
1
2
1
4
3
15
4
3
15
6
8
5
9
6
8
5
9
7
17
10
11
16
7
17
10
11
16
14
13
12
14
13
12
18
Example
2
1
2
1
4
3
15
4
3
15
6
8
5
9
18
9
7
17
10
11
16
17
10
11
14
13
12
14
13
12
19
Example
2
1
2
1
4
3
15
4
3
15
6
8
5
9
6
8
5
9
7
17
10
11
16
7
17
10
11
16
14
13
12
14
13
12
20
Analysis of algorithm
  • In G, there is no augmenting path starting from
    an exposed node u w.r.t. M. Let p be an
    augmenting path w/ endpoints two other exposed
    nodes v and w. Then there is no augmenting path
    from u w.r.t. M ? P either.

u
u
v
v
uj
w
uj
w
u
u
21
Analysis of algorithm
  • If at some state there is no augmenting path from
    a node u, then there will never be augmenting
    path from u.
  • Fig 10-13, PS p. 237
  • O(V4) time complexity

22
Dynamic programming
  • Basic idea
  • Principle of optimality piece of optimal
    solutions are themselves optimal
  • To find an optimal solution, first find optimal
    subsolution using recursion (define recurrence)
  • Example Shortest path problem
  • If the shortest path from s to t passes p,
    subpaths (s, p) and (p, t) are also shortest
    paths.
  • d(v) length of shortest path from s to v,
    thend(v) mini ?V-(v) d(i) civ

s
t
p
23
Example
  • Shortest path problem
  • recurrence
  • Dk(i) length of a shortest path from s to i
    containing at most k arcs
  • Dk(i) min Dk-1(i), mini ?V-(v) d(i) civ
  • Increasing k from 1 to n-1, using the above
    recurrence, find optimal subsolutions
  • takes O(mn) time and d(j) Dn-1(j)
  • In order to backtrack the path, we need to keep a
    matrix containing the chosen subsolution

24
Example
j
4
2
7
a
d
g
5
2
5
5
2
k
1
1
3
6
3
1
s
b
e
h
t
2
4
3
4
l
4
2
4
1
2
2
c
f
i
3
m
25
Uncapacitated lot-sizing
  • nonnegative demands dtnt1, costs of production
    ptnt1, storage htnt1, fixed set-up cost
    ftnt1
  • Find a minimum cost production plan
  • min ?nt1 ptxt ?nt1 htst ?nt1 ftyt
    st-1 xt dt st for 1 ? t ? n
    xt ? Myt for 1 ? t ? n s0 sn 0, s ?
    Rn1, x ? Rn, y ? Bn

0
x1
x5
x2
x4
x3
s1
s2
s3
s4
1
2
3
4
5
d1
d2
d3
d4
d5
26
ULS
  • two important structural properties
  • There exists an optimal solution s.t. st-1xt 0
    for all t.
  • There exists an optimal solution s.t. xt gt 0,xt
    ?tkit di for some k ? 0.
  • dit ?tji dj
  • st ?ti1 xi d1t?nt1 ptxt ?nt1 htst
    ?nt1 ptxt ?nt1 ht(?ti1 xi d1t)
    ?nt1 ctxt ?nt1 htd1t

    ct pt ?nit hiobjective function ?nt1
    ctxt ?nt1 ftyt ?nt1 htd1t
  • recurrence
  • H(k) minimum cost of a solution for periods 1,
    ..., k
  • H(k) min1 ? t ? k H(t-1) ft ctdtk, H(0)
    0

27
Example
  • n 4, d (2, 4, 5, 1), p (3, 3, 3, 3),h
    (1, 2, 1, 1), f (12, 20, 16, 8)
  • c (8, 7, 5, 4), (d11, d12, d13, d14) (2, 6,
    11, 12)?4t1htd1t 37
  • H(1) f1 c1d11 28
  • H(2) min H(0) f1 c1d12, H(1) f2
    c2d22 min H(1) c1d2, H(1) f2
    c2d2 min 60, 76 60
  • H(3) min H(0) f1 c1d13, H(1) f2
    c2d23, H(2) f3 c3d33
    min 60 c1d3, 76 c2d3, H(2) f3
    c3d3 min 100, 111, 101 100
  • H(4) min H(0) f1 c1d14, H(1) f2
    c2d24, H(2) f3 c3d34,
    H(3) f4 c4d4 min 100 c1d4, 111
    c2d4, 101 c3d4, H(3)f4c4d4 min
    108, 118, 106, 112 106
  • H(4) 106 H(2) f3 c3d34. y3 1, x3 6,
    y4 x4 0H(2) f1 c1d12, y1 1, x1 6, y2
    x2 0
  • x (6, 0, 6, 0), y (1, 0, 1, 0), s (4, 0, 1,
    0)original cost 106 37 69 6p1 f1 6p3
    f3 4h1 h3 69

28
Example
  • As a shortest path problem...
  • for (i, j), the cost fi1 ci1di1, j

108
100
46
60
28
48
41
12
0
1
2
3
4
83
90
29
Today
  • Nonbipartite matching
  • blossom makes it difficult
  • detect / shrink blossom and find augmenting path
  • Dynamic programming
  • principle of optimality
  • examples shortest path problem, ULS
Write a Comment
User Comments (0)
About PowerShow.com