48
Jannik Matuschke February 6, 2017 Lecture: Approximation Algorithms

Lecture: ApproximationAlgorithms · 2017. 2. 6. · Algorithm r U = 3,∆ ≡1 Main Algorithm 1 computeMSTS 2 computeUFL approximationF00 3 turntreesintotours I relieveoverloaded

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Lecture: ApproximationAlgorithms · 2017. 2. 6. · Algorithm r U = 3,∆ ≡1 Main Algorithm 1 computeMSTS 2 computeUFL approximationF00 3 turntreesintotours I relieveoverloaded

Jannik Matuschke

February 6, 2017

Lecture: Approximation AlgorithmsLecture: Approximation Algorithms

Page 2: Lecture: ApproximationAlgorithms · 2017. 2. 6. · Algorithm r U = 3,∆ ≡1 Main Algorithm 1 computeMSTS 2 computeUFL approximationF00 3 turntreesintotours I relieveoverloaded

Approximation of Metrics byTrees

Page 3: Lecture: ApproximationAlgorithms · 2017. 2. 6. · Algorithm r U = 3,∆ ≡1 Main Algorithm 1 computeMSTS 2 computeUFL approximationF00 3 turntreesintotours I relieveoverloaded

Tree metric approximation

TheoremGiven a metric d on V , there is a randomized polynomial timealgorithm that computes a random tree metric dT ,` on V such that

d(u, v) ≤ dT ,`(u, v) and E[dT ,`(u, v)] ≤ O(log |V |)d(u, v)

for all u, v ∈ V .

Page 4: Lecture: ApproximationAlgorithms · 2017. 2. 6. · Algorithm r U = 3,∆ ≡1 Main Algorithm 1 computeMSTS 2 computeUFL approximationF00 3 turntreesintotours I relieveoverloaded

Tree metric approximation forBuy-at-bulk

Network Design

Page 5: Lecture: ApproximationAlgorithms · 2017. 2. 6. · Algorithm r U = 3,∆ ≡1 Main Algorithm 1 computeMSTS 2 computeUFL approximationF00 3 turntreesintotours I relieveoverloaded

Buy-at-bulk Network Design

Input: graph G = (V , E ), lengths ` : E → R+,terminal pairs si , ti and demands ∆i for i ∈ [k],non-decreasing cost function f : R+ → R+ withf (0) = 0 and f (x + y) ≤ f (x) + f (y)

Task: find paths Pi for i ∈ [k] minimizing∑

e∈E `ef (∆e)with ∆e :=

∑i∈[k]:e∈Pi ∆i

f (x)

Page 6: Lecture: ApproximationAlgorithms · 2017. 2. 6. · Algorithm r U = 3,∆ ≡1 Main Algorithm 1 computeMSTS 2 computeUFL approximationF00 3 turntreesintotours I relieveoverloaded

Buy-at-bulk Network Design

Input: graph G = (V , E ), lengths ` : E → R+,terminal pairs si , ti and demands ∆i for i ∈ [k],non-decreasing cost function f : R+ → R+ withf (0) = 0 and f (x + y) ≤ f (x) + f (y)

Task: find paths Pi for i ∈ [k] minimizing∑

e∈E `ef (∆e)with ∆e :=

∑i∈[k]:e∈Pi ∆i

f (x)

Page 7: Lecture: ApproximationAlgorithms · 2017. 2. 6. · Algorithm r U = 3,∆ ≡1 Main Algorithm 1 computeMSTS 2 computeUFL approximationF00 3 turntreesintotours I relieveoverloaded

AlgorithmAlgorithm

1 Approximate the metric dG,` by a tree metric dT ,`′ .2 For every i ∈ [k]:

I Let Ti = (v0, . . . , vn) be the unique si -ti -path in T .I For u, v ∈ V let Puv be a shortest u-v -path in G .I Let Pi be a simple path in the concatenation

Pv0v1 ◦ . . . ◦ Pvn−1vn .3 Return (Pi )i∈[k].

ti

si

si

P i

ti

Page 8: Lecture: ApproximationAlgorithms · 2017. 2. 6. · Algorithm r U = 3,∆ ≡1 Main Algorithm 1 computeMSTS 2 computeUFL approximationF00 3 turntreesintotours I relieveoverloaded

AlgorithmAlgorithm

1 Approximate the metric dG,` by a tree metric dT ,`′ .2 For every i ∈ [k]:

I Let Ti = (v0, . . . , vn) be the unique si -ti -path in T .I For u, v ∈ V let Puv be a shortest u-v -path in G .I Let Pi be a simple path in the concatenation

Pv0v1 ◦ . . . ◦ Pvn−1vn .3 Return (Pi )i∈[k].

ti

si

si

P i

ti

Page 9: Lecture: ApproximationAlgorithms · 2017. 2. 6. · Algorithm r U = 3,∆ ≡1 Main Algorithm 1 computeMSTS 2 computeUFL approximationF00 3 turntreesintotours I relieveoverloaded

Analysis

TheoremThe algorithm is a randomized O(log |V |)-approximation algorithmfor Buy-at-bulk Network Design.

Proof:

E [ALG] ≤ E

∑e∈T

`′ef (∆′e)

← cost of ALG in T

≤ E

∑e∈T

`′ef (∆̄e)

← cost of OPT in T

≤ O(log |V |)OPT

Page 10: Lecture: ApproximationAlgorithms · 2017. 2. 6. · Algorithm r U = 3,∆ ≡1 Main Algorithm 1 computeMSTS 2 computeUFL approximationF00 3 turntreesintotours I relieveoverloaded

Today you learnt ...

ti

si

Life is less complicated on a tree (metric).

Page 11: Lecture: ApproximationAlgorithms · 2017. 2. 6. · Algorithm r U = 3,∆ ≡1 Main Algorithm 1 computeMSTS 2 computeUFL approximationF00 3 turntreesintotours I relieveoverloaded

Combining twoApproximation Algorithms:

Location Routing

Page 12: Lecture: ApproximationAlgorithms · 2017. 2. 6. · Algorithm r U = 3,∆ ≡1 Main Algorithm 1 computeMSTS 2 computeUFL approximationF00 3 turntreesintotours I relieveoverloaded

Location + Routing = Location RoutingLocation + Routing = Location Routing

facility location

Logistics

vehicle routing

location routing

Logistics

+

Page 13: Lecture: ApproximationAlgorithms · 2017. 2. 6. · Algorithm r U = 3,∆ ≡1 Main Algorithm 1 computeMSTS 2 computeUFL approximationF00 3 turntreesintotours I relieveoverloaded

Location + Routing = Location RoutingLocation + Routing = Location Routing

facility location

Logistics

vehicle routing

location routing

Logistics

+

Page 14: Lecture: ApproximationAlgorithms · 2017. 2. 6. · Algorithm r U = 3,∆ ≡1 Main Algorithm 1 computeMSTS 2 computeUFL approximationF00 3 turntreesintotours I relieveoverloaded

Location Routing

Input: facilities F , clients C , metric d on F ∪ C , openingcosts f ∈ RF

+, demands ∆ ∈ RC+, vehicle capacity U

Task: find a set of facilities F ′ ⊆ F and a collection oftours T such that

I every tour contains a facility from F ′,I every client contained in a tour,I total demand in each tour is at most U

minimizing∑

w∈F ′ fw +∑

T∈T d(T )

Page 15: Lecture: ApproximationAlgorithms · 2017. 2. 6. · Algorithm r U = 3,∆ ≡1 Main Algorithm 1 computeMSTS 2 computeUFL approximationF00 3 turntreesintotours I relieveoverloaded

Location Routing

Input: facilities F , clients C , metric d on F ∪ C , openingcosts f ∈ RF

+, demands ∆ ∈ RC+, vehicle capacity U

Task: find a set of facilities F ′ ⊆ F and a collection oftours T such that

I every tour contains a facility from F ′,I every client contained in a tour,I total demand in each tour is at most U

minimizing∑

w∈F ′ fw +∑

T∈T d(T )

Page 16: Lecture: ApproximationAlgorithms · 2017. 2. 6. · Algorithm r U = 3,∆ ≡1 Main Algorithm 1 computeMSTS 2 computeUFL approximationF00 3 turntreesintotours I relieveoverloaded

Location Routing

Input: facilities F , clients C , metric d on F ∪ C , openingcosts f ∈ RF

+, demands ∆ ∈ RC+, vehicle capacity U

Task: find a set of facilities F ′ ⊆ F and a collection oftours T such that

I every tour contains a facility from F ′,I every client contained in a tour,I total demand in each tour is at most U

minimizing∑

w∈F ′ fw +∑

T∈T d(T )

Page 17: Lecture: ApproximationAlgorithms · 2017. 2. 6. · Algorithm r U = 3,∆ ≡1 Main Algorithm 1 computeMSTS 2 computeUFL approximationF00 3 turntreesintotours I relieveoverloaded

Bound 1: Minimum Spanning TreeConstruct graph G ′ with edge weights d ′:

r

0

d(v , w) + fw

d(v , w)

I vertices F ∪ C ∪ {r}

I edge {v , w} for each v , w ∈ Cweight: d(v , w)

I edge {v , w} for each v ∈ C , w ∈ Fweight: d(v , w) + fw

I edge {r , w} for each w ∈ Fweight: 0

LemmaLet S be a minimum spanning tree in G ′ w.r.t. d ′.Then d ′(S) ≤ OPT .

Page 18: Lecture: ApproximationAlgorithms · 2017. 2. 6. · Algorithm r U = 3,∆ ≡1 Main Algorithm 1 computeMSTS 2 computeUFL approximationF00 3 turntreesintotours I relieveoverloaded

Bound 1: Minimum Spanning TreeConstruct graph G ′ with edge weights d ′:

r

0

d(v , w) + fw

d(v , w)

I vertices F ∪ C ∪ {r}I edge {v , w} for each v , w ∈ C

weight: d(v , w)

I edge {v , w} for each v ∈ C , w ∈ Fweight: d(v , w) + fw

I edge {r , w} for each w ∈ Fweight: 0

LemmaLet S be a minimum spanning tree in G ′ w.r.t. d ′.Then d ′(S) ≤ OPT .

Page 19: Lecture: ApproximationAlgorithms · 2017. 2. 6. · Algorithm r U = 3,∆ ≡1 Main Algorithm 1 computeMSTS 2 computeUFL approximationF00 3 turntreesintotours I relieveoverloaded

Bound 1: Minimum Spanning TreeConstruct graph G ′ with edge weights d ′:

r

0

d(v , w) + fw

d(v , w)

I vertices F ∪ C ∪ {r}I edge {v , w} for each v , w ∈ C

weight: d(v , w)I edge {v , w} for each v ∈ C , w ∈ F

weight: d(v , w) + fw

I edge {r , w} for each w ∈ Fweight: 0

LemmaLet S be a minimum spanning tree in G ′ w.r.t. d ′.Then d ′(S) ≤ OPT .

Page 20: Lecture: ApproximationAlgorithms · 2017. 2. 6. · Algorithm r U = 3,∆ ≡1 Main Algorithm 1 computeMSTS 2 computeUFL approximationF00 3 turntreesintotours I relieveoverloaded

Bound 1: Minimum Spanning TreeConstruct graph G ′ with edge weights d ′:

r0

d(v , w) + fw

d(v , w)

I vertices F ∪ C ∪ {r}I edge {v , w} for each v , w ∈ C

weight: d(v , w)I edge {v , w} for each v ∈ C , w ∈ F

weight: d(v , w) + fwI edge {r , w} for each w ∈ F

weight: 0

LemmaLet S be a minimum spanning tree in G ′ w.r.t. d ′.Then d ′(S) ≤ OPT .

Page 21: Lecture: ApproximationAlgorithms · 2017. 2. 6. · Algorithm r U = 3,∆ ≡1 Main Algorithm 1 computeMSTS 2 computeUFL approximationF00 3 turntreesintotours I relieveoverloaded

Bound 1: Minimum Spanning TreeConstruct graph G ′ with edge weights d ′:

r0

d(v , w) + fw

d(v , w)

I vertices F ∪ C ∪ {r}I edge {v , w} for each v , w ∈ C

weight: d(v , w)I edge {v , w} for each v ∈ C , w ∈ F

weight: d(v , w) + fwI edge {r , w} for each w ∈ F

weight: 0

LemmaLet S be a minimum spanning tree in G ′ w.r.t. d ′.Then d ′(S) ≤ OPT .

Page 22: Lecture: ApproximationAlgorithms · 2017. 2. 6. · Algorithm r U = 3,∆ ≡1 Main Algorithm 1 computeMSTS 2 computeUFL approximationF00 3 turntreesintotours I relieveoverloaded

Bound 1: Minimum Spanning TreeConstruct graph G ′ with edge weights d ′:

r0

d(v , w) + fw

d(v , w)

I vertices F ∪ C ∪ {r}I edge {v , w} for each v , w ∈ C

weight: d(v , w)I edge {v , w} for each v ∈ C , w ∈ F

weight: d(v , w) + fwI edge {r , w} for each w ∈ F

weight: 0

LemmaLet S be a minimum spanning tree in G ′ w.r.t. d ′.Then d ′(S) ≤ OPT .

Page 23: Lecture: ApproximationAlgorithms · 2017. 2. 6. · Algorithm r U = 3,∆ ≡1 Main Algorithm 1 computeMSTS 2 computeUFL approximationF00 3 turntreesintotours I relieveoverloaded

Bound 1: Minimum Spanning TreeConstruct graph G ′ with edge weights d ′:

r0

d(v , w) + fw

d(v , w)

I vertices F ∪ C ∪ {r}I edge {v , w} for each v , w ∈ C

weight: d(v , w)I edge {v , w} for each v ∈ C , w ∈ F

weight: d(v , w) + fwI edge {r , w} for each w ∈ F

weight: 0

LemmaLet S be a minimum spanning tree in G ′ w.r.t. d ′.Then d ′(S) ≤ OPT .

Page 24: Lecture: ApproximationAlgorithms · 2017. 2. 6. · Algorithm r U = 3,∆ ≡1 Main Algorithm 1 computeMSTS 2 computeUFL approximationF00 3 turntreesintotours I relieveoverloaded

Bound 1: Minimum Spanning TreeConstruct graph G ′ with edge weights d ′:

r0

d(v , w) + fw

d(v , w)

I vertices F ∪ C ∪ {r}I edge {v , w} for each v , w ∈ C

weight: d(v , w)I edge {v , w} for each v ∈ C , w ∈ F

weight: d(v , w) + fwI edge {r , w} for each w ∈ F

weight: 0

LemmaLet S be a minimum spanning tree in G ′ w.r.t. d ′.Then d ′(S) ≤ OPT .

Page 25: Lecture: ApproximationAlgorithms · 2017. 2. 6. · Algorithm r U = 3,∆ ≡1 Main Algorithm 1 computeMSTS 2 computeUFL approximationF00 3 turntreesintotours I relieveoverloaded

Bound 1: Minimum Spanning TreeConstruct graph G ′ with edge weights d ′:

r0

d(v , w) + fw

d(v , w)

I vertices F ∪ C ∪ {r}I edge {v , w} for each v , w ∈ C

weight: d(v , w)I edge {v , w} for each v ∈ C , w ∈ F

weight: d(v , w) + fwI edge {r , w} for each w ∈ F

weight: 0

LemmaLet S be a minimum spanning tree in G ′ w.r.t. d ′.Then d ′(S) ≤ OPT .

Page 26: Lecture: ApproximationAlgorithms · 2017. 2. 6. · Algorithm r U = 3,∆ ≡1 Main Algorithm 1 computeMSTS 2 computeUFL approximationF00 3 turntreesintotours I relieveoverloaded

Bound 2: Uncapacitated Facility Location

I construct UFL instance with clients C , facilities F , openingcosts f , and connection costs d ′′vw = 2∆v

U d(v , w)

LemmaLet F ′′ ⊆ F be an optimal solution to the UFL instance.Then

∑w∈F ′′ fw +

∑v∈C d ′′(v , F ) ≤ OPT .

Proof: Let (F ∗, T ∗) be optimal LR solution. Consider T ∈ T ∗:

wT

v

d ′′vwT = 2∆vU d(v , wT ) ≤ ∆v

U d(T ) ∀ v ∈ V (T )

∑v∈V (T )

d ′′vwT ≤

∑v∈V (T )

∆vU

︸ ︷︷ ︸

≤1

d(T )

∑v∈C

d ′′(v , F ∗) ≤∑

T∈T ∗

∑v∈V (T )

d ′′(v , wT ) ≤∑

T∈T ∗d(T )

Page 27: Lecture: ApproximationAlgorithms · 2017. 2. 6. · Algorithm r U = 3,∆ ≡1 Main Algorithm 1 computeMSTS 2 computeUFL approximationF00 3 turntreesintotours I relieveoverloaded

Bound 2: Uncapacitated Facility Location

I construct UFL instance with clients C , facilities F , openingcosts f , and connection costs d ′′vw = 2∆v

U d(v , w)

LemmaLet F ′′ ⊆ F be an optimal solution to the UFL instance.Then

∑w∈F ′′ fw +

∑v∈C d ′′(v , F ) ≤ OPT .

Proof: Let (F ∗, T ∗) be optimal LR solution. Consider T ∈ T ∗:

wT

v

d ′′vwT = 2∆vU d(v , wT ) ≤ ∆v

U d(T ) ∀ v ∈ V (T )

∑v∈V (T )

d ′′vwT ≤

∑v∈V (T )

∆vU

︸ ︷︷ ︸

≤1

d(T )

∑v∈C

d ′′(v , F ∗) ≤∑

T∈T ∗

∑v∈V (T )

d ′′(v , wT ) ≤∑

T∈T ∗d(T )

Page 28: Lecture: ApproximationAlgorithms · 2017. 2. 6. · Algorithm r U = 3,∆ ≡1 Main Algorithm 1 computeMSTS 2 computeUFL approximationF00 3 turntreesintotours I relieveoverloaded

Bound 2: Uncapacitated Facility Location

I construct UFL instance with clients C , facilities F , openingcosts f , and connection costs d ′′vw = 2∆v

U d(v , w)

LemmaLet F ′′ ⊆ F be an optimal solution to the UFL instance.Then

∑w∈F ′′ fw +

∑v∈C d ′′(v , F ) ≤ OPT .

Proof: Let (F ∗, T ∗) be optimal LR solution. Consider T ∈ T ∗:

wT

v

d ′′vwT = 2∆vU d(v , wT ) ≤ ∆v

U d(T ) ∀ v ∈ V (T )

∑v∈V (T )

d ′′vwT ≤

∑v∈V (T )

∆vU

︸ ︷︷ ︸

≤1

d(T )

∑v∈C

d ′′(v , F ∗) ≤∑

T∈T ∗

∑v∈V (T )

d ′′(v , wT ) ≤∑

T∈T ∗d(T )

Page 29: Lecture: ApproximationAlgorithms · 2017. 2. 6. · Algorithm r U = 3,∆ ≡1 Main Algorithm 1 computeMSTS 2 computeUFL approximationF00 3 turntreesintotours I relieveoverloaded

Bound 2: Uncapacitated Facility Location

I construct UFL instance with clients C , facilities F , openingcosts f , and connection costs d ′′vw = 2∆v

U d(v , w)

LemmaLet F ′′ ⊆ F be an optimal solution to the UFL instance.Then

∑w∈F ′′ fw +

∑v∈C d ′′(v , F ) ≤ OPT .

Proof: Let (F ∗, T ∗) be optimal LR solution. Consider T ∈ T ∗:

wT

v

d ′′vwT = 2∆vU d(v , wT ) ≤ ∆v

U d(T ) ∀ v ∈ V (T )

∑v∈V (T )

d ′′vwT ≤

∑v∈V (T )

∆vU

︸ ︷︷ ︸

≤1

d(T )

∑v∈C

d ′′(v , F ∗) ≤∑

T∈T ∗

∑v∈V (T )

d ′′(v , wT ) ≤∑

T∈T ∗d(T )

Page 30: Lecture: ApproximationAlgorithms · 2017. 2. 6. · Algorithm r U = 3,∆ ≡1 Main Algorithm 1 computeMSTS 2 computeUFL approximationF00 3 turntreesintotours I relieveoverloaded

Bound 2: Uncapacitated Facility Location

I construct UFL instance with clients C , facilities F , openingcosts f , and connection costs d ′′vw = 2∆v

U d(v , w)

LemmaLet F ′′ ⊆ F be an optimal solution to the UFL instance.Then

∑w∈F ′′ fw +

∑v∈C d ′′(v , F ) ≤ OPT .

Proof: Let (F ∗, T ∗) be optimal LR solution. Consider T ∈ T ∗:

wT

vd ′′vwT = 2∆v

U d(v , wT ) ≤ ∆vU d(T ) ∀ v ∈ V (T )

∑v∈V (T )

d ′′vwT ≤

∑v∈V (T )

∆vU

︸ ︷︷ ︸

≤1

d(T )

∑v∈C

d ′′(v , F ∗) ≤∑

T∈T ∗

∑v∈V (T )

d ′′(v , wT ) ≤∑

T∈T ∗d(T )

Page 31: Lecture: ApproximationAlgorithms · 2017. 2. 6. · Algorithm r U = 3,∆ ≡1 Main Algorithm 1 computeMSTS 2 computeUFL approximationF00 3 turntreesintotours I relieveoverloaded

Bound 2: Uncapacitated Facility Location

I construct UFL instance with clients C , facilities F , openingcosts f , and connection costs d ′′vw = 2∆v

U d(v , w)

LemmaLet F ′′ ⊆ F be an optimal solution to the UFL instance.Then

∑w∈F ′′ fw +

∑v∈C d ′′(v , F ) ≤ OPT .

Proof: Let (F ∗, T ∗) be optimal LR solution. Consider T ∈ T ∗:

wT

vd ′′vwT = 2∆v

U d(v , wT ) ≤ ∆vU d(T ) ∀ v ∈ V (T )

∑v∈V (T )

d ′′vwT ≤

∑v∈V (T )

∆vU

︸ ︷︷ ︸

≤1

d(T )

∑v∈C

d ′′(v , F ∗) ≤∑

T∈T ∗

∑v∈V (T )

d ′′(v , wT ) ≤∑

T∈T ∗d(T )

Page 32: Lecture: ApproximationAlgorithms · 2017. 2. 6. · Algorithm r U = 3,∆ ≡1 Main Algorithm 1 computeMSTS 2 computeUFL approximationF00 3 turntreesintotours I relieveoverloaded

Bound 2: Uncapacitated Facility Location

I construct UFL instance with clients C , facilities F , openingcosts f , and connection costs d ′′vw = 2∆v

U d(v , w)

LemmaLet F ′′ ⊆ F be an optimal solution to the UFL instance.Then

∑w∈F ′′ fw +

∑v∈C d ′′(v , F ) ≤ OPT .

Proof: Let (F ∗, T ∗) be optimal LR solution. Consider T ∈ T ∗:

wT

vd ′′vwT = 2∆v

U d(v , wT ) ≤ ∆vU d(T ) ∀ v ∈ V (T )

∑v∈V (T )

d ′′vwT ≤

∑v∈V (T )

∆vU

︸ ︷︷ ︸

≤1

d(T )

∑v∈C

d ′′(v , F ∗) ≤∑

T∈T ∗

∑v∈V (T )

d ′′(v , wT ) ≤∑

T∈T ∗d(T )

Page 33: Lecture: ApproximationAlgorithms · 2017. 2. 6. · Algorithm r U = 3,∆ ≡1 Main Algorithm 1 computeMSTS 2 computeUFL approximationF00 3 turntreesintotours I relieveoverloaded

Algorithm

r

U = 3, ∆ ≡ 1

Main Algorithm1 compute MST S

2 compute UFLapproximation F ′′

3 turn trees into tours

I relieve overloadedsubtree using F ′′

I double edges,shortcut

Subprocedure: relieve overloaded subtree

1 find node v with ∆(Sv ) > Ubut ∆(Sw ) ≤ U for all children w of v

2 partition subtrees of v into groups with demand between U/2and U (except for the one containing v)

3 for each group find nearest open facility

Page 34: Lecture: ApproximationAlgorithms · 2017. 2. 6. · Algorithm r U = 3,∆ ≡1 Main Algorithm 1 computeMSTS 2 computeUFL approximationF00 3 turntreesintotours I relieveoverloaded

Algorithm

r

U = 3, ∆ ≡ 1

Main Algorithm1 compute MST S2 compute UFL

approximation F ′′

3 turn trees into tours

I relieve overloadedsubtree using F ′′

I double edges,shortcut

Subprocedure: relieve overloaded subtree

1 find node v with ∆(Sv ) > Ubut ∆(Sw ) ≤ U for all children w of v

2 partition subtrees of v into groups with demand between U/2and U (except for the one containing v)

3 for each group find nearest open facility

Page 35: Lecture: ApproximationAlgorithms · 2017. 2. 6. · Algorithm r U = 3,∆ ≡1 Main Algorithm 1 computeMSTS 2 computeUFL approximationF00 3 turntreesintotours I relieveoverloaded

Algorithm

r

U = 3, ∆ ≡ 1

Main Algorithm1 compute MST S2 compute UFL

approximation F ′′3 turn trees into tours

I relieve overloadedsubtree using F ′′

I double edges,shortcut

Subprocedure: relieve overloaded subtree

1 find node v with ∆(Sv ) > Ubut ∆(Sw ) ≤ U for all children w of v

2 partition subtrees of v into groups with demand between U/2and U (except for the one containing v)

3 for each group find nearest open facility

Page 36: Lecture: ApproximationAlgorithms · 2017. 2. 6. · Algorithm r U = 3,∆ ≡1 Main Algorithm 1 computeMSTS 2 computeUFL approximationF00 3 turntreesintotours I relieveoverloaded

Algorithm

r

U = 3, ∆ ≡ 1

Main Algorithm1 compute MST S2 compute UFL

approximation F ′′3 turn trees into tours

I relieve overloadedsubtree using F ′′

I double edges,shortcut

Subprocedure: relieve overloaded subtree

1 find node v with ∆(Sv ) > Ubut ∆(Sw ) ≤ U for all children w of v

2 partition subtrees of v into groups with demand between U/2and U (except for the one containing v)

3 for each group find nearest open facility

Page 37: Lecture: ApproximationAlgorithms · 2017. 2. 6. · Algorithm r U = 3,∆ ≡1 Main Algorithm 1 computeMSTS 2 computeUFL approximationF00 3 turntreesintotours I relieveoverloaded

Algorithm

r

U = 3, ∆ ≡ 1

Main Algorithm1 compute MST S2 compute UFL

approximation F ′′3 turn trees into tours

I relieve overloadedsubtree using F ′′

I double edges,shortcut

Subprocedure: relieve overloaded subtree

1 find node v with ∆(Sv ) > Ubut ∆(Sw ) ≤ U for all children w of v

2 partition subtrees of v into groups with demand between U/2and U (except for the one containing v)

3 for each group find nearest open facility

Page 38: Lecture: ApproximationAlgorithms · 2017. 2. 6. · Algorithm r U = 3,∆ ≡1 Main Algorithm 1 computeMSTS 2 computeUFL approximationF00 3 turntreesintotours I relieveoverloaded

Algorithm

r

U = 3, ∆ ≡ 1

Main Algorithm1 compute MST S2 compute UFL

approximation F ′′3 turn trees into tours

I relieve overloadedsubtree using F ′′

I double edges,shortcut

Subprocedure: relieve overloaded subtree

1 find node v with ∆(Sv ) > Ubut ∆(Sw ) ≤ U for all children w of v

2 partition subtrees of v into groups with demand between U/2and U (except for the one containing v)

3 for each group find nearest open facility

Page 39: Lecture: ApproximationAlgorithms · 2017. 2. 6. · Algorithm r U = 3,∆ ≡1 Main Algorithm 1 computeMSTS 2 computeUFL approximationF00 3 turntreesintotours I relieveoverloaded

Algorithm

r

U = 3, ∆ ≡ 1

Main Algorithm1 compute MST S2 compute UFL

approximation F ′′3 turn trees into tours

I relieve overloadedsubtree using F ′′

I double edges,shortcut

Subprocedure: relieve overloaded subtree

1 find node v with ∆(Sv ) > Ubut ∆(Sw ) ≤ U for all children w of v

2 partition subtrees of v into groups with demand between U/2and U (except for the one containing v)

3 for each group find nearest open facility

Page 40: Lecture: ApproximationAlgorithms · 2017. 2. 6. · Algorithm r U = 3,∆ ≡1 Main Algorithm 1 computeMSTS 2 computeUFL approximationF00 3 turntreesintotours I relieveoverloaded

Algorithm

r

U = 3, ∆ ≡ 1

Main Algorithm1 compute MST S2 compute UFL

approximation F ′′3 turn trees into tours

I relieve overloadedsubtree using F ′′

I double edges,shortcut

Subprocedure: relieve overloaded subtree

1 find node v with ∆(Sv ) > Ubut ∆(Sw ) ≤ U for all children w of v

2 partition subtrees of v into groups with demand between U/2and U (except for the one containing v)

3 for each group find nearest open facility

Page 41: Lecture: ApproximationAlgorithms · 2017. 2. 6. · Algorithm r U = 3,∆ ≡1 Main Algorithm 1 computeMSTS 2 computeUFL approximationF00 3 turntreesintotours I relieveoverloaded

Algorithm

r

U = 3, ∆ ≡ 1

Main Algorithm1 compute MST S2 compute UFL

approximation F ′′3 turn trees into tours

I relieve overloadedsubtree using F ′′

I double edges,shortcut

Subprocedure: relieve overloaded subtree

1 find node v with ∆(Sv ) > Ubut ∆(Sw ) ≤ U for all children w of v

2 partition subtrees of v into groups with demand between U/2and U (except for the one containing v)

3 for each group find nearest open facility

Page 42: Lecture: ApproximationAlgorithms · 2017. 2. 6. · Algorithm r U = 3,∆ ≡1 Main Algorithm 1 computeMSTS 2 computeUFL approximationF00 3 turntreesintotours I relieveoverloaded

Algorithm

r

U = 3, ∆ ≡ 1

Main Algorithm1 compute MST S2 compute UFL

approximation F ′′3 turn trees into tours

I relieve overloadedsubtree using F ′′

I double edges,shortcut

Subprocedure: relieve overloaded subtree1 find node v with ∆(Sv ) > U

but ∆(Sw ) ≤ U for all children w of v

2 partition subtrees of v into groups with demand between U/2and U (except for the one containing v)

3 for each group find nearest open facility

Page 43: Lecture: ApproximationAlgorithms · 2017. 2. 6. · Algorithm r U = 3,∆ ≡1 Main Algorithm 1 computeMSTS 2 computeUFL approximationF00 3 turntreesintotours I relieveoverloaded

Algorithm

r

U = 3, ∆ ≡ 1

Main Algorithm1 compute MST S2 compute UFL

approximation F ′′3 turn trees into tours

I relieve overloadedsubtree using F ′′

I double edges,shortcut

Subprocedure: relieve overloaded subtree1 find node v with ∆(Sv ) > U

but ∆(Sw ) ≤ U for all children w of v2 partition subtrees of v into groups with demand between U/2

and U (except for the one containing v)

3 for each group find nearest open facility

Page 44: Lecture: ApproximationAlgorithms · 2017. 2. 6. · Algorithm r U = 3,∆ ≡1 Main Algorithm 1 computeMSTS 2 computeUFL approximationF00 3 turntreesintotours I relieveoverloaded

Algorithm

r

U = 3, ∆ ≡ 1

Main Algorithm1 compute MST S2 compute UFL

approximation F ′′3 turn trees into tours

I relieve overloadedsubtree using F ′′

I double edges,shortcut

Subprocedure: relieve overloaded subtree1 find node v with ∆(Sv ) > U

but ∆(Sw ) ≤ U for all children w of v2 partition subtrees of v into groups with demand between U/2

and U (except for the one containing v)3 for each group find nearest open facility

Page 45: Lecture: ApproximationAlgorithms · 2017. 2. 6. · Algorithm r U = 3,∆ ≡1 Main Algorithm 1 computeMSTS 2 computeUFL approximationF00 3 turntreesintotours I relieveoverloaded

Algorithm

r

U = 3, ∆ ≡ 1

Main Algorithm1 compute MST S2 compute UFL

approximation F ′′3 turn trees into tours

I relieve overloadedsubtree using F ′′

I double edges,shortcut

Subprocedure: relieve overloaded subtree1 find node v with ∆(Sv ) > U

but ∆(Sw ) ≤ U for all children w of v2 partition subtrees of v into groups with demand between U/2

and U (except for the one containing v)3 for each group find nearest open facility

Page 46: Lecture: ApproximationAlgorithms · 2017. 2. 6. · Algorithm r U = 3,∆ ≡1 Main Algorithm 1 computeMSTS 2 computeUFL approximationF00 3 turntreesintotours I relieveoverloaded

Algorithm

r

U = 3, ∆ ≡ 1

Main Algorithm1 compute MST S2 compute UFL

approximation F ′′3 turn trees into tours

I relieve overloadedsubtree using F ′′

I double edges,shortcut

Subprocedure: relieve overloaded subtree1 find node v with ∆(Sv ) > U

but ∆(Sw ) ≤ U for all children w of v2 partition subtrees of v into groups with demand between U/2

and U (except for the one containing v)3 for each group find nearest open facility

Page 47: Lecture: ApproximationAlgorithms · 2017. 2. 6. · Algorithm r U = 3,∆ ≡1 Main Algorithm 1 computeMSTS 2 computeUFL approximationF00 3 turntreesintotours I relieveoverloaded

Algorithm

r

U = 3, ∆ ≡ 1

Main Algorithm1 compute MST S2 compute UFL

approximation F ′′3 turn trees into tours

I relieve overloadedsubtree using F ′′

I double edges,shortcut

Subprocedure: relieve overloaded subtree1 find node v with ∆(Sv ) > U

but ∆(Sw ) ≤ U for all children w of v2 partition subtrees of v into groups with demand between U/2

and U (except for the one containing v)3 for each group find nearest open facility

Page 48: Lecture: ApproximationAlgorithms · 2017. 2. 6. · Algorithm r U = 3,∆ ≡1 Main Algorithm 1 computeMSTS 2 computeUFL approximationF00 3 turntreesintotours I relieveoverloaded

This semester you learnt ...

many different techniques for designingapproximation algorithms

I get a feeling which one works in which situationI adapt them to your optimization problemsI know how to get lower boundsI be inventive