Approximation Algorithms for Single and Multi-Commodity Connected Facility Location Fabrizio Grandoni & Thomas Rothvoß Department of Mathematics, M.I.T. IPCO 2011 Outline 1. Better approximation algorithm for Connected Facility Location Outline 1. 2. Better approximation algorithm for Connected Facility Location First O(1)-apx for Multi-Commodity Connected Facility Location Outline 1. 2. 3. Better approximation algorithm for Connected Facility Location First O(1)-apx for Multi-Commodity Connected Facility Location Improved hardness results for several problems Part 1: Connected Facility Location Given: ◮ graph G = (V, E), with metric distances c : E → Q+ Part 1: Connected Facility Location Given: ◮ graph G = (V, E), with metric distances c : E → Q+ ◮ a set of clients C ⊆ V clients Part 1: Connected Facility Location Given: ◮ graph G = (V, E), with metric distances c : E → Q+ ◮ a set of clients C ⊆ V ◮ facilities F ⊆ V , with opening cost o : F → Q+ facility clients Part 1: Connected Facility Location Given: ◮ graph G = (V, E), with metric distances c : E → Q+ ◮ a set of clients C ⊆ V ◮ facilities F ⊆ V , with opening cost o : F → Q+ ◮ a parameter M ≥ 1 facility clients Part 1: Connected Facility Location Given: ◮ graph G = (V, E), with metric distances c : E → Q+ ◮ a set of clients C ⊆ V ◮ facilities F ⊆ V , with opening cost o : F → Q+ ◮ a parameter M ≥ 1 facility Goal: ◮ open facilities F ′ ⊆ F minimizing X o(f ) + {z c(j, F ′ ) | {z j∈C f ∈F ′ | X } opening cost } connection cost clients Part 1: Connected Facility Location Given: ◮ graph G = (V, E), with metric distances c : E → Q+ ◮ a set of clients C ⊆ V ◮ facilities F ⊆ V , with opening cost o : F → Q+ ◮ a parameter M ≥ 1 facility clients Goal: ◮ open facilities F ′ ⊆ F ◮ find Steiner tree T spanning opened facilities minimizing X X X c(j, F ′ ) + M c(e) o(f ) + j∈C f ∈F ′ | {z } opening cost | e∈T {z } connection cost | {z } Steiner cost Previous Results for Connected Facility Location ◮ APX-hard (reduction from Steiner Tree) ◮ 10.66-apx based on LP-rounding [Gupta et al ’01]. ◮ 8.55-apx primal-dual algorithm [Swamy, Kumar ’02]. ◮ 3.92-apx based on random-sampling [Eisenbrand, Grandoni, R., Schäfer ’08] Previous Results for Connected Facility Location ◮ APX-hard (reduction from Steiner Tree) ◮ 10.66-apx based on LP-rounding [Gupta et al ’01]. ◮ 8.55-apx primal-dual algorithm [Swamy, Kumar ’02]. ◮ 3.92-apx based on random-sampling [Eisenbrand, Grandoni, R., Schäfer ’08] Our result Simple 3.19-approximation algorithm. Previous Results for Connected Facility Location ◮ APX-hard (reduction from Steiner Tree) ◮ 10.66-apx based on LP-rounding [Gupta et al ’01]. ◮ 8.55-apx primal-dual algorithm [Swamy, Kumar ’02]. ◮ 3.92-apx based on random-sampling [Eisenbrand, Grandoni, R., Schäfer ’08] Our result Simple 3.19-approximation algorithm. Use existing algorithms for subproblems: ◮ Facility Location: 1.5-apx [Byrka ’07] ◮ Steiner Tree: 1.39-apx [Byrka,Grandoni,R.,Sanità 10] Where is the difficulty? Algorithm: opening cost 0 Where is the difficulty? Algorithm: (1) Just solve Facility Location opening cost 0 Where is the difficulty? Algorithm: (1) Just solve Facility Location (2) Run Steiner Tree algorithm opening cost 0 pay tree M times! Where is the difficulty? Algorithm: (1) Just solve Facility Location ! k r o w ’t (2) Run Steiner Tree algorithm opening cost 0 n s e o D pay tree M times! The CFL algorithm The CFL algorithm (1) Guess facility r from OP T . r The CFL algorithm (1) Guess facility r from OP T . (2) Sample each client with prob r 1 M → C′ The CFL algorithm (1) Guess facility r from OP T . 1 → C′ (2) Sample each client with prob M ′ (3) Compute 1.5-apx F for Facility Location instance o′ (f ) := o(f ) + M · c(f, nearest node in C ′ ∪ {r}) r o(f )+ penalty The CFL algorithm (1) Guess facility r from OP T . 1 → C′ (2) Sample each client with prob M ′ (3) Compute 1.5-apx F for Facility Location instance o′ (f ) := o(f ) + M · c(f, nearest node in C ′ ∪ {r}) r The CFL algorithm (1) Guess facility r from OP T . 1 → C′ (2) Sample each client with prob M ′ (3) Compute 1.5-apx F for Facility Location instance o′ (f ) := o(f ) + M · c(f, nearest node in C ′ ∪ {r}) (4) Compute 1.39-apx Steiner Tree T ′ on F ′ ∪ {r} r The CFL algorithm (1) Guess facility r from OP T . 1 → C′ (2) Sample each client with prob M ′ (3) Compute 1.5-apx F for Facility Location instance o′ (f ) := o(f ) + M · c(f, nearest node in C ′ ∪ {r}) (4) Compute 1.39-apx Steiner Tree T ′ on F ′ ∪ {r} r ◮ Observe: cost of apx cost of apx E[AP X] ≤ E Facility Location sol. +E Steiner Tree +penalties The CFL algorithm (1) Guess facility r from OP T . 1 → C′ (2) Sample each client with prob M ′ (3) Compute 1.5-apx F for Facility Location instance o′ (f ) := o(f ) + M · c(f, nearest node in C ′ ∪ {r}) (4) Compute 1.39-apx Steiner Tree T ′ on F ′ ∪ {r} r ◮ Observe: cost of apx cost of apx E[AP X] ≤ E Facility Location sol. +E Steiner Tree +penalties on C ′ ∪ {r} Analysis: Steiner Cost Notation: OP T = O∗ |{z} opening cost + S∗ |{z} Steiner tree cost + C∗ |{z} connection cost Analysis: Steiner Cost Notation: OP T = O∗ |{z} opening cost + S∗ |{z} Steiner tree cost + C∗ |{z} connection cost Lemma E[M · apx Steiner Tree on C ′ ∪ {r}] ≤ 1.39 · (S ∗ + C ∗ ) r Analysis: Steiner Cost Notation: OP T = O∗ |{z} + opening cost S∗ |{z} Steiner tree cost + C∗ |{z} connection cost Lemma E[M · apx Steiner Tree on C ′ ∪ {r}] ≤ 1.39 · (S ∗ + C ∗ ) r S∗ |{z} Steiner tree in OP T Analysis: Steiner Cost Notation: OP T = O∗ |{z} + opening cost S∗ |{z} Steiner tree cost + C∗ |{z} connection cost Lemma E[M · apx Steiner Tree on C ′ ∪ {r}] ≤ 1.39 · (S ∗ + C ∗ ) r S∗ |{z} Steiner tree in OP T + 1 · M · C∗ M {z } | need path in C ∗ with prob. 1/M Analysis: Steiner Cost Notation: OP T = O∗ |{z} + opening cost S∗ |{z} Steiner tree cost + C∗ |{z} connection cost Lemma E[M · apx Steiner Tree on C ′ ∪ {r}] ≤ 1.39 · (S ∗ + C ∗ ) r 1.39 · S∗ |{z} Steiner tree in OP T + 1 · M · C∗ } |M {z need path in C ∗ with prob. 1/M Core detouring theorem Core Detouring Theorem [EGSR ’08] Given a spanning tree T with root r ∈ T and distinguished terminals D ⊆ V . Sample any terminal in D with prob. p ∈]0, 1] E hX v∈D i 0.81 · c(T ) dist(v, sampled node ∪ {r}) ≤ p r T Core detouring theorem Core Detouring Theorem [EGSR ’08] Given a spanning tree T with root r ∈ T and distinguished terminals D ⊆ V . Sample any terminal in D with prob. p ∈]0, 1] E hX v∈D i 0.81 · c(T ) dist(v, sampled node ∪ {r}) ≤ p r r r T r Core detouring theorem Core Detouring Theorem [EGSR ’08] Given a spanning tree T with root r ∈ T and distinguished terminals D ⊆ V . Sample any terminal in D with prob. p ∈]0, 1] E hX v∈D i 0.81 · c(T ) dist(v, sampled node ∪ {r}) ≤ p r r r T r Analysis: Facility Location cost Theorem E[apx Facility Location cost] ≤ 1.5 · (O ∗ + 2C ∗ + 0.81S ∗ ) r Analysis: Facility Location cost Theorem E[apx Facility Location cost] ≤ 1.5 · (O ∗ + 2C ∗ + 0.81S ∗ ) ◮ There is a good sol: F := facilities in OP T serving C ′ ∪ {r} r Analysis: Facility Location cost Theorem E[apx Facility Location cost] ≤ 1.5 · (O ∗ + 2C ∗ + 0.81S ∗ ) ◮ ◮ ′ There is a good sol: F := facilities in OP T serving C ∪ {r} 1 opening cost E ≤ |{z} O∗ + · M · C∗ + penalties M {z } | orig. cost r expected penalty Analysis: Facility Location cost Theorem E[apx Facility Location cost] ≤ 1.5 · (O ∗ + 2C ∗ + 0.81S ∗ ) ◮ ◮ ′ There is a good sol: F := facilities in OP T serving C ∪ {r} 1 opening cost E ≤ |{z} O∗ + · M · C∗ + penalties M {z } | orig. cost ◮ E[connection cost] ≤ C ∗ + r expected penalty Analysis: Facility Location cost Theorem E[apx Facility Location cost] ≤ 1.5 · (O ∗ + 2C ∗ + 0.81S ∗ ) ◮ ◮ ′ There is a good sol: F := facilities in OP T serving C ∪ {r} 1 opening cost E ≤ |{z} O∗ + · M · C∗ + penalties M {z } | orig. cost ◮ expected penalty 0.81 S ∗ E[connection cost] ≤ C ∗ + · 1/M |{z} M tree Use Core Detouring Theorem with T = S ∗ and p := r 1 M. Finishing the analysis for CFL Conclusion: E[AP X] ≤ 1.39 · (S ∗ + C ∗ ) + 1.5 · (O ∗ + 2C ∗ + 0.81S ∗ ) Finishing the analysis for CFL Conclusion: E[AP X] ≤ 1.39 · (S ∗ + C ∗ ) + 1.5 · (O ∗ + 2C ∗ + 0.81S ∗ ) ≤ 1.5 · O ∗ + 2.7 · S ∗ + 4.39 · C ∗ Finishing the analysis for CFL Conclusion: E[AP X] ≤ 1.39 · (S ∗ + C ∗ ) + 1.5 · (O ∗ + 2C ∗ + 0.81S ∗ ) ≤ 1.5 · O ∗ + 2.7 · S ∗ + 4.39 · C ∗ Improvement to 3.19: ◮ Adapting the sampling probability ◮ Using a bi-factor Facility Location algorithm Part 2: Multi-Commodity Connected Facility Location s3 Input: ◮ Undirected graph G = (V, E), metric distances c : E → Q+ ◮ source-sink pairs (s1 , r1 ), . . . , (sk , rk ) ◮ a set of facilities F ⊆ V with opening costs o : F → Q+ ◮ parameter M ≥ 1 s6 s5 r1 s1 r2 r6 s2 s4 r4 r5 r3 Part 2: Multi-Commodity Connected Facility Location s3 s6 Input: ◮ Undirected graph G = (V, E), metric distances c : E → Q+ ◮ source-sink pairs (s1 , r1 ), . . . , (sk , rk ) ◮ a set of facilities F ⊆ V with opening costs o : F → Q+ parameter M ≥ 1 Goal: Find ◮ Facilities F ′ ⊆ F o(f ) {z s1 r2 s2 s4 r4 r5 r3 f ∈F ′ | r1 r6 ◮ X s5 } opening cost Part 2: Multi-Commodity Connected Facility Location s3 s6 Input: ◮ Undirected graph G = (V, E), metric distances c : E → Q+ ◮ source-sink pairs (s1 , r1 ), . . . , (sk , rk ) ◮ a set of facilities F ⊆ V with opening costs o : F → Q+ parameter M ≥ 1 Goal: Find ◮ Facilities F ′ ⊆ F ◮ Forest T X o(f ) + M · c(T ) | {z } f ∈F ′ forest cost | {z } ◮ opening cost s5 r1 s1 r2 r6 s2 s4 r4 r5 r3 Part 2: Multi-Commodity Connected Facility Location s3 s6 Input: ◮ Undirected graph G = (V, E), metric distances c : E → Q+ ◮ source-sink pairs (s1 , r1 ), . . . , (sk , rk ) ◮ a set of facilities F ⊆ V with opening costs o : F → Q+ s5 r1 s1 r2 r6 s2 s4 r4 r5 parameter M ≥ 1 Goal: Find ◮ Facilities F ′ ⊆ F ◮ Forest T k X X distF ′ ,T (si , ri ) o(f ) + M · c(T ) + | {z } | {z } i=1 f ∈F ′ forest cost 0 distance between | {z } opened & connected ◮ opening cost facilities r3 Part 2: Multi-Commodity Connected Facility Location s3 s6 Input: ◮ Undirected graph G = (V, E), metric distances c : E → Q+ ◮ source-sink pairs (s1 , r1 ), . . . , (sk , rk ) ◮ a set of facilities F ⊆ V with opening costs o : F → Q+ s5 r1 s1 r2 r6 s2 s4 r4 r5 parameter M ≥ 1 Goal: Find ◮ Facilities F ′ ⊆ F ◮ Forest T k X X distF ′ ,T (si , ri ) o(f ) + M · c(T ) + | {z } | {z } i=1 f ∈F ′ forest cost 0 distance between | {z } opened & connected ◮ opening cost facilities r3 Part 2: Multi-Commodity Connected Facility Location s3 s6 Input: ◮ Undirected graph G = (V, E), metric distances c : E → Q+ ◮ source-sink pairs (s1 , r1 ), . . . , (sk , rk ) ◮ a set of facilities F ⊆ V with opening costs o : F → Q+ s5 r1 s1 r2 r6 s2 s4 r4 r5 parameter M ≥ 1 Goal: Find ◮ Facilities F ′ ⊆ F ◮ Forest T k X X distF ′ ,T (si , ri ) o(f ) + M · c(T ) + | {z } | {z } i=1 f ∈F ′ forest cost 0 distance between | {z } opened & connected ◮ opening cost facilities r3 Part 2: Multi-Commodity Connected Facility Location s3 s6 Input: ◮ Undirected graph G = (V, E), metric distances c : E → Q+ ◮ source-sink pairs (s1 , r1 ), . . . , (sk , rk ) ◮ a set of facilities F ⊆ V with opening costs o : F → Q+ s5 r1 s1 r2 r6 s2 s4 r4 r5 parameter M ≥ 1 Goal: Find ◮ Facilities F ′ ⊆ F ◮ Forest T k X X distF ′ ,T (si , ri ) o(f ) + M · c(T ) + | {z } | {z } i=1 f ∈F ′ forest cost 0 distance between | {z } opened & connected ◮ opening cost facilities r3 Part 2: Multi-Commodity Connected Facility Location s3 s6 Input: ◮ Undirected graph G = (V, E), metric distances c : E → Q+ ◮ source-sink pairs (s1 , r1 ), . . . , (sk , rk ) ◮ a set of facilities F ⊆ V with opening costs o : F → Q+ s5 r1 s1 r2 r6 s2 s4 r4 r5 parameter M ≥ 1 Goal: Find ◮ Facilities F ′ ⊆ F ◮ Forest T k X X distF ′ ,T (si , ri ) o(f ) + M · c(T ) + | {z } | {z } i=1 f ∈F ′ forest cost 0 distance between | {z } opened & connected ◮ opening cost facilities r3 Part 2: Multi-Commodity Connected Facility Location s3 s6 Input: ◮ Undirected graph G = (V, E), metric distances c : E → Q+ ◮ source-sink pairs (s1 , r1 ), . . . , (sk , rk ) ◮ a set of facilities F ⊆ V with opening costs o : F → Q+ s5 r1 s1 r2 r6 s2 s4 r4 r5 parameter M ≥ 1 Goal: Find ◮ Facilities F ′ ⊆ F ◮ Forest T k X X distF ′ ,T (si , ri ) o(f ) + M · c(T ) + | {z } | {z } i=1 f ∈F ′ forest cost 0 distance between | {z } opened & connected ◮ opening cost facilities r3 Our result Our result Simple 16.2-approximation algorithm for Multi-Commodity Connected Facility Location. Ingredients: ◮ ◮ Random-sampling Use algorithms for ◮ ◮ Price-Collecting Facility Location Steiner Forest Part 3: Improved hardness results Steiner Tree Facility Location generalizes Single-Sink Rent-or-Buy Connected Facility Location Single-Sink Buy-at-Bulk Virtual Private Network Part 3: Improved hardness results Steiner Tree 1.01 Facility Location 1.46 generalizes Single-Sink Rent-or-Buy 1.01 Single-Sink Buy-at-Bulk 1.01 Connected Facility Location 1.46 Virtual Private Network 1.01 Part 3: Improved hardness results Steiner Tree 1.01 Facility Location 1.46 generalizes Single-Sink Rent-or-Buy 8 1.01 1.2 Single-Sink Buy-at-Bulk 8 1.01 1.2 Connected Facility Location 1.46 Virtual Private Network 8 1.01 1.2 Part 3: Improved hardness results Steiner Tree 1.01 Facility Location 1.46 generalizes Single-Sink o(f ) = 0 Rent-or-Buy ∀f ∈ V 8 1.01 1.2 Single-Sink Buy-at-Bulk 8 1.01 1.2 Connected Facility Location 1.46 Virtual Private Network 8 1.01 1.2 The reduction (1) ◮ Reduce Set Cover to SROB elements sets b The reduction (1) ◮ Reduce Set Cover to SROB clients/elements c(e) ∈ {1, 2} M= facilities/sets r 0.27n OP TSC The reduction (1) ◮ Reduce Set Cover to SROB clients/elements c(e) ∈ {1, 2} 2 1 M= facilities/sets r 0.27n OP TSC The reduction (1) ◮ Reduce Set Cover to SROB remove! clients/elements c(e) ∈ {1, 2} 2 1 facilities/sets M= buy! 0.27n OP TSC r (1) WHILE not all elements covered DO (2) Compute 1.27-apx SROB sol (3) Buy facilities/sets in sol. & remove covered elements The reduction (2) ◮ Use idea from [Guha & Khuller ’99] # clients at dist 1 n # fac 0.27 OP TSC n + 0.3667n # facilities in apx. sol 1 · OP TSC 2 · OP TSC The reduction (2) ◮ Use idea from [Guha & Khuller ’99] # clients at dist 1 n apx SROB sol. # fac 0.27 OP TSC n + 0.3667n b # facilities in apx. sol 1 · OP TSC 2 · OP TSC The reduction (2) ◮ Use idea from [Guha & Khuller ’99] # clients at dist 1 n apx SROB sol. # fac 0.27 OP TSC n + 0.3667n b # facilities in apx. sol 1 · OP TSC 2 · OP TSC # needed sets ≤ [. . . some calc . . .] ≤ 0.999 ln(n) · OP TSC The reduction (2) ◮ Use idea from [Guha & Khuller ’99] # clients at dist 1 n apx SROB sol. # fac 0.27 OP TSC n + 0.3667n b # facilities in apx. sol 1 · OP TSC 2 · OP TSC # needed sets ◮ ≤ [. . . some calc . . .] ≤ 0.999 ln(n) · OP TSC Contradiction! Theorem (Feige ’98) Unless NP ⊆ DTIME(nO(log log n) ), there is no (1 − ε) · ln(n)-apx for Set Cover. The end Thanks for your attention