Local Search Heuristics for Facility Location Problems Rohit - - PowerPoint PPT Presentation

local search heuristics for facility location problems
SMART_READER_LITE
LIVE PREVIEW

Local Search Heuristics for Facility Location Problems Rohit - - PowerPoint PPT Presentation

Local Search Heuristics for Facility Location Problems Rohit Khandekar Dept. of Computer Science and Engineering, Indian Institute of Technology Delhi Joint work with: Vijay Arya, Naveen Garg, Vinayaka Pandit Kamesh Munagala, Adam Meyerson


slide-1
SLIDE 1

Local Search Heuristics for Facility Location Problems

Rohit Khandekar

  • Dept. of Computer Science and Engineering,

Indian Institute of Technology Delhi

Joint work with: Vijay Arya, Naveen Garg, Vinayaka Pandit Kamesh Munagala, Adam Meyerson

Departmental Seminar – p.1/43

slide-2
SLIDE 2

Outline

Define the k-median problem Simple local search algorithm Analysis Generalization

Departmental Seminar – p.2/43

slide-3
SLIDE 3

The k-median problem

We are given n points in a metric space.

Departmental Seminar – p.3/43

slide-4
SLIDE 4

The k-median problem

We are given n points in a metric space.

u v w d

  • w

v

d

  • u

w

✂ ✄

d

  • u

w

✂ ☎

d

  • w

v

d

u

v

✞ ✟ ✝

d

u

u

✞ ✠ ✝

d

u

v

✞ ✠

d

v

u

Departmental Seminar – p.4/43

slide-5
SLIDE 5

The k-median problem

We are given n points in a metric space.

Departmental Seminar – p.5/43

slide-6
SLIDE 6

The k-median problem

We are given n points in a metric space. We want to identify k “medians” such that the sum of distances of all the points to their nearest medians is minimized.

Departmental Seminar – p.6/43

slide-7
SLIDE 7

The k-median problem

We are given n points in a metric space. We want to identify k “medians” such that the sum of lengths of all the red segments is minimized.

Departmental Seminar – p.7/43

slide-8
SLIDE 8

A brief bio-sketch of the k-median problem

NP-hard

Departmental Seminar – p.8/43

slide-9
SLIDE 9

A brief bio-sketch of the k-median problem

NP-hard Known to OR community since 60’s.

Departmental Seminar – p.8/43

slide-10
SLIDE 10

A brief bio-sketch of the k-median problem

NP-hard Known to OR community since 60’s. Used for locating warehouses, manufacturing plants, etc.

Departmental Seminar – p.8/43

slide-11
SLIDE 11

A brief bio-sketch of the k-median problem

NP-hard Known to OR community since 60’s. Used for locating warehouses, manufacturing plants, etc. Used also for clustering, data mining.

Departmental Seminar – p.8/43

slide-12
SLIDE 12

A brief bio-sketch of the k-median problem

NP-hard Known to OR community since 60’s. Used for locating warehouses, manufacturing plants, etc. Used also for clustering, data mining. Received the attention of the Approximation algorithms community in early 90’s.

Departmental Seminar – p.8/43

slide-13
SLIDE 13

A brief bio-sketch of the k-median problem

NP-hard Known to OR community since 60’s. Used for locating warehouses, manufacturing plants, etc. Used also for clustering, data mining. Received the attention of the Approximation algorithms community in early 90’s. Various algorithms via LP-relaxation, primal-dual scheme, etc.

Departmental Seminar – p.8/43

slide-14
SLIDE 14

A local search algorithm

Departmental Seminar – p.9/43

slide-15
SLIDE 15

A local search algorithm

Start with any set of k medians.

Departmental Seminar – p.9/43

slide-16
SLIDE 16

A local search algorithm

Identify a median and a point that is not a median.

Departmental Seminar – p.10/43

slide-17
SLIDE 17

A local search algorithm

And SWAP tentatively!

Departmental Seminar – p.11/43

slide-18
SLIDE 18

A local search algorithm

Perform the swap, only if the new solution is “better” (has less cost) than the previous solution.

Departmental Seminar – p.12/43

slide-19
SLIDE 19

A local search algorithm

Perform the swap, only if the new solution is “better” (has less cost) than the previous solution. Stop, if there is no swap that improves the solution.

Departmental Seminar – p.12/43

slide-20
SLIDE 20

The algorithm

Algorithm Local Search.

1.

S

any k medians 2. While

s

S and s

✌ ✍ ☞

S such that, cost

S

s

s

✌ ✞✒✑

cost

S

, do S

S

s

s

3. return S

Departmental Seminar – p.13/43

slide-21
SLIDE 21

The algorithm

Algorithm Local Search.

1.

S

any k medians 2. While

s

S and s

✌ ✍ ☞

S such that, cost

S

s

s

✌ ✞✒✑ ✆

1

ε

cost

S

, do S

S

s

s

3. return S

Departmental Seminar – p.14/43

slide-22
SLIDE 22

Main theorem

The local search algorithm described above computes a solution with cost (the sum of distances) at most 5 times the minimum cost.

Departmental Seminar – p.15/43

slide-23
SLIDE 23

Main theorem

The local search algorithm described above computes a solution with cost (the sum of distances) at most 5 times the minimum cost. Korupolu, Plaxton, and Rajaraman (1998) analyzed a variant in which they permitted adding, deleting, and swapping medians and got

3

5

ε

approximation by taking k

1

ε

medians.

Departmental Seminar – p.15/43

slide-24
SLIDE 24

Some notation

Sj j s S

✔ ✕ ✖

S

✖ ✔

k NS

  • s

cost

  • S
✂ ✔

the sum of lengths of all the red segments

Departmental Seminar – p.16/43

slide-25
SLIDE 25

Some more notation

✗ ✖

O

✖ ✔

k NO

O

✔ ✕
  • Departmental Seminar – p.17/43
slide-26
SLIDE 26

Some more notation

NO

  • s1

s2 s4 s3 No

s1

No

s4

No

s3

No

s2

No

s

NO

  • ✞✙✘

NS

s

Departmental Seminar – p.18/43

slide-27
SLIDE 27

Local optimality of S

Since S is a local optimum solution,

Departmental Seminar – p.19/43

slide-28
SLIDE 28

Local optimality of S

Since S is a local optimum solution, We have,

cost

S

s

cost

S

for all s

S

O

Departmental Seminar – p.19/43

slide-29
SLIDE 29

Local optimality of S

Since S is a local optimum solution, We have,

cost

S

s

cost

S

for all s

S

O

We shall add k of these inequalities (chosen carefully) to show that,

cost

S

✞ ✑

5

cost

O

> >

Departmental Seminar – p.19/43

slide-30
SLIDE 30

Capture

NO

  • s1

s2 s4 s3 No

s1

No

s4

No

s3

No

s2

We say that s

S captures o

O if

No

s

✜✣✢ ✜

NO

2

Capture graph

Departmental Seminar – p.20/43

slide-31
SLIDE 31

A mapping π

NO

  • s1

s2 s4 s3 No

s1

No

s4

No

s3

No

s2

We consider a permutation π : NO

NO

that satisfies the following property: if s does not capture o then a point j

No

s should get mapped

  • utside No

s .

Departmental Seminar – p.21/43

slide-32
SLIDE 32

A mapping π

NO

  • s1

s2 s4 s3 No

s1

No

s4

No

s3

No

s2

We consider a permutation π : NO

NO

that satisfies the following property: if s does not capture o then a point j

No

s should get mapped

  • utside No

s .

Departmental Seminar – p.22/43

slide-33
SLIDE 33

A mapping π

NO

  • s1

s2 s4 s3 No

s1

No

s4

No

s3

No

s2

i

l

2

NO

✖ ✔

l i l 2 1

π

Departmental Seminar – p.23/43

slide-34
SLIDE 34

Capture graph

O S l

l

2

Construct a bipartite graph G

✠ ✆

O

S

E

where there is an edge

s

if and only if s

S captures o

O.

Capture

Departmental Seminar – p.24/43

slide-35
SLIDE 35

Swaps considered

O S l

l

2

Departmental Seminar – p.25/43

slide-36
SLIDE 36

Swaps considered

O S l

l

2

“Why consider the swaps?”

Departmental Seminar – p.25/43

slide-37
SLIDE 37

Properties of the swaps considered

O S l

l

2

If

s

is considered, then s does not capture any o

✌ ✍ ✠
  • .

Departmental Seminar – p.26/43

slide-38
SLIDE 38

Properties of the swaps considered

O S l

l

2

If

s

is considered, then s does not capture any o

✌ ✍ ✠
  • .

Any o

O is considered in exactly one swap.

Departmental Seminar – p.26/43

slide-39
SLIDE 39

Properties of the swaps considered

O S l

l

2

If

s

is considered, then s does not capture any o

✌ ✍ ✠
  • .

Any o

O is considered in exactly one swap.

Any s

S is considered in at most 2 swaps.

Departmental Seminar – p.26/43

slide-40
SLIDE 40

Focus on a swap

s

  • s

Consider a swap

s

that is one of the k swaps defined above. We know cost

S

s

cost

S

.

Departmental Seminar – p.27/43

slide-41
SLIDE 41

Upper bound on cost

S

s

In the solution S

s

  • , each point is connected to the

closest median in S

s

  • .

Departmental Seminar – p.28/43

slide-42
SLIDE 42

Upper bound on cost

S

s

In the solution S

s

  • , each point is connected to the

closest median in S

s

  • .

cost

S

s

is the sum of distances of all the points to their nearest medians.

Departmental Seminar – p.28/43

slide-43
SLIDE 43

Upper bound on cost

S

s

In the solution S

s

  • , each point is connected to the

closest median in S

s

  • .

cost

S

s

is the sum of distances of all the points to their nearest medians. We are going to demonstrate a possible way of connecting each client to a median in S

s

  • to get an upper bound
  • n cost

S

s

.

Departmental Seminar – p.28/43

slide-44
SLIDE 44

Upper bound on cost

S

s

s NO

  • Points in NO

are now connected to the new median o.

Departmental Seminar – p.29/43

slide-45
SLIDE 45

Upper bound on cost

S

s

s NO

  • Thus, the increase in the distance for j

NO

is at most

Oj

Sj

Departmental Seminar – p.30/43

slide-46
SLIDE 46

Upper bound on cost

S

s

s NO

  • j

Consider a point j

NS

s

✞✯

NO

.

Departmental Seminar – p.31/43

slide-47
SLIDE 47

Upper bound on cost

S

s

s NO

  • j

π

  • j

s

Consider a point j

NS

s

✞✯

NO

. Suppose π

j

✞ ☞

NS

s

✌ ✞

. (Note that s

✌ ✍ ✠

s.)

Departmental Seminar – p.32/43

slide-48
SLIDE 48

Upper bound on cost

S

s

s NO

  • j

π

  • j

s

Consider a point j

NS

s

✞✯

NO

. Suppose π

j

✞ ☞

NS

s

✌ ✞

. (Note that s

✌ ✍ ✠

s.)

Connect j to s

now.

Departmental Seminar – p.33/43

slide-49
SLIDE 49

Upper bound on cost

S

s

j s

π

  • j

j

j

Oj

New distance of j is at most O j

j

✴ ✏

j

.

Departmental Seminar – p.34/43

slide-50
SLIDE 50

Upper bound on cost

S

s

j s

π

  • j

j

j

Oj

New distance of j is at most O j

j

✴ ✏

j

. Therefore, the increase in the distance for j

NS

s

✞ ✯

NO

is at most

Oj

j

✴ ✏

j

✴ ✎

Sj

Departmental Seminar – p.34/43

slide-51
SLIDE 51

Upper bound on the increase in the cost

Lets try to count the total increase in the cost.

Departmental Seminar – p.35/43

slide-52
SLIDE 52

Upper bound on the increase in the cost

Lets try to count the total increase in the cost. Points j

NO

contribute at most

Oj

Sj

✞ ✚

Departmental Seminar – p.35/43

slide-53
SLIDE 53

Upper bound on the increase in the cost

Lets try to count the total increase in the cost. Points j

NO

contribute at most

Oj

Sj

✞ ✚

Points j

NS

s

✞ ✯

NO

contribute at most

Oj

j

✴ ✏

j

✴ ✎

Sj

✞ ✚

Departmental Seminar – p.35/43

slide-54
SLIDE 54

Upper bound on the increase in the cost

Lets try to count the total increase in the cost. Points j

NO

contribute at most

Oj

Sj

✞ ✚

Points j

NS

s

✞ ✯

NO

contribute at most

Oj

j

✴ ✏

j

✴ ✎

Sj

✞ ✚

Thus, the total increase is at most,

j

NO

Oj

Sj

✞ ✏

j

NS

s

✴✶

NO

Oj

j

✴ ✏

j

✴ ✎

Sj

✞ ✚

Departmental Seminar – p.35/43

slide-55
SLIDE 55

Upper bound on the increase in the cost

j

NO

Oj

Sj

✞ ✏

j

NS

s

✴ ✶

NO

Oj

j

✴ ✏

j

✴ ✎

Sj

Departmental Seminar – p.36/43

slide-56
SLIDE 56

Upper bound on the increase in the cost

j

NO

Oj

Sj

✞ ✏

j

NS

s

✴ ✶

NO

Oj

j

✴ ✏

j

✴ ✎

Sj

✞ ✟

cost

S

s

cost

S

Departmental Seminar – p.36/43

slide-57
SLIDE 57

Upper bound on the increase in the cost

j

NO

Oj

Sj

✞ ✏

j

NS

s

✴ ✶

NO

Oj

j

✴ ✏

j

✴ ✎

Sj

✞ ✟

cost

S

s

cost

S

✞ ✟

Departmental Seminar – p.36/43

slide-58
SLIDE 58

Plan

We have one such inequality for each swap

s

.

j

NO

Oj

Sj

✞ ✏

j

NS

s

✴✶

NO

Oj

j

✴ ✏

j

✴ ✎

Sj

✞ ✟ ✚

Departmental Seminar – p.37/43

slide-59
SLIDE 59

Plan

We have one such inequality for each swap

s

.

j

NO

Oj

Sj

✞ ✏

j

NS

s

✴✶

NO

Oj

j

✴ ✏

j

✴ ✎

Sj

✞ ✟ ✚

There are k swaps that we have defined.

Departmental Seminar – p.37/43

slide-60
SLIDE 60

Plan

We have one such inequality for each swap

s

.

j

NO

Oj

Sj

✞ ✏

j

NS

s

✴✶

NO

Oj

j

✴ ✏

j

✴ ✎

Sj

✞ ✟ ✚

There are k swaps that we have defined.

O S l

l

2

Departmental Seminar – p.37/43

slide-61
SLIDE 61

Plan

We have one such inequality for each swap

s

.

j

NO

Oj

Sj

✞ ✏

j

NS

s

✴✶

NO

Oj

j

✴ ✏

j

✴ ✎

Sj

✞ ✟ ✚

There are k swaps that we have defined.

O S l

l

2

Lets add the inequalities for all the k swaps and see what we get!

Departmental Seminar – p.37/43

slide-62
SLIDE 62

The first term

✹ ✹ ✹

j

NO

Oj

Sj

✞ ✏

j

NS

s

✴ ✶

NO

Oj

j

✴ ✏

j

✴ ✎

Sj

✞ ✟ ✚

Departmental Seminar – p.38/43

slide-63
SLIDE 63

The first term

✹ ✹ ✹

j

NO

Oj

Sj

✞ ✏

j

NS

s

✴ ✶

NO

Oj

j

✴ ✏

j

✴ ✎

Sj

✞ ✟ ✚

Note that each o

O is considered in exactly one swap.

Departmental Seminar – p.38/43

slide-64
SLIDE 64

The first term

✹ ✹ ✹

j

NO

Oj

Sj

✞ ✏

j

NS

s

✴ ✶

NO

Oj

j

✴ ✏

j

✴ ✎

Sj

✞ ✟ ✚

Note that each o

O is considered in exactly one swap.

Thus, the first term added over all the swaps is

O ∑ j

NO

Oj

Sj

Departmental Seminar – p.38/43

slide-65
SLIDE 65

The first term

✹ ✹ ✹

j

NO

Oj

Sj

✞ ✏

j

NS

s

✴ ✶

NO

Oj

j

✴ ✏

j

✴ ✎

Sj

✞ ✟ ✚

Note that each o

O is considered in exactly one swap.

Thus, the first term added over all the swaps is

O ∑ j

NO

Oj

Sj

✞ ✠

j

Oj

Sj

Departmental Seminar – p.38/43

slide-66
SLIDE 66

The first term

✹ ✹ ✹

j

NO

Oj

Sj

✞ ✏

j

NS

s

✴ ✶

NO

Oj

j

✴ ✏

j

✴ ✎

Sj

✞ ✟ ✚

Note that each o

O is considered in exactly one swap.

Thus, the first term added over all the swaps is

O ∑ j

NO

Oj

Sj

✞ ✠

j

Oj

Sj

✞ ✠

cost

O

✞ ✎

cost

S

✞ ✚

Departmental Seminar – p.38/43

slide-67
SLIDE 67

The second term

✹ ✹ ✹

j

NO

Oj

Sj

✞ ✏

j

NS

s

✴✶

NO

Oj

j

✴ ✏

j

✴ ✎

Sj

✞ ✟ ✚

Departmental Seminar – p.39/43

slide-68
SLIDE 68

The second term

✹ ✹ ✹

j

NO

Oj

Sj

✞ ✏

j

NS

s

✴✶

NO

Oj

j

✴ ✏

j

✴ ✎

Sj

✞ ✟ ✚

Note that

Oj

j

✴ ✏

j

✴ ✟

Sj

Departmental Seminar – p.39/43

slide-69
SLIDE 69

The second term

✹ ✹ ✹

j

NO

Oj

Sj

✞ ✏

j

NS

s

✴✶

NO

Oj

j

✴ ✏

j

✴ ✎

Sj

✞ ✟ ✚

Note that

Oj

j

✴ ✏

j

✴ ✟

Sj

Thus

Oj

j

✴ ✏

j

✴ ✎

Sj

✟ ✚

Departmental Seminar – p.39/43

slide-70
SLIDE 70

The second term

✹ ✹ ✹

j

NO

Oj

Sj

✞ ✏

j

NS

s

✴✶

NO

Oj

j

✴ ✏

j

✴ ✎

Sj

✞ ✟ ✚

Note that

Oj

j

✴ ✏

j

✴ ✟

Sj

Thus

Oj

j

✴ ✏

j

✴ ✎

Sj

✟ ✚

Thus the second term is at most

j

NS

s

✴ ✆

Oj

j

✴ ✏

j

✴ ✎

Sj

✞ ✚

Departmental Seminar – p.39/43

slide-71
SLIDE 71

The second term

✹ ✹ ✹

Note that each s

S is considered in at most two swaps.

Departmental Seminar – p.40/43

slide-72
SLIDE 72

The second term

✹ ✹ ✹

Note that each s

S is considered in at most two swaps.

Thus, the second term added over all the swaps is at most

2∑

s

S ∑ j

NS

s

✴ ✆

Oj

j

✴ ✏

j

✴ ✎

Sj

Departmental Seminar – p.40/43

slide-73
SLIDE 73

The second term

✹ ✹ ✹

Note that each s

S is considered in at most two swaps.

Thus, the second term added over all the swaps is at most

2∑

s

S ∑ j

NS

s

✴ ✆

Oj

j

✴ ✏

j

✴ ✎

Sj

✞ ✠

2 ∑

j

Oj

j

✴ ✏

j

✴ ✎

Sj

Departmental Seminar – p.40/43

slide-74
SLIDE 74

The second term

✹ ✹ ✹

Note that each s

S is considered in at most two swaps.

Thus, the second term added over all the swaps is at most

2∑

s

S ∑ j

NS

s

✴ ✆

Oj

j

✴ ✏

j

✴ ✎

Sj

✞ ✠

2 ∑

j

Oj

j

✴ ✏

j

✴ ✎

Sj

✞ ✠

2

j

Oj

j

j

✴ ✏

j

j

✴ ✎

j

Sj

Departmental Seminar – p.40/43

slide-75
SLIDE 75

The second term

✹ ✹ ✹

Note that each s

S is considered in at most two swaps.

Thus, the second term added over all the swaps is at most

2∑

s

S ∑ j

NS

s

✴ ✆

Oj

j

✴ ✏

j

✴ ✎

Sj

✞ ✠

2 ∑

j

Oj

j

✴ ✏

j

✴ ✎

Sj

✞ ✠

2

j

Oj

j

j

✴ ✏

j

j

✴ ✎

j

Sj

4

cost

O

✞ ✚

Departmental Seminar – p.40/43

slide-76
SLIDE 76

Putting things together

s

j

NO

Oj

Sj

✞ ✏

j

NS

s

✴✶

NO

Oj

j

✴ ✏

j

✴ ✎

Sj

Departmental Seminar – p.41/43

slide-77
SLIDE 77

Putting things together

s

j

NO

Oj

Sj

✞ ✏

j

NS

s

✴✶

NO

Oj

j

✴ ✏

j

✴ ✎

Sj

✞ ✑ ✽

cost

O

✞ ✎

cost

S

✞✾ ✏ ✽

4

cost

O

✞✾

Departmental Seminar – p.41/43

slide-78
SLIDE 78

Putting things together

s

j

NO

Oj

Sj

✞ ✏

j

NS

s

✴✶

NO

Oj

j

✴ ✏

j

✴ ✎

Sj

✞ ✑ ✽

cost

O

✞ ✎

cost

S

✞✾ ✏ ✽

4

cost

O

✞✾ ✠

5

cost

O

✞ ✎

cost

S

✞ ✚

Departmental Seminar – p.41/43

slide-79
SLIDE 79

Putting things together

s

j

NO

Oj

Sj

✞ ✏

j

NS

s

✴✶

NO

Oj

j

✴ ✏

j

✴ ✎

Sj

✞ ✑ ✽

cost

O

✞ ✎

cost

S

✞✾ ✏ ✽

4

cost

O

✞✾ ✠

5

cost

O

✞ ✎

cost

S

✞ ✚

Therefore,

cost

S

✞ ✑

5

cost

O

✞ ✚

Departmental Seminar – p.41/43

slide-80
SLIDE 80

A tight example

2 2 2 2

  • k

1

✂ ✥

2

  • k

1

✂ ✥

2

2 2 1 1 1 1 1 1

  • k

1

✂ ❀ ❀ ❀

O S

❀ ❀ ❀

Departmental Seminar – p.42/43

slide-81
SLIDE 81

A tight example

2 2 2 2

  • k

1

✂ ✥

2

  • k

1

✂ ✥

2

2 2 1 1 1 1 1 1

  • k

1

✂ ❀ ❀ ❀

O S

❀ ❀ ❀

cost

S

✞ ✠

4

✛ ✆

k

1

✞ ✓

2

✏ ✆

k

1

✞ ✓

2

✠ ✆

5k

3

✞ ✓

2

Departmental Seminar – p.42/43

slide-82
SLIDE 82

A tight example

2 2 2 2

  • k

1

✂ ✥

2

  • k

1

✂ ✥

2

2 2 1 1 1 1 1 1

  • k

1

✂ ❀ ❀ ❀

O S

❀ ❀ ❀

cost

S

✞ ✠

4

✛ ✆

k

1

✞ ✓

2

✏ ✆

k

1

✞ ✓

2

✠ ✆

5k

3

✞ ✓

2 cost

O

✞ ✠ ✏ ✆

k

1

✞ ✓

2

✠ ✆

k

1

✞ ✓

2

Departmental Seminar – p.42/43

slide-83
SLIDE 83

Doing multiple swaps

Doing single swaps yields 5 approximation.

Departmental Seminar – p.43/43

slide-84
SLIDE 84

Doing multiple swaps

Doing single swaps yields 5 approximation. Doing p-way swaps yields

3

2

p

approximation.

Departmental Seminar – p.43/43