approximationsalgorithmen facility location k-median cheng, wei 12. juli

38
Approximationsalgorith men Facility Location K-Median Cheng, Wei 12. Juli

Upload: kasimira-weisenberg

Post on 05-Apr-2015

109 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Approximationsalgorithmen Facility Location K-Median Cheng, Wei 12. Juli

Approximationsalgorithmen

Facility Location K-Median

Cheng, Wei12. Juli

Page 2: Approximationsalgorithmen Facility Location K-Median Cheng, Wei 12. Juli

Facility Location

Page 3: Approximationsalgorithmen Facility Location K-Median Cheng, Wei 12. Juli

Definition

Gegeben:

mögliche Standorte F = {F1 , F2 … Fm}

Städte C = {C1 , C2 … Cn}

Eröffnungskosten fi für Fi

Verbindungskosten cij zwischen Fi und Cj

Dreiecksungleichung

Page 4: Approximationsalgorithmen Facility Location K-Median Cheng, Wei 12. Juli

Definition

Gesucht: Eröffne Teilmenge von Standorten Funktion

verbinde jede Stadt mit offenem Standort. Gesamtkosten minimieren

Eröffnungskosten der Standorte

Verbindungskosten zwischen Stadt und Standort

FI IC :

Page 5: Approximationsalgorithmen Facility Location K-Median Cheng, Wei 12. Juli

Primales/ Duales LP

Fi

iiCjFi

ijij yfxc,

Fiy

CjFix

CjFixy

Cjx

i

ij

iji

Fiij

,0

,,0

,,0

,1

Minimiere:

Nebenbedienungen:

CjFi

Cj

Fif

CjFic

ij

j

iCj

ij

ijijj

,,0

,0

,

,,

Cj

jMaximiere:

Primal: Dual:

Nebenbedienungen:

Page 6: Approximationsalgorithmen Facility Location K-Median Cheng, Wei 12. Juli

Verwandte Arbeiten

Hochbaum [1982] O(log n) Shmoys, Tardos and Aardal [1998] 3,16 Jain and Vazirani [2001] 3 Mahdian, Ye and Zhang [2004] 1,52

Guha and Khuller [1998] untere Schranke 1,463

Page 7: Approximationsalgorithmen Facility Location K-Median Cheng, Wei 12. Juli

Primal-Dual basierter Algorithmus

Phase 1 Öffnen mehrere Standorte, und verbinden alle Städte mit

Standorten. (Eine Stadt kann mit mehr einem Standort verbinden.)

Phase 2 Schließen unnötige Standorte, und verbinden alle Städte

mit nur einem Standort.

Page 8: Approximationsalgorithmen Facility Location K-Median Cheng, Wei 12. Juli

Algorithmus (Phase 1)

Am Anfang Zeit 0 Alle Stadte sind unverbunden Alle Variablen = 0

Page 9: Approximationsalgorithmen Facility Location K-Median Cheng, Wei 12. Juli

Algorithmus (Phase 1)

Erhöhe der unverbundenen Städte j um 1

Wenn von Kante, ist Kante (i,j) bezahlt . => Duale Variable wird erhöht, laut .

bezahlt Eröffnungskosten fi für Fi

Kanten (i, j) mit heißen besonders.

Wenn , ist Standort i bezahlt. Standort i ist temporär geöffnet.

j

ijj c

ijijijj c

ij

0ij

ij ij f

Page 10: Approximationsalgorithmen Facility Location K-Median Cheng, Wei 12. Juli

Algorithmus (Phase 1)

Stadt mit bezahlter Kante zu eröffnetem Standort Fi ist verbunden.

Standort i ist Verbindungszeuge dieser Städte.

verbundener Städte werden nicht mehr erhöht.

Sobald unverbundene Stadt j bezahlte Kante zu eröffnetem Standort i hat: Stadt j ebenfalls verbunden. Standort i ist Verbindungszeuge von j. Achtung: Hier ist , und Kante (i, j) unbesonders.

j

0ij

Page 11: Approximationsalgorithmen Facility Location K-Median Cheng, Wei 12. Juli

Algorithmus (Phase 1)

Phase 1 endet, wenn alle Städte verbunden.

Eine Stadt zu mehreren Standorten verbunden.

Zu viele Standorte geöffnet.

Page 12: Approximationsalgorithmen Facility Location K-Median Cheng, Wei 12. Juli

Primal-Dual basierter Algorithmus

Phase 1 Öffnen mehrere Standorte, und verbinden alle Städte mit

Standorten. (Eine Stadt kann mit mehr einem Standort verbinden.)

Phase 2 Schließen unnötige Standorte, und verbinden alle Städte

mit nur einem Standort.

Page 13: Approximationsalgorithmen Facility Location K-Median Cheng, Wei 12. Juli

Algorithmus (Phase 2)

– temporär geöffnete Standorte

– durch besondere Kanten induzierter Teilgraph

H – von induzierter Graph in

tFT

2T2

2

),(),(),(

),(),(

TwuTwvTvu

TvuTvu

tF 2T

Page 14: Approximationsalgorithmen Facility Location K-Median Cheng, Wei 12. Juli

Algorithmus (Phase 2)

Wähle I als Maximal Independent Set in H Maximum Independent Set (NP-schwer) Maximal Independent Set:

einfacher Greedy-Algorithmus

Alle Standorte in I werdengeöffnet.

Page 15: Approximationsalgorithmen Facility Location K-Median Cheng, Wei 12. Juli

Algorithmus (Phase 2)

, für jede Stadt j

I independent set => höchstens ein Standort in geöffnet.

Fall 1: Ein Standort ist geöffnet. , und Stadt j ist direkt verbunden.

Fall 2: Alle Standorte in sind ungeöffnet.

0}{ ijtj β|Fi=F

jF

ji F

ij )(

jF

Page 16: Approximationsalgorithmen Facility Location K-Median Cheng, Wei 12. Juli

Algorithmus (Phase 2)

Fall 2: Alle Standorte in sind ungeöffnet. Betrachte bezahlte Kante (i',j),

i’ ist Verbindungszeuge von j

Fall 2.1: Stadt j ist direkt verbunden. Achtung: Bis jetzt ist die Lösung Optimal.

Fall 2.2: i eröffneter Nachbar von i’ in Graph H. , und Stadt j ist indirekt verbunden.

')( ij

0' ji

ij )(

jF

Ii '

Ii '

Page 17: Approximationsalgorithmen Facility Location K-Median Cheng, Wei 12. Juli

Algorithmus (Phase 2)

(I, ) ist Lösung.

ijxij )(1

Iiyi 1

Page 18: Approximationsalgorithmen Facility Location K-Median Cheng, Wei 12. Juli

Analyse

Definition:

j indirekt verbunden

j direkt verbunden für

ej

fjj

0fj j

ej

ijfj ij

ej c ij )(

Page 19: Approximationsalgorithmen Facility Location K-Median Cheng, Wei 12. Juli

Analyse

Lemma 1:

Folgerung 2:

Lemma 3: Für eine indirekt verbunden Stadt j:

ijj

ifj f

)(:

Cj Ii

ifj f

)( ji ejijc 3

Page 20: Approximationsalgorithmen Facility Location K-Median Cheng, Wei 12. Juli

Analyse

Verbindungszeuge von Stadt j j verbindet indirekt zu i => und sind beide besondere Kanten.

'iHii )',(

)',( ji )','( ji

Page 21: Approximationsalgorithmen Facility Location K-Median Cheng, Wei 12. Juli

Analyse

Satz 4:

Beweis: (Lemma 3) =>

ejijc 3

Cj

ej

CjFiijij xc 3

,

Cj Ii

ifj f

Cj

jFi

iiCjFi

ijij yfxc 33,

Page 22: Approximationsalgorithmen Facility Location K-Median Cheng, Wei 12. Juli

Zusammenfassung

Implementierung mit Priority Queue

Jede Kante wird max. 2-mal betrachtet. bezahlt verbunden

Der Algorithmus berechnet in O(m log m) Zeit eine 3-Approximation für Facility Location.

Page 23: Approximationsalgorithmen Facility Location K-Median Cheng, Wei 12. Juli

K-Median

Page 24: Approximationsalgorithmen Facility Location K-Median Cheng, Wei 12. Juli

Definition

Gegeben:

Eröffnungskosten fi = 0 für Fi

max. K Standorte eröffnen

Gesucht:

Gesamtkosten minimieren

Page 25: Approximationsalgorithmen Facility Location K-Median Cheng, Wei 12. Juli

Primales/ Duales LP

CjF,i

ijij xc

Minimieren:

Nebenbedienungen:

Maximieren:

Primal: Dual:

Nebenbedienungen:

Fiy

CjFix

ky

CjFixy

Cjx

i

ij

Fii

iji

Fiij

,0

,,0

,

,,0

,1

zkCj

j

,0

,,0

,0

,

,,

z

CjFi

Cj

Fiz

CjFic

ij

j

Cjij

ijijj

Page 26: Approximationsalgorithmen Facility Location K-Median Cheng, Wei 12. Juli

Verwandte Arbeiten

Bartal [1998] O(log n log log n) Charikar [1999] 6+2/3 Jain and Vazirani [2001] 6 Arya [2002] 3+2/p

Laufzeit O(n^p)

Page 27: Approximationsalgorithmen Facility Location K-Median Cheng, Wei 12. Juli

Grundidee

z: Eröffnungskosten eines Standorts

Suchen geeignetes z, benutzen anschließend Algorithmus für Facility Location.

Wir suchen ky

Fii

Page 28: Approximationsalgorithmen Facility Location K-Median Cheng, Wei 12. Juli

Grundidee

z = 0 => alle Standorte werden geöffnet.

z sehr groß => nur ein Standort wird geöffnet.

Finde z mit binärer Suche.

max,0 ncz

Page 29: Approximationsalgorithmen Facility Location K-Median Cheng, Wei 12. Juli

Grundidee

z1 und z2

Finden entspricht k1<k und k2>k (xs,ys) (xl,yl)

(x,y) = a (xs,ys) + b (xl,yl)

k = a k1 + b k2

a = (k2-k)/(k2-k1) b = (k-k1)/(k2-k1)

1kyFi

si

2kyFi

li

)12/( 2min21 cnczz

Page 30: Approximationsalgorithmen Facility Location K-Median Cheng, Wei 12. Juli

Lemma 5

Die Kosten von (x,y) sind höchstens (3+1/nc) mal so groß wie die einer optimalen (nicht notwendig ganzzahligen) Lösung des K-Median Problems .

Beweisskizze:

kzn

xcCj

jcCjFi

ijij 1,

13

Page 31: Approximationsalgorithmen Facility Location K-Median Cheng, Wei 12. Juli

Randomisiertes Runden

Page 32: Approximationsalgorithmen Facility Location K-Median Cheng, Wei 12. Juli

Randomisiertes Runden

Mit Wahrscheinlichkeit a werden alle Standorte in A geöffnet . Mit b = 1-a, alle Standorte in B’.

Außerdem k-k1 Standorte in

B-B’ werden zufällig geöffnet.

I ist Menge der geöffneten

Standorte, | I | = k.

Page 33: Approximationsalgorithmen Facility Location K-Median Cheng, Wei 12. Juli

Randomisiertes Runden

Definiere : für Stadt j,

Fall 1: => verbinde zu vorhandenem Standort Fall 2:

ist nächster Standort von

Verbinde zu oder oder

IC :

Ai 1 Bi 2

'2 Bi '2 BBi

'3 Bi 1i

jiji bc+ac=(j)21

cost

1i 2i3i

Page 34: Approximationsalgorithmen Facility Location K-Median Cheng, Wei 12. Juli

Randomisiertes Runden

Lemma 6: erwartete Kosten von Stadt j

Fall 1:

Fall 2: geöffnet : wahrscheinlichkeit b nicht geöffnet und geöffnet : (1-b)a = a2

beide nicht öffnet: (1-b)(1-a) = ab

)(cost)),max(1(][ )( jbacE jj

jijiΦ(j)j bc+ac=(j)=]E[c21

cost

2i

2i 1i

jijijijj abccabccE312

2)( ][

Page 35: Approximationsalgorithmen Facility Location K-Median Cheng, Wei 12. Juli

Approximation

( und )

( und )

Approximationsgarantie ist

cna /11 11 kk cnk 2

kb /11 11 k 12 kk

cnba /12)),max(1(

6)/13)(/12( cc nn

CjFiijij

CjFi

kijij xcbaxcE

,,

)),max(1(

Page 36: Approximationsalgorithmen Facility Location K-Median Cheng, Wei 12. Juli

Laufzeit

Binäre Suche in bis

Proben

Gesamtlaufzeit

max,0 nc )12/( 2min21 cnczz

)log)/(log( minmax nccO

))log)/(log(log( minmax nccmmO

Page 37: Approximationsalgorithmen Facility Location K-Median Cheng, Wei 12. Juli

Zusammenfassung

Der Algorithmus berechnet in O(m log m) Zeit eine 3-Approximation für Facility Location.

Unser Algorithmus berechnet in Zeit eine 6-Approximation für K-Median.

))log)/(log(log( minmax nccmmO

Page 38: Approximationsalgorithmen Facility Location K-Median Cheng, Wei 12. Juli

Vielen Dank!