gentle introduction to local search in combinatorial ...pandit/yn.pdf · gentle introduction to...

98
Gentle Introduction to Local Search in Combinatorial Optimization Vinayaka Pandit IBM India Research Laboratory International Conference on Foundations of Computer Science, Bangalore – p.1/58

Upload: others

Post on 13-Jul-2020

12 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

Gentle Introduction to Local Search inCombinatorial Optimization

Vinayaka Pandit

IBM India Research Laboratory

International Conference on Foundations of Computer Science, Bangalore – p.1/58

Page 2: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

Outline

Local Search Technique

Max-CUT: simple theorem and proof

The k-median problem: Statement of the result (noproof!)

Some more applications

International Conference on Foundations of Computer Science, Bangalore – p.2/58

Page 3: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

Combinatorial Optimization Problem

A problem with notions of “feasible solution” and “costof a feasible solution”. Typically we are looking for afeasible solution of optimal cost.

Given an instance, potential number of feasiblesolution is large, i.e, “combinatorial”

Example: suppose we are given a boolean formula onn variables and we want assignment that satisfies allclauses. Potentially, there are 2n satisfyingassignments.

Large number of combinatorial optimization problemsare NP-Complete.

International Conference on Foundations of Computer Science, Bangalore – p.3/58

Page 4: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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.

International Conference on Foundations of Computer Science, Bangalore – p.4/58

Page 5: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

In Picture

International Conference on Foundations of Computer Science, Bangalore – p.5/58

Page 6: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

Example: MAX-CUT

Given a graph G = (V,E),

A B

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

Note that MAX-CUT is ≤ |E|.

International Conference on Foundations of Computer Science, Bangalore – p.6/58

Page 7: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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

International Conference on Foundations of Computer Science, Bangalore – p.7/58

Page 8: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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.

International Conference on Foundations of Computer Science, Bangalore – p.8/58

Page 9: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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)

International Conference on Foundations of Computer Science, Bangalore – p.9/58

Page 10: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

The k-median problem

We are given n points in a metric space.

International Conference on Foundations of Computer Science, Bangalore – p.10/58

Page 11: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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)

International Conference on Foundations of Computer Science, Bangalore – p.11/58

Page 12: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

The k-median problem

We are given n points in a metric space.

International Conference on Foundations of Computer Science, Bangalore – p.12/58

Page 13: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

The k-median problem

We are given n points in a metric space.

Identify k “medians” so as to minimize the sum of the dis-

tances of the points to their nearest medians.International Conference on Foundations of Computer Science, Bangalore – p.13/58

Page 14: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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.International Conference on Foundations of Computer Science, Bangalore – p.14/58

Page 15: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

Overview of the k-median problem

NP-hard

International Conference on Foundations of Computer Science, Bangalore – p.15/58

Page 16: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

Overview of the k-median problem

NP-hard

Popular in the OR community since 60’s.

International Conference on Foundations of Computer Science, Bangalore – p.15/58

Page 17: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

Overview of the k-median problem

NP-hard

Popular in the OR community since 60’s.

Used for locating warehouses, manufacturing plants,etc.

International Conference on Foundations of Computer Science, Bangalore – p.15/58

Page 18: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

Overview of the k-median problem

NP-hard

Popular in the OR community since 60’s.

Used for locating warehouses, manufacturing plants,etc.

Used also for clustering, data mining.

International Conference on Foundations of Computer Science, Bangalore – p.15/58

Page 19: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

Overview of the k-median problem

NP-hard

Popular in the OR community since 60’s.

Used for locating warehouses, manufacturing plants,etc.

Used also for clustering, data mining.

Received the attention of the Approximationalgorithms community in early 90’s.

International Conference on Foundations of Computer Science, Bangalore – p.15/58

Page 20: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

Overview of the k-median problem

NP-hard

Popular in the OR community since 60’s.

Used for locating warehouses, manufacturing plants,etc.

Used also for clustering, data mining.

Received the attention of the Approximationalgorithms community in early 90’s.

Various algorithms via LP-relaxation, primal-dualscheme, etc.

International Conference on Foundations of Computer Science, Bangalore – p.15/58

Page 21: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

A local search algorithm

International Conference on Foundations of Computer Science, Bangalore – p.16/58

Page 22: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

A local search algorithm

Start with any set of k medians.

International Conference on Foundations of Computer Science, Bangalore – p.16/58

Page 23: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

A local search algorithm

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

International Conference on Foundations of Computer Science, Bangalore – p.17/58

Page 24: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

A local search algorithm

And SWAP tentatively!

International Conference on Foundations of Computer Science, Bangalore – p.18/58

Page 25: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

A local search algorithm

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

International Conference on Foundations of Computer Science, Bangalore – p.19/58

Page 26: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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.

International Conference on Foundations of Computer Science, Bangalore – p.19/58

Page 27: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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

International Conference on Foundations of Computer Science, Bangalore – p.20/58

Page 28: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

Main theorem

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

International Conference on Foundations of Computer Science, Bangalore – p.21/58

Page 29: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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.

International Conference on Foundations of Computer Science, Bangalore – p.21/58

Page 30: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

Graph Partition Problem

Given a graph G = (V,E), partition the set of verticesV into two equal halves A and B such that the edgesgoing across them is minimized.

Fundamental problem in Approximation Algorithms.

Real applications in high performance computing,VLSI design, image processing, etc.

A B

International Conference on Foundations of Computer Science, Bangalore – p.22/58

Page 31: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

Local Search for Graph Partitioning

a

b

a

S S’

T T’

Cut(S,S’) > Cut(T,T’)

b

International Conference on Foundations of Computer Science, Bangalore – p.23/58

Page 32: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

Traveling Salesman Problem (TSP)

Given a set of n cities and distances between them,find a tour that visits every city exactly once andcomes back to the starting city such that the totaldistance traveled is minimized. The distances are"metric", i.e, they satisfy triangle inequality.

Again, a fundamental problem. One of the sixproblems that Karp proved to be NP-Complete.

Many applications in Operations Research andMachine Translation.

International Conference on Foundations of Computer Science, Bangalore – p.24/58

Page 33: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

Local Search for TSP

10

0

1

2

9

10

34

5

6

7

8

0

1

23

4

5

6

7 8 9

International Conference on Foundations of Computer Science, Bangalore – p.25/58

Page 34: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

THANK YOU

International Conference on Foundations of Computer Science, Bangalore – p.26/58

Page 35: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

Some notation

Sj

js

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

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

}

International Conference on Foundations of Computer Science, Bangalore – p.27/58

Page 36: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

Some more notation

} |O| = k

NO(o)

O = {

o

International Conference on Foundations of Computer Science, Bangalore – p.28/58

Page 37: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

Some more notation

NO(o)

o

s1s2

s4 s3

Nos1

Nos4

Nos3

Nos2

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

International Conference on Foundations of Computer Science, Bangalore – p.29/58

Page 38: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

Local optimality of S

Since S is a local optimum solution,

International Conference on Foundations of Computer Science, Bangalore – p.30/58

Page 39: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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.

International Conference on Foundations of Computer Science, Bangalore – p.30/58

Page 40: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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)

> >

International Conference on Foundations of Computer Science, Bangalore – p.30/58

Page 41: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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 .

International Conference on Foundations of Computer Science, Bangalore – p.31/58

Page 42: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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.

International Conference on Foundations of Computer Science, Bangalore – p.32/58

Page 43: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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.International Conference on Foundations of Computer Science, Bangalore – p.33/58

Page 44: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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 .

International Conference on Foundations of Computer Science, Bangalore – p.34/58

Page 45: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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 graphInternational Conference on Foundations of Computer Science, Bangalore – p.35/58

Page 46: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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 .

International Conference on Foundations of Computer Science, Bangalore – p.36/58

Page 47: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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 .

International Conference on Foundations of Computer Science, Bangalore – p.37/58

Page 48: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

A mapping π

NO(o)

o

s1s2

s4 s3

Nos1

Nos4

Nos3

Nos2

i+ l/2

|NO(o)| = l

i l21

π

International Conference on Foundations of Computer Science, Bangalore – p.38/58

Page 49: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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

International Conference on Foundations of Computer Science, Bangalore – p.39/58

Page 50: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

Swaps considered

O

S

l

≥ l/2

International Conference on Foundations of Computer Science, Bangalore – p.40/58

Page 51: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

Swaps considered

O

S

l

≥ l/2

“Why consider the swaps?”

International Conference on Foundations of Computer Science, Bangalore – p.40/58

Page 52: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

Properties of the swaps considered

O

S

l

≥ l/2

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

International Conference on Foundations of Computer Science, Bangalore – p.41/58

Page 53: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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.

International Conference on Foundations of Computer Science, Bangalore – p.41/58

Page 54: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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.International Conference on Foundations of Computer Science, Bangalore – p.41/58

Page 55: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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).

International Conference on Foundations of Computer Science, Bangalore – p.42/58

Page 56: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

Upper bound on cost(S − s+ o)

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

International Conference on Foundations of Computer Science, Bangalore – p.43/58

Page 57: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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.

International Conference on Foundations of Computer Science, Bangalore – p.43/58

Page 58: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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).

International Conference on Foundations of Computer Science, Bangalore – p.43/58

Page 59: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

Upper bound on cost(S − s+ o)

sNO(o)o

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

International Conference on Foundations of Computer Science, Bangalore – p.44/58

Page 60: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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.

International Conference on Foundations of Computer Science, Bangalore – p.45/58

Page 61: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

Upper bound on cost(S − s+ o)

sNO(o)o

j

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

International Conference on Foundations of Computer Science, Bangalore – p.46/58

Page 62: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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.)

International Conference on Foundations of Computer Science, Bangalore – p.47/58

Page 63: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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.International Conference on Foundations of Computer Science, Bangalore – p.48/58

Page 64: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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).

International Conference on Foundations of Computer Science, Bangalore – p.49/58

Page 65: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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.

International Conference on Foundations of Computer Science, Bangalore – p.49/58

Page 66: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

Upper bound on the increase in the cost

Lets try to count the total increase in the cost.

International Conference on Foundations of Computer Science, Bangalore – p.50/58

Page 67: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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).

International Conference on Foundations of Computer Science, Bangalore – p.50/58

Page 68: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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).

International Conference on Foundations of Computer Science, Bangalore – p.50/58

Page 69: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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).

International Conference on Foundations of Computer Science, Bangalore – p.50/58

Page 70: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

Upper bound on the increase in the cost

j∈NO(o)

(Oj − Sj) +∑

j∈NS(s)\NO(o)

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

International Conference on Foundations of Computer Science, Bangalore – p.51/58

Page 71: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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)

International Conference on Foundations of Computer Science, Bangalore – p.51/58

Page 72: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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

International Conference on Foundations of Computer Science, Bangalore – p.51/58

Page 73: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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.

International Conference on Foundations of Computer Science, Bangalore – p.52/58

Page 74: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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.

International Conference on Foundations of Computer Science, Bangalore – p.52/58

Page 75: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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

International Conference on Foundations of Computer Science, Bangalore – p.52/58

Page 76: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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!

International Conference on Foundations of Computer Science, Bangalore – p.52/58

Page 77: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

The first term . . .

j∈NO(o)

(Oj − Sj)

+∑

j∈NS(s)\NO(o)

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

International Conference on Foundations of Computer Science, Bangalore – p.53/58

Page 78: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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.

International Conference on Foundations of Computer Science, Bangalore – p.53/58

Page 79: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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)

International Conference on Foundations of Computer Science, Bangalore – p.53/58

Page 80: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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)

International Conference on Foundations of Computer Science, Bangalore – p.53/58

Page 81: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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).International Conference on Foundations of Computer Science, Bangalore – p.53/58

Page 82: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

The second term . . .

j∈NO(o)

(Oj−Sj)+

j∈NS(s)\NO(o)

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

≥ 0.

International Conference on Foundations of Computer Science, Bangalore – p.54/58

Page 83: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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.

International Conference on Foundations of Computer Science, Bangalore – p.54/58

Page 84: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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.

International Conference on Foundations of Computer Science, Bangalore – p.54/58

Page 85: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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).

International Conference on Foundations of Computer Science, Bangalore – p.54/58

Page 86: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

The second term . . .

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

International Conference on Foundations of Computer Science, Bangalore – p.55/58

Page 87: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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)

International Conference on Foundations of Computer Science, Bangalore – p.55/58

Page 88: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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)

International Conference on Foundations of Computer Science, Bangalore – p.55/58

Page 89: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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

]

International Conference on Foundations of Computer Science, Bangalore – p.55/58

Page 90: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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).

International Conference on Foundations of Computer Science, Bangalore – p.55/58

Page 91: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

Putting things together

0 ≤∑

〈s,o〉

j∈NO(o)

(Oj − Sj) +∑

j∈NS(s)\NO(o)

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

International Conference on Foundations of Computer Science, Bangalore – p.56/58

Page 92: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

Putting things together

0 ≤∑

〈s,o〉

j∈NO(o)

(Oj − Sj) +∑

j∈NS(s)\NO(o)

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

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

International Conference on Foundations of Computer Science, Bangalore – p.56/58

Page 93: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

Putting things together

0 ≤∑

〈s,o〉

j∈NO(o)

(Oj − Sj) +∑

j∈NS(s)\NO(o)

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

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

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

International Conference on Foundations of Computer Science, Bangalore – p.56/58

Page 94: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

Putting things together

0 ≤∑

〈s,o〉

j∈NO(o)

(Oj − Sj) +∑

j∈NS(s)\NO(o)

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

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

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

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

International Conference on Foundations of Computer Science, Bangalore – p.56/58

Page 95: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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· · ·

International Conference on Foundations of Computer Science, Bangalore – p.57/58

Page 96: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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

International Conference on Foundations of Computer Science, Bangalore – p.57/58

Page 97: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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

International Conference on Foundations of Computer Science, Bangalore – p.57/58

Page 98: Gentle Introduction to Local Search in Combinatorial ...pandit/yn.pdf · Gentle Introduction to Local Search in Combinatorial Optimization VinayakaPandit IBMIndiaResearchLaboratory

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.

International Conference on Foundations of Computer Science, Bangalore – p.58/58