faster algorithms for semimatching problems
DESCRIPTION
I am finding a creative way for presenting mathematics.TRANSCRIPT
![Page 1: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/1.jpg)
Faster algorithms for min-delay time semi-matching
Bundit LaekhanukitC&O, University of Waterloo
joint work withJ. Fakcharoenphol and D. Nanongkai
![Page 2: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/2.jpg)
Agenda
● Definition of min-delay semimatching problem● Previous works & Our results● Unit cost
– Reduction to min-cost flow
– An algorithm for unit cost
● General cost– Reduction to weighted bipartite matching
– Sketch of an algorithm for general cost
![Page 3: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/3.jpg)
Semimatching on bipartite graphs
![Page 4: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/4.jpg)
U V
Matching MU V
Semimatching M'
No restrictionincident to= 1 M'-edge
incident to≤ 1 M-edge
![Page 5: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/5.jpg)
U V
u1
x
u2
y
3
z
u4
Jobs Machines
u1 u2 u3
Wait for being processed1 unit of time
u3 Wait for u1 and itself to be processed1 + 1 units of time
Unit cost
![Page 6: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/6.jpg)
U V
u1
x
u2
y
3
z
u4
Jobs Machines
u1 u2 u3
u3
Delay time at machine a = 1 + 2 + 3 units of time
Unit cost
![Page 7: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/7.jpg)
U V
u1
x
u2
y
3
z
u4
Jobs Machines
u3
Total delay time (cost of semimatching) = 6 + 1 units of time
Delay time is flow time in scheduling terminology
Unit cost
![Page 8: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/8.jpg)
U V
u1
x
u2
y
3
z
u4
Jobs Machines
u1 u2 u3
u3
Delay time at machine x = 1 + (1+2) + (1+2+3)units of time
2
1
3
2 1 3
u2 u1 u3
1 2 3Reorder to minimize delay
2
General cost
![Page 9: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/9.jpg)
Previous works & Our results
![Page 10: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/10.jpg)
Previous Works & Our results
● Unit cost
Harvey, Ladner, Lovász, and Tamir (2003) :
O(nm)-algorithm using modified Hungarian method
Our algorithm : O(n1/2m log n)
● General cost
Bruno, Coffman, and Sethi (1974) :
O(n3)-algorithm using a reduction to bipartite matching
Our algorithm : O(nm log n)
n : number of vertices, m : number of edges
![Page 11: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/11.jpg)
Unit cost
![Page 12: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/12.jpg)
Harvey et. al. reduction from unit cost semimatching to min-cost flow
![Page 13: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/13.jpg)
U V
u1
x
u2
y
3
z
u4
u3
A reduction to min-cost flow
![Page 14: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/14.jpg)
U V
u1
x
u2
y
3
z
u4
u3
s t
C1
C2
C3
Capacity = 1, Cost = 0
Infinite capacity
Capacity = 1, Cost = 0
Cost=1
Cost=2
Cost=3
A reduction to min-cost flow
Cost centers
![Page 15: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/15.jpg)
U V
u1
x
u2
y
3
z
u4
u3
s t
C1
C2
C3
Capacity = 1, Cost = 0
Infinite capacity
Capacity = 1, Cost = 0
Cost=1
Cost=3
Cost=2
Cost centers
A reduction to min-cost flow
min-cost flow = min-delay semimatching
![Page 16: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/16.jpg)
An algorithm for unit cost
![Page 17: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/17.jpg)
Running timeDirectly apply min-cost flow : O(nm log2 n)
Previous best (Harvey et. al. 2003) : O(nm)
Our algorithm : O(n1/2m log n)
![Page 18: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/18.jpg)
Use the reduction to min-cost flow and divide & conquer technique
![Page 19: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/19.jpg)
High Level Details
U tV
LowCost
s
HighCost
Start from any semimatching and construct flow
![Page 20: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/20.jpg)
High Level Details
U tV
LowCost
s
HighCost
Push flow to lowercost centers
Source and Sink can be ignored
![Page 21: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/21.jpg)
High Level Details
U V LowCost
HighCost
Divide into two subproblems and recursively solve them
U V
No residual path from G2 to G1
G1
G2
![Page 22: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/22.jpg)
U V
Start from an arbitrary semimatching
u1
u2
3
u4
u3
u5
u4
x
y
z
![Page 23: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/23.jpg)
U V
Construct a corresponding flow
u1
u2
3
u4
u3
u5
u4
Cost=1
Cost=3
Cost=2
Cost=4
t
x
y
z
C1
C2
C3
C4
s
Cost centers
![Page 24: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/24.jpg)
U V
A flow is not a cheapest
u1
u2
3
u4
u3
u5
u4
Cost=1
Cost=3
Cost=2
Cost=4
ts
C1
C2
C3
C4
x
y
z
Cost centers
![Page 25: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/25.jpg)
U V
Find a max-flow to lower cost centers
u1
u2
3
u4
u3
u5
u4
x
y
z
C1
C2
C3
C4
T'
S'
Cost centers
Source and Sink are ignored
![Page 26: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/26.jpg)
U V
An improved flow
u1
u2
3
u4
u3
u5
u4
x
y
z
C1
C2
C3
C4
Cost centers
![Page 27: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/27.jpg)
Divide & recursively solve subproblems
u1
u2
3
u4
u3
u5
u4
x
y
z
C1
C2
C3
C4
Reachable from C3 , C4 by residual paths
Not reachable from C3 , C4 by residual paths
G1
G2
Separated by min-cut
![Page 28: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/28.jpg)
Divide & recursively solve subproblems
u1
u2
3
u4
u3
u5
u4
x
y
z
C1
C2
C3
C4
Solve subproblems
Push flow in G1
G1
G2
No flow path in G2
![Page 29: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/29.jpg)
A min-cost flow
u1
u2
3
u4
u3
u5
u4
x
y
z
C1
C2
C3
C4
ts
![Page 30: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/30.jpg)
A min-delay semimatching
u1
u2
3
u4
u3
u5
u4
x
y
z
![Page 31: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/31.jpg)
Running time
![Page 32: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/32.jpg)
Running time analysis
● Push flow to lower cost centers O(n1/2m)
(Dinitz's blocking flow algorithm with analysis similar to Kazanov 1973, Even & Tarjan 1974)
● Total running time
T(n, m, c) = T(n1, m
1, c/2) + T(n
2, m
2, c/2) + O(n1/2m)
= . . . = O(n1/2m log n)
n = number of vertices, m = number of edges
c = number of cost centers ≤ n
![Page 33: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/33.jpg)
General cost
![Page 34: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/34.jpg)
Bruno et. al. reduction toweighted bipartite matching
![Page 35: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/35.jpg)
U V
u1
x
u2
y
3
z
u4
Jobs Machines
u3
Delay time at machine a = 1 + (1+2) + (1+2+3)= 3 · 1 + 2 · 2 + 1 · 3units of time
2
1
3
u2 u1 u3
1 2 3
2
A reduction to bipartite matching
![Page 36: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/36.jpg)
U V
u1
x
u2
y
3
z
u4
u3
2
1
3
2
3
5
x1
2 · 1
1 · 1
3 · 1
x2
2 · 2
1 · 2
3 · 2
x3
2 · 3
1 · 3
3 · 3
A reduction to bipartite matching
![Page 37: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/37.jpg)
u1
x3u2
y13
z1u4
u3
639
2
3
5
x1213
x24
26
z2
410
A reduction to bipartite matching
![Page 38: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/38.jpg)
u1
x3u2
y13
z1u4
u3
x1
x2
z2
10
639
2
3
5
213
42
6
4
Equivalent to assign u1, u2 to x
A reduction to bipartite matching
min-weight matching = min-delay semimatching
![Page 39: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/39.jpg)
An algorithm for general cost
![Page 40: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/40.jpg)
Running timeDirectly apply matching algorithm : O(nm2)
Previous best (Bruno et. al. 1974) : O(n3)
Our algorithm : O(nm log n)
![Page 41: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/41.jpg)
Use the reduction to bipartite matching exploit structure of potential function
![Page 42: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/42.jpg)
U
z
y
High level details
x
Copies of vertices of V
Reduce to bipartite matching
![Page 43: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/43.jpg)
U
z
y
High level details
xAugment matching byshortest augmenting paths(Edmond & Karp 1970,Tomizawa 1971)
![Page 44: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/44.jpg)
U
z
y
High level details
xCost of matching edgesare negative
- 10
7
Assign potentialfunction to make non-negativereduced cost
![Page 45: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/45.jpg)
U
z
y
High level details
xCost of matching edgesare negative
- 10
7
Use distancelabels fromprevious round as potentialfunction
![Page 46: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/46.jpg)
u1
xk
x1
xi
Distances has a break point
Distances areweakly decreasing
Distances areweakly increasing
Dual variables forx1 ,x2, ..., xk havea break point
xj is a copy of x with edge costs multiplied by j
![Page 47: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/47.jpg)
U
z
y
Data structure for fast query
x
Create datastructures ateach set forfast distancequery
Use a data structureexploiting the propertyto find a shortest augmenting path
![Page 48: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/48.jpg)
Running time analysis
● Using a special data structure, a shortest augmenting path can be found in O(n + m log n)
● Augmenting the matching n times● Total running time O(nm log n)
![Page 49: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/49.jpg)
Summary
● Unit cost– Previous best running time O(nm)
– Our running time O(n1/2m log n)
● General cost– Previous best running time O(n3)
– Our running time O(nm log n)
![Page 50: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/50.jpg)
Open ProblemsIs it possible to meet the running time of bipartite matching?
● Unit cost– The best running time O(n1/2m) (Hopcroft & Karp 1973)
– Our algorithm O(n1/2m log n)
● General cost– The running time
● O(nm) (Edmond & Karp 1970, Tomizawa 1971)● O(n1/2m log nWmax) (Gabow & Tajan 1989)
– Our algorithm O(nm log n)
![Page 51: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/51.jpg)
Thank you for your attention
![Page 52: Faster algorithms for semimatching problems](https://reader034.vdocuments.net/reader034/viewer/2022052622/558e01b51a28ab736c8b4592/html5/thumbnails/52.jpg)
Questions ?