GRAPH BALANCING

advertisement
GRAPH BALANCING
Scheduling on Unrelated Machines
M1
J1
J2
J3
J4
J5
M2
M3
Scheduling on Unrelated Machines
M1
M2
J1
J1
J2
J2
J3
J3
J4
J4
J5
J5
M3
Scheduling on Unrelated Machines
M1
J2
J3
M2
M3
J4
J5
J1
Makespan
Restricted Assignment
M1
J1
J2
J3
J4
J5
M2
M3
Graph Balancing






Special case of Restricted Assignment
Each job can be scheduled on at most 2 machines
Machines vertices
Jobs  edges
Assign dedicated loads to vertices
Problem is to orient the edges
Graph Balancing
6
2
2
2
6
5
1
2
4
5
3
2
5
1
5
1
2
Graph Balancing Summary








Given: weighted multigraph (V, E, p, q)
V : Vertices  Machines
E : Edges  Jobs
eE, pe = processing time of job e
vV, qv = dedicated load on vertex v
Output: Orientation of edges :E V
such that (e)  e
Loadv = qv + e:v = (e) pe
Objective: Minimize maximum load
Optimization  Decision Problem


-relaxed decision procedure
Is there any orientation with maximum load at most
d?
 Answer:
 “NO”
 Orientation

with maximum load at most d.
Binary search for d and scale everything
appropriately
2-approximation LP

Find values xev  0, for each e and ve, such that
each e  E, u,ve:
xeu + xev = 1
 For each v  V:
qv + e:ve xev pe  1
 For
2-Relaxed Decision Procedure





Solve LP in polynomial time.
If not feasible, return “NO”
If feasible, round solution using rotation and tree
assignment
After rounding, the maximum load is at most 2
For rounding, decompose the graph as
 Cycles
 Trees
Rotation

𝑝𝑟𝑜𝑐𝑒𝑑𝑢𝑟𝑒 𝑅𝑜𝑡𝑎𝑡𝑒(𝑥, 𝐶)
𝑓𝑜𝑟 𝑎𝑙𝑙 𝑒𝑑𝑔𝑒𝑠 𝑒 𝑖𝑛 𝐶, 𝑒
𝑑𝑖𝑟𝑒𝑐𝑡𝑒𝑑 𝑓𝑟𝑜𝑚 𝑢 𝑡𝑜 𝑣 ∶
• 𝐷𝑒 ∶= 𝑥𝑒𝑢𝑝𝑒
•
𝐷 ∶= min 𝐷𝑒
 𝑓𝑜𝑟 𝑎𝑙𝑙 𝑒𝑑𝑔𝑒𝑠 𝑒 𝑖𝑛 𝐶, 𝑒
𝑑𝑖𝑟𝑒𝑐𝑡𝑒𝑑 𝑓𝑟𝑜𝑚 𝑢 𝑡𝑜 𝑣 ∶
•

•
𝑥𝑒𝑢 ∶=
•
𝑥𝑒𝑣 ∶=
𝑟𝑒𝑡𝑢𝑟𝑛 𝑥
𝐷
𝑥𝑒𝑢 −
𝑝𝑒
𝐷
𝑥𝑒𝑣 +
𝑝𝑒
.125
.15
.5
1/4
.5
1/4
.6
.3
1/2
.1
.7
.4
.5
.4
.25
1/2
.5
1/3
.6
.6
.3
.4
1/2
.2
Rotation

𝑝𝑟𝑜𝑐𝑒𝑑𝑢𝑟𝑒 𝑅𝑜𝑡𝑎𝑡𝑒(𝑥, 𝐶)
𝑓𝑜𝑟 𝑎𝑙𝑙 𝑒𝑑𝑔𝑒𝑠 𝑒 𝑖𝑛 𝐶, 𝑒
𝑑𝑖𝑟𝑒𝑐𝑡𝑒𝑑 𝑓𝑟𝑜𝑚 𝑢 𝑡𝑜 𝑣 ∶
• 𝐷𝑒 ∶= 𝑥𝑒𝑢𝑝𝑒
•
𝐷 ∶= min 𝐷𝑒
 𝑓𝑜𝑟 𝑎𝑙𝑙 𝑒𝑑𝑔𝑒𝑠 𝑒 𝑖𝑛 𝐶, 𝑒
𝑑𝑖𝑟𝑒𝑐𝑡𝑒𝑑 𝑓𝑟𝑜𝑚 𝑢 𝑡𝑜 𝑣 ∶
•

•
𝑥𝑒𝑢 ∶=
•
𝑥𝑒𝑣 ∶=
𝑟𝑒𝑡𝑢𝑟𝑛 𝑥
𝐷
𝑥𝑒𝑢 −
𝑝𝑒
𝐷
𝑥𝑒𝑣 +
𝑝𝑒
.9
1/4
.1
1/4
1
.1
1/2
.9
0
.3
1/2
.7
.7
.3
.4
.6
1/2
1/3
Rotation



Increases the number of integral solutions.
Breaks the fractional cycles.
Unchanged after rotation
 (xeu



+ xev) for all edges e
(e:v e xev pe) for all vertices v
Maximum load after rotation is  1.
After all fractional cycles are broken, only
fractional trees remain
Tree Assignment
 1
1
 1
 1
1
 1
1
1
1
 1
1
 1
1
Tree Assignment
 1
2
 1
 1
1
 1
2
2
2
 1
2
 1
2
Integrality Gap
1− ϵ
1
1− ϵ
v
`
1− ϵ
1− ϵ
1− ϵ
1− ϵ
1
Big edges (𝑝𝑒 > 1/2)
> 1/2
> 1/2
> 1/2
>1/2
>1/2
>1/2
>1/2
Big trees constraint
>1/2
>1/2
>1/2
>1/2
>1/2
>1/2
(𝑣,𝑒)∈𝐿(𝑇) 𝑥𝑒𝑣 𝑝𝑒
≥
(𝑣,𝑒)∈𝐿(𝑇) 𝑝𝑒
−1
1.75-approximation

Find values xev  0, for each e and ve, such
that
 For
each e  E, u,v e:
xeu + xev = 1
 For each v  V:
qv + e:v e xev pe  1
 For each T  GB (graph induced on big edges)
(𝑣,𝑒)∈𝐿(𝑇) 𝑥𝑒𝑣 𝑝𝑒
≥
(𝑣,𝑒)∈𝐿(𝑇) 𝑝𝑒
−1
Algorithm

>1/2
𝑤ℎ𝑖𝑙𝑒 𝐺𝑥 ℎ𝑎𝑠 𝑎𝑛 𝑒𝑑𝑔𝑒 𝑑𝑜 ∶
 𝑖𝑓 𝐺𝑥 ℎ𝑎𝑠 𝑎 𝑙𝑒𝑎𝑓 𝑝𝑎𝑖𝑟>1/2𝑣, 𝑒 :
>1/2
 𝐿𝑒𝑡 𝑢, 𝑣 ∈ 𝑒
>1/2
v
>1/2
 𝑖𝑓 𝑥𝑒𝑢 𝑝𝑒 ≤ 0.75 ∶
 (𝑥𝑒𝑣 , 𝑥𝑒𝑢) ∶= (1, 0) >1/2
v
 𝑒𝑙𝑠𝑒 ∶
𝑥
 𝐿𝑒𝑡 𝑇 𝑉′, 𝐸′ 𝑏𝑒 𝑡ℎ𝑒 𝑐𝑜𝑚𝑝𝑜𝑛𝑒𝑛𝑡 𝑜𝑓 𝐺𝐵 𝑐𝑜𝑛𝑡𝑎𝑖𝑛𝑖𝑛𝑔 𝑒
 t𝑎𝑘𝑖𝑛𝑔 𝑒 𝑎𝑠 𝑟𝑜𝑜𝑡 𝑎𝑙𝑖𝑔𝑛 𝑎𝑙𝑙 𝑒𝑑𝑔𝑒𝑠 𝑎𝑤𝑎𝑦 𝑓𝑟𝑜𝑚 𝑖𝑡.
 𝑒𝑙𝑠𝑒 ∶
 𝐹𝑖𝑛𝑑 𝑎 𝑑𝑖𝑟𝑒𝑐𝑡𝑒𝑑 𝑐𝑦𝑐𝑙𝑒 𝐶 𝑜𝑓 𝑏𝑖𝑔 𝑒𝑑𝑔𝑒𝑠 𝑖𝑓 𝑝𝑜𝑠𝑠𝑖𝑏𝑙𝑒
 𝑅𝑜𝑡𝑎𝑡𝑒(𝑥, 𝐶)
.9
.1
1
.
1
.
9
0
.3
.7
.7
.3
.4
.6
Invariants

At any stage of iteration:
𝑙𝑜𝑎𝑑 𝑣 ≤ 1.75.
 𝑙𝑜𝑎𝑑 𝑣 ≤ 1.25, If 𝑣 is incident to any edge in 𝐺𝑥 .
 𝑙𝑜𝑎𝑑 𝑣 ≤ 1, If 𝑣 is incident to any big edge in 𝐺𝑥 .
 Big tree constraint is not violated.

Algorithm

𝑤ℎ𝑖𝑙𝑒
𝐺 ℎ𝑎𝑠 𝑎𝑛 𝑒𝑑𝑔𝑒 𝑑𝑜 ∶
1: e is a big edge (pe >= 0.5)
Since𝑥 xeupe > 0.75, e is definitely a Case
big edge
in u’
load
e – xa
evp
e = xeupe <= 0.75
vertex
u’ in the
tree T,
joining
to v=ispalso
subtree
 𝑖𝑓For
𝐺𝑥any
ℎ𝑎𝑠
𝑎 𝑙𝑒𝑎𝑓
𝑝𝑎𝑖𝑟
𝑣,the
𝑒 path
: Increase
of GB
Case 2: e is not a big edge (pe < 0.5)
 By
𝐿𝑒𝑡
𝑢, 𝑣constraint,
∈𝑒
the tree
Increase in load = pe – xevpe < pe < 0.5
xe’u’𝑒pe’≤>=
pe +∶pe’ -1
 x𝑖𝑓
0.75
evp𝑥
e +
𝑒𝑢 𝑝
pe’ – xe’u’pe’ <= 1 – (pe - xevpe)
 (𝑥𝑒𝑣 , 𝑥𝑒𝑢) ∶= (1, 0)
Increase
in load <= 0.25
 𝑒𝑙𝑠𝑒 ∶
𝑥
 𝐿𝑒𝑡 𝑇 𝑉′, 𝐸′ 𝑏𝑒 𝑡ℎ𝑒 𝑐𝑜𝑚𝑝𝑜𝑛𝑒𝑛𝑡 𝑜𝑓 𝐺𝐵 𝑐𝑜𝑛𝑡𝑎𝑖𝑛𝑖𝑛𝑔 𝑒
 t𝑎𝑘𝑖𝑛𝑔 𝑟 𝑎𝑠 𝑟𝑜𝑜𝑡 𝑎𝑙𝑖𝑔𝑛 𝑎𝑙𝑙 𝑒𝑑𝑔𝑒𝑠 𝑎𝑤𝑎𝑦 𝑓𝑟𝑜𝑚 𝑖𝑡.
 𝑒𝑙𝑠𝑒 ∶
 𝐹𝑖𝑛𝑑 𝑎 𝑑𝑖𝑟𝑒𝑐𝑡𝑒𝑑 𝑐𝑦𝑐𝑙𝑒 𝐶 𝑜𝑓 𝑏𝑖𝑔 𝑒𝑑𝑔𝑒𝑠 𝑖𝑓 𝑝𝑜𝑠𝑠𝑖𝑏𝑙𝑒
 𝑅𝑜𝑡𝑎𝑡𝑒(𝑥, 𝐶)
Integrality gap
.25
.5 − ϵ
1
v
`
.25
.25
1
1
.25
.25
1
1
v
`
.25
.5 − ϵ
.25
1
.25
.25
.25
1
.25
.5 − ϵ
1
.25
.25
.5 − ϵ
.5 − ϵ
.25
1
.25
.25
1
v
`
.25
.25
.25
1
.5 − ϵ
.25
1
Download