85
Local Search Based Approximation Algorithms The k -median problem Vinayaka Pandit IBM India Research Laboratory joint work with Naveen Garg, Rohit Khandekar, and Vijay Arya The 2011 School on Approximability, Bangalore – p.1/51

Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

  • Upload
    others

  • View
    8

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Local Search Based ApproximationAlgorithms

The k-median problem

Vinayaka Pandit

IBM India Research Laboratory

joint work with Naveen Garg, Rohit Khandekar, and Vijay Arya

The 2011 School on Approximability, Bangalore – p.1/51

Page 2: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Outline

Local Search Technique

Simple Example Using Max-CUT

Analysis of a popular heuristic for the k-medianproblem

Some interesting questions

The 2011 School on Approximability, Bangalore – p.2/51

Page 3: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Local Search Technique

Let F denote the set of all feasible solutions for aproblem instance I.

Define a function N : F → 2F which associates foreach solution, a set of neighboring solutions.

Start with some feasible solution and iterativelyperform “local operations”. Suppose SC ∈ F is thecurrent solution. We move to any solution SN ∈ N (SC)which is strictly better than SC .

Output SL, a locally optimal solution for which nosolution in N (SL) is strictly better than SL itself.

The 2011 School on Approximability, Bangalore – p.3/51

Page 4: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Example: MAX-CUT

Given a graph G = (V,E),

Partition V into A,B s.t. #edges between A and B ismaximized.

Note that MAX-CUT is ≤ |E|.

The 2011 School on Approximability, Bangalore – p.4/51

Page 5: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Local Search for MAX-CUT

Algorithm Local Search for MAX-CUT.

1. A,B ← any partition of V ;2. While ∃ u ∈ V such that in-degree(u) > out-

degree(u),do

if(u ∈ A), Move u to B

else, Move u to A

done3. return A,B

The 2011 School on Approximability, Bangalore – p.5/51

Page 6: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Neighborhood Function

Solution Space: the set of all partitions.

Neighborhood Function: Neighbors of a partition(A,B) are all the partitions (A′, B′) obtained byinterchanging the side of a single vertex.

The 2011 School on Approximability, Bangalore – p.6/51

Page 7: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Analysis for MAX-CUT

A B

u

1. in-d(u) ≤ out-d(u) (Apply Conditions for LocalOptimality)

2.∑

u∈V in-d(u) ≤∑

u∈V out-d(u) (Consider suitable set

of local operations)

3. #Internal Edges ≤ #Cut Edges

#Cut-edges ≥ |E|2⇒ 2-approximation (Infer)

The 2011 School on Approximability, Bangalore – p.7/51

Page 8: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Local Search for Approximation

Folklore: the 2-approx for MAX-CUT

Fürer and Raghavachari: Additive Approx for Min.Degree Spanning Tree.

Lu and Ravi: Constant Factor approx for SpanningTrees with maximum leaves.

Könemann and Ravi: Bi-criteria approximation forBounded Degree MST.

Quite successful as a technique for Facility Locationand Clustering problems. Started with Korupolu et. al.

The 2011 School on Approximability, Bangalore – p.8/51

Page 9: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

The k-median problem

We are given n points in a metric space.

The 2011 School on Approximability, Bangalore – p.9/51

Page 10: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

The k-median problem

We are given n points in a metric space.

uv

w

d(w, v)d(u, w)

≤ d(u, w) + d(w, v)

d(u, v) ≥ 0, d(u, u) = 0, d(u, v) = d(v, u)

The 2011 School on Approximability, Bangalore – p.10/51

Page 11: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

The k-median problem

We are given n points in a metric space.

The 2011 School on Approximability, Bangalore – p.11/51

Page 12: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

The k-median problem

We are given n points in a metric space.

We want to identify k “medians” such that the sum of dis-

tances of all the points to their nearest medians is mini-

mized.The 2011 School on Approximability, Bangalore – p.12/51

Page 13: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

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.The 2011 School on Approximability, Bangalore – p.13/51

Page 14: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

A local search algorithm

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

The 2011 School on Approximability, Bangalore – p.14/51

Page 15: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

A local search algorithm

And SWAP tentatively!

The 2011 School on Approximability, Bangalore – p.15/51

Page 16: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

A local search algorithm

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

The 2011 School on Approximability, Bangalore – p.16/51

Page 17: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

A local search algorithm

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

Stop, if there is no swap that improves the solution.

The 2011 School on Approximability, Bangalore – p.16/51

Page 18: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

The algorithm

Algorithm Local Search.

1. S ← any k medians2. While ∃ s ∈ S and s′ 6∈ S such that,

cost(S − s + s′) < cost(S),do S ← S − s + s′

3. return S

The 2011 School on Approximability, Bangalore – p.17/51

Page 19: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

The algorithm

Algorithm Local Search.

1. S ← any k medians2. While ∃ s ∈ S and s′ 6∈ S such that,

cost(S − s + s′) < (1− ǫ)cost(S),do S ← S − s + s′

3. return S

The 2011 School on Approximability, Bangalore – p.18/51

Page 20: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Main theorem

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

The 2011 School on Approximability, Bangalore – p.19/51

Page 21: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Main theorem

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

Korupolu, Plaxton, and Rajaraman (1998) analyzed avariant in which they permitted adding, deleting, andswapping medians and got (3 + 5/ǫ) approximation bytaking k(1 + ǫ) medians.

The 2011 School on Approximability, Bangalore – p.19/51

Page 22: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Some notation

Sj

js

S = { |S| = k NS(s)

cost(S) = the sum of lengths of all the red segments

}

The 2011 School on Approximability, Bangalore – p.20/51

Page 23: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Some more notation

} |O| = k

NO(o)

O = {

o

The 2011 School on Approximability, Bangalore – p.21/51

Page 24: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Some more notation

NO(o)

o

s1s2

s4 s3

Nos1

Nos4

Nos3

Nos2

N os = NO(o) ∩NS(s)

The 2011 School on Approximability, Bangalore – p.22/51

Page 25: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Local optimality of S

Since S is a local optimum solution,

The 2011 School on Approximability, Bangalore – p.23/51

Page 26: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Local optimality of S

Since S is a local optimum solution,

We have,

cost(S − s + o) ≥ cost(S) for all s ∈ S, o ∈ O.

The 2011 School on Approximability, Bangalore – p.23/51

Page 27: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Local optimality of S

Since S is a local optimum solution,

We have,

cost(S − s + o) ≥ cost(S) for all s ∈ S, o ∈ O.

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

cost(S) ≤ 5 · cost(O)

> >

The 2011 School on Approximability, Bangalore – p.23/51

Page 28: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

What happens when we swap < s, o>?

o

s

oi

Nois

Nos

NS(s)

All the points in NS(s) have to be rerouted to one of thefacilities in S − {s}+ {o}.

We are interested two types of clients: those belonging to

N os and those not belonging to N o

s .

The 2011 School on Approximability, Bangalore – p.24/51

Page 29: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Rerouting j ∈ N os

?s

o

jSj

Oj

oi

Nois

Nos

NS(s)

Rerouting is easy. Send it to o. Change in cost = Oj − Sj.

The 2011 School on Approximability, Bangalore – p.25/51

Page 30: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Rerouting j 6∈ N os

Look at NO(oi).

s

oi

Nois?

oj

ss′

j′

Oj′

Sj′

Nois

oi

Oj

Map j to a unique j ′ ∈ NO(oi) outside N ois and route via j ′.

Change in cost = Oj + Oj′ + Sj′ − Sj.

Ensure that every client is involved in exactly one reroute.

Therefore, the mapping need to be one-to-one and onto.The 2011 School on Approximability, Bangalore – p.26/51

Page 31: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Desired mapping of clients inside NO(o)

NO(o)

o

s1s2

s4 s3

Nos1

Nos4

Nos3

Nos2

We desire a permutation π : NO(o)→ NO(o) that satisfiesthe following property:

Client j ∈ N os should get mapped to j ′ ∈ NO(o), but outside

N os .

The 2011 School on Approximability, Bangalore – p.27/51

Page 32: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Notion of Capture

NO(o)

o

s1s2

s4 s3

Nos1

Nos4

Nos3

Nos2

We say that s ∈ S captures o ∈ O if

|N os | >

|NO(o)|

2.

Note: A facility o ∈ O is captured precisely when a mapping as we described is not

feasible.

Capture graphThe 2011 School on Approximability, Bangalore – p.28/51

Page 33: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

A mapping π

NO(o)

o

s1s2

s4 s3

Nos1

Nos4

Nos3

Nos2

We consider a permutation π : NO(o)→ NO(o) thatsatisfies the following property:

if s does not capture o then a point j ∈ N os should get

mapped outside N os .

The 2011 School on Approximability, Bangalore – p.29/51

Page 34: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

A mapping π

NO(o)

o

s1s2

s4 s3

Nos1

Nos4

Nos3

Nos2

We consider a permutation π : NO(o)→ NO(o) thatsatisfies the following property:

if s does not capture o then a point j ∈ N os should get

mapped outside N os .

The 2011 School on Approximability, Bangalore – p.30/51

Page 35: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

A mapping π

NO(o)

o

s1s2

s4 s3

Nos1

Nos4

Nos3

Nos2

i + l/2

|NO(o)| = l

i l21

π

The 2011 School on Approximability, Bangalore – p.31/51

Page 36: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Capture graph

O

S

l

≥ l/2

Construct a bipartite graph G = (O,S,E) where there is anedge (o, s) if and only if s ∈ S captures o ∈ O.

Capture

The 2011 School on Approximability, Bangalore – p.32/51

Page 37: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Swaps considered

O

S

l

≥ l/2

The 2011 School on Approximability, Bangalore – p.33/51

Page 38: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Swaps considered

O

S

l

≥ l/2

“Why consider the swaps?”

The 2011 School on Approximability, Bangalore – p.33/51

Page 39: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Properties of the swaps considered

O

S

l

≥ l/2

If 〈s, o〉 is considered, then s does not capture anyo′ 6= o.

The 2011 School on Approximability, Bangalore – p.34/51

Page 40: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Properties of the swaps considered

O

S

l

≥ l/2

If 〈s, o〉 is considered, then s does not capture anyo′ 6= o.

Any o ∈ O is considered in exactly one swap.

The 2011 School on Approximability, Bangalore – p.34/51

Page 41: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Properties of the swaps considered

O

S

l

≥ l/2

If 〈s, o〉 is considered, then s does not capture anyo′ 6= o.

Any o ∈ O is considered in exactly one swap.

Any s ∈ S is considered in at most 2 swaps.The 2011 School on Approximability, Bangalore – p.34/51

Page 42: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Focus on a swap 〈s, o〉

os

Consider a swap 〈s, o〉 that is one of the k swaps defined

above. We know cost(S − s + o) ≥ cost(S).

The 2011 School on Approximability, Bangalore – p.35/51

Page 43: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Upper bound on cost(S − s + o)

In the solution S − s + o, each point is connected tothe closest median in S − s + o.

The 2011 School on Approximability, Bangalore – p.36/51

Page 44: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Upper bound on cost(S − s + o)

In the solution S − s + o, each point is connected tothe closest median in S − s + o.

cost(S − s + o) is the sum of distances of all the pointsto their nearest medians.

The 2011 School on Approximability, Bangalore – p.36/51

Page 45: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Upper bound on cost(S − s + o)

In the solution S − s + o, each point is connected tothe closest median in S − s + o.

cost(S − s + o) is the sum of distances of all the pointsto their nearest medians.

We are going to demonstrate a possible way ofconnecting each client to a median in S − s + o to getan upper bound on cost(S − s + o).

The 2011 School on Approximability, Bangalore – p.36/51

Page 46: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Upper bound on cost(S − s + o)

sNO(o)o

Points in NO(o) are now connected to the new median o.

The 2011 School on Approximability, Bangalore – p.37/51

Page 47: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Upper bound on cost(S − s + o)

sNO(o)o

Thus, the increase in the distance for j ∈ NO(o) is at most

Oj − Sj.

The 2011 School on Approximability, Bangalore – p.38/51

Page 48: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Upper bound on cost(S − s + o)

sNO(o)o

j

Consider a point j ∈ NS(s) \NO(o).

The 2011 School on Approximability, Bangalore – p.39/51

Page 49: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Upper bound on cost(S − s + o)

sNO(o)o

j

π(j) s′

Consider a point j ∈ NS(s) \NO(o).

Suppose π(j) ∈ NS(s′). (Note that s′ 6= s.)

The 2011 School on Approximability, Bangalore – p.40/51

Page 50: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Upper bound on cost(S − s + o)

sNO(o)o

j

π(j) s′

Consider a point j ∈ NS(s) \NO(o).

Suppose π(j) ∈ NS(s′). (Note that s′ 6= s.)

Connect j to s′ now.The 2011 School on Approximability, Bangalore – p.41/51

Page 51: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Upper bound on cost(S − s + o)

j

s′

π(j)

Sπ(j)Oπ(j)

Oj

o′

New distance of j is at most Oj + Oπ(j) + Sπ(j).

The 2011 School on Approximability, Bangalore – p.42/51

Page 52: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Upper bound on cost(S − s + o)

j

s′

π(j)

Sπ(j)Oπ(j)

Oj

o′

New distance of j is at most Oj + Oπ(j) + Sπ(j).

Therefore, the increase in the distance forj ∈ NS(s) \NO(o) is at most

Oj + Oπ(j) + Sπ(j) − Sj.

The 2011 School on Approximability, Bangalore – p.42/51

Page 53: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Upper bound on the increase in the cost

Lets try to count the total increase in the cost.

The 2011 School on Approximability, Bangalore – p.43/51

Page 54: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Upper bound on the increase in the cost

Lets try to count the total increase in the cost.

Points j ∈ NO(o) contribute at most

(Oj − Sj).

The 2011 School on Approximability, Bangalore – p.43/51

Page 55: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Upper bound on the increase in the cost

Lets try to count the total increase in the cost.

Points j ∈ NO(o) contribute at most

(Oj − Sj).

Points j ∈ NS(s) \NO(o) contribute at most

(Oj + Oπ(j) + Sπ(j) − Sj).

The 2011 School on Approximability, Bangalore – p.43/51

Page 56: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Upper bound on the increase in the cost

Lets try to count the total increase in the cost.

Points j ∈ NO(o) contribute at most

(Oj − Sj).

Points j ∈ NS(s) \NO(o) contribute at most

(Oj + Oπ(j) + Sπ(j) − Sj).

Thus, the total increase is at most,∑

j∈NO(o)

(Oj − Sj) +∑

j∈NS(s)\NO(o)

(Oj + Oπ(j) + Sπ(j) − Sj).

The 2011 School on Approximability, Bangalore – p.43/51

Page 57: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Upper bound on the increase in the cost

j∈NO(o)

(Oj − Sj) +∑

j∈NS(s)\NO(o)

(Oj + Oπ(j) + Sπ(j) − Sj)

The 2011 School on Approximability, Bangalore – p.44/51

Page 58: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Upper bound on the increase in the cost

j∈NO(o)

(Oj − Sj) +∑

j∈NS(s)\NO(o)

(Oj + Oπ(j) + Sπ(j) − Sj)

≥ cost(S − s + o)− cost(S)

The 2011 School on Approximability, Bangalore – p.44/51

Page 59: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Upper bound on the increase in the cost

j∈NO(o)

(Oj − Sj) +∑

j∈NS(s)\NO(o)

(Oj + Oπ(j) + Sπ(j) − Sj)

≥ cost(S − s + o)− cost(S)

≥ 0

The 2011 School on Approximability, Bangalore – p.44/51

Page 60: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Plan

We have one such inequality for each swap 〈s, o〉.

j∈NO(o)

(Oj−Sj)+∑

j∈NS(s)\NO(o)

(Oj+Oπ(j)+Sπ(j)−Sj) ≥ 0.

The 2011 School on Approximability, Bangalore – p.45/51

Page 61: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Plan

We have one such inequality for each swap 〈s, o〉.

j∈NO(o)

(Oj−Sj)+∑

j∈NS(s)\NO(o)

(Oj+Oπ(j)+Sπ(j)−Sj) ≥ 0.

There are k swaps that we have defined.

The 2011 School on Approximability, Bangalore – p.45/51

Page 62: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Plan

We have one such inequality for each swap 〈s, o〉.

j∈NO(o)

(Oj−Sj)+∑

j∈NS(s)\NO(o)

(Oj+Oπ(j)+Sπ(j)−Sj) ≥ 0.

There are k swaps that we have defined.

O

S

l

≥ l/2

The 2011 School on Approximability, Bangalore – p.45/51

Page 63: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Plan

We have one such inequality for each swap 〈s, o〉.

j∈NO(o)

(Oj−Sj)+∑

j∈NS(s)\NO(o)

(Oj+Oπ(j)+Sπ(j)−Sj) ≥ 0.

There are k swaps that we have defined.

O

S

l

≥ l/2

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

The 2011 School on Approximability, Bangalore – p.45/51

Page 64: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

The first term . . .

j∈NO(o)

(Oj − Sj)

+∑

j∈NS(s)\NO(o)

(Oj+Oπ(j)+Sπ(j)−Sj) ≥ 0.

The 2011 School on Approximability, Bangalore – p.46/51

Page 65: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

The first term . . .

j∈NO(o)

(Oj − Sj)

+∑

j∈NS(s)\NO(o)

(Oj+Oπ(j)+Sπ(j)−Sj) ≥ 0.

Note that each o ∈ O is considered in exactly one swap.

The 2011 School on Approximability, Bangalore – p.46/51

Page 66: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

The first term . . .

j∈NO(o)

(Oj − Sj)

+∑

j∈NS(s)\NO(o)

(Oj+Oπ(j)+Sπ(j)−Sj) ≥ 0.

Note that each o ∈ O is considered in exactly one swap.Thus, the first term added over all the swaps is

o∈O

j∈NO(o)

(Oj − Sj)

The 2011 School on Approximability, Bangalore – p.46/51

Page 67: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

The first term . . .

j∈NO(o)

(Oj − Sj)

+∑

j∈NS(s)\NO(o)

(Oj+Oπ(j)+Sπ(j)−Sj) ≥ 0.

Note that each o ∈ O is considered in exactly one swap.Thus, the first term added over all the swaps is

o∈O

j∈NO(o)

(Oj − Sj)

=∑

j

(Oj − Sj)

The 2011 School on Approximability, Bangalore – p.46/51

Page 68: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

The first term . . .

j∈NO(o)

(Oj − Sj)

+∑

j∈NS(s)\NO(o)

(Oj+Oπ(j)+Sπ(j)−Sj) ≥ 0.

Note that each o ∈ O is considered in exactly one swap.Thus, the first term added over all the swaps is

o∈O

j∈NO(o)

(Oj − Sj)

=∑

j

(Oj − Sj)

= cost(O)− cost(S).The 2011 School on Approximability, Bangalore – p.46/51

Page 69: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

The second term . . .

j∈NO(o)

(Oj−Sj)+

j∈NS(s)\NO(o)

(Oj + Oπ(j) + Sπ(j) − Sj)

≥ 0.

The 2011 School on Approximability, Bangalore – p.47/51

Page 70: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

The second term . . .

j∈NO(o)

(Oj−Sj)+

j∈NS(s)\NO(o)

(Oj + Oπ(j) + Sπ(j) − Sj)

≥ 0.

Note thatOj + Oπ(j) + Sπ(j) ≥ Sj.

The 2011 School on Approximability, Bangalore – p.47/51

Page 71: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

The second term . . .

j∈NO(o)

(Oj−Sj)+

j∈NS(s)\NO(o)

(Oj + Oπ(j) + Sπ(j) − Sj)

≥ 0.

Note thatOj + Oπ(j) + Sπ(j) ≥ Sj.

ThusOj + Oπ(j) + Sπ(j) − Sj ≥ 0.

The 2011 School on Approximability, Bangalore – p.47/51

Page 72: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

The second term . . .

j∈NO(o)

(Oj−Sj)+

j∈NS(s)\NO(o)

(Oj + Oπ(j) + Sπ(j) − Sj)

≥ 0.

Note thatOj + Oπ(j) + Sπ(j) ≥ Sj.

ThusOj + Oπ(j) + Sπ(j) − Sj ≥ 0.

Thus the second term is at most∑

j∈NS(s)

(Oj + Oπ(j) + Sπ(j) − Sj).

The 2011 School on Approximability, Bangalore – p.47/51

Page 73: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

The second term . . .

Note that each s ∈ S is considered in at most two swaps.

The 2011 School on Approximability, Bangalore – p.48/51

Page 74: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

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 + Oπ(j) + Sπ(j) − Sj)

The 2011 School on Approximability, Bangalore – p.48/51

Page 75: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

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 + Oπ(j) + Sπ(j) − Sj)

= 2∑

j

(Oj + Oπ(j) + Sπ(j) − Sj)

The 2011 School on Approximability, Bangalore – p.48/51

Page 76: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

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 + Oπ(j) + Sπ(j) − Sj)

= 2∑

j

(Oj + Oπ(j) + Sπ(j) − Sj)

= 2

[

j

Oj +∑

j

Oπ(j) +∑

j

Sπ(j) −∑

j

Sj

]

The 2011 School on Approximability, Bangalore – p.48/51

Page 77: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

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 + Oπ(j) + Sπ(j) − Sj)

= 2∑

j

(Oj + Oπ(j) + Sπ(j) − Sj)

= 2

[

j

Oj +∑

j

Oπ(j) +∑

j

Sπ(j) −∑

j

Sj

]

= 4 · cost(O).

The 2011 School on Approximability, Bangalore – p.48/51

Page 78: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Putting things together

0 ≤∑

〈s,o〉

j∈NO(o)

(Oj − Sj) +∑

j∈NS(s)\NO(o)

(Oj + Oπ(j) + Sπ(j) −

The 2011 School on Approximability, Bangalore – p.49/51

Page 79: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Putting things together

0 ≤∑

〈s,o〉

j∈NO(o)

(Oj − Sj) +∑

j∈NS(s)\NO(o)

(Oj + Oπ(j) + Sπ(j) −

≤ [cost(O)− cost(S)] + [4 · cost(O)]

The 2011 School on Approximability, Bangalore – p.49/51

Page 80: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Putting things together

0 ≤∑

〈s,o〉

j∈NO(o)

(Oj − Sj) +∑

j∈NS(s)\NO(o)

(Oj + Oπ(j) + Sπ(j) −

≤ [cost(O)− cost(S)] + [4 · cost(O)]

= 5 · cost(O)− cost(S).

The 2011 School on Approximability, Bangalore – p.49/51

Page 81: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Putting things together

0 ≤∑

〈s,o〉

j∈NO(o)

(Oj − Sj) +∑

j∈NS(s)\NO(o)

(Oj + Oπ(j) + Sπ(j) −

≤ [cost(O)− cost(S)] + [4 · cost(O)]

= 5 · cost(O)− cost(S).

Therefore,cost(S) ≤ 5 · cost(O).

The 2011 School on Approximability, Bangalore – p.49/51

Page 82: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

A tight example

22

0 0

22

0 0

(k − 1)/2 (k + 1)/2

22

0 0

1 1 1

11

1

(k − 1)

· · ·

O

S· · ·

The 2011 School on Approximability, Bangalore – p.50/51

Page 83: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

A tight example

22

0 0

22

0 0

(k − 1)/2 (k + 1)/2

22

0 0

1 1 1

11

1

(k − 1)

· · ·

O

S· · ·

cost(S) = 4 · (k − 1)/2 + (k + 1)/2 = (5k − 3)/2

The 2011 School on Approximability, Bangalore – p.50/51

Page 84: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

A tight example

22

0 0

22

0 0

(k − 1)/2 (k + 1)/2

22

0 0

1 1 1

11

1

(k − 1)

· · ·

O

S· · ·

cost(S) = 4 · (k − 1)/2 + (k + 1)/2 = (5k − 3)/2

cost(O) = 0 + (k + 1)/2 = (k + 1)/2

The 2011 School on Approximability, Bangalore – p.50/51

Page 85: Local Search Based Approximation Algorithms The k-median ...pandit/localsearch.pdf · Local Search Based Approximation Algorithms The k-median problem Vinayaka Pandit IBM India Research

Future directions

We do not have a good understanding of the structureof problems for which local search can yieldapproximation algorithms.

Starting point could be an understanding of thesuccess of local search techniques for the curiouscapacitated facility location (CFL) problems.

For CFL problems, we know good local searchalgorithms. But, no non-trivial approximations knownusing other techniques like greedy, LP rounding etc.

The 2011 School on Approximability, Bangalore – p.51/51