gentle introduction to local search in combinatorial ...pandit/yn.pdfgentle introduction to local...

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 27-Jan-2021

8 views

Category:

Documents


0 download

TRANSCRIPT

  • Gentle Introduction to Local Search inCombinatorial Optimization

    Vinayaka Pandit

    IBM India Research Laboratory

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

  • 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

  • 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

  • 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

  • In Picture

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

  • 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

  • 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 Belse, Move u to A

    done3. return A,B

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

  • 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

  • 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 setof 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

  • The k-median problem

    We are given n points in a metric space.

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

  • 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

  • The k-median problem

    We are given n points in a metric space.

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

  • 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

  • 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

  • Overview of the k-median problem

    NP-hard

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

  • 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

  • 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

  • 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

  • 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

  • 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

  • A local search algorithm

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

  • A local search algorithm

    Start with any set of k medians.

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

  • 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

  • A local search algorithm

    And SWAP tentatively!

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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • THANK YOU

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

  • 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

  • Some more notation

    } |O| = k

    NO(o)

    O = {

    o

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

  • 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

  • Local optimality of S

    Since S is a local optimum solution,

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

  • 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

  • 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

  • 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 Nos .

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

  • Rerouting j ∈ N os

    ?s

    o

    jSj

    Ojoi

    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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • Swaps considered

    O

    S

    l

    ≥ l/2

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

  • Swaps considered

    O

    S

    l

    ≥ l/2

    “Why consider the swaps?”

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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

    OutlineCombinatorial Optimization ProblemLocal Search TechniqueIn PictureExample: MAX-CUTLocal Search for MAX-CUTNeighborhood FunctionAnalysis for MAX-CUTThe $k$-median problemThe $k$-median problemThe $k$-median problemThe $k$-median problemThe $k$-median problemOverview of the $k$-median problemA local search algorithmA local search algorithmA local search algorithmA local search algorithmThe algorithmMain theoremGraph Partition ProblemLocal Search for Graph PartitioningTraveling Salesman Problem (TSP)Local Search for TSPSome notationSome more notationSome more notationLocal optimality of $S$What happens when we swap ?Rerouting $j in N_s^o$Rerouting $j ot in N_s^o$Desired mapping of clients inside $N_O(o)$Notion of CaptureA mapping $pi $A mapping $pi $A mapping $pi $Capture graphSwaps consideredProperties of the swaps consideredFocus on a swap $swap s o$Upper bound on $cost(S-s+o)$Upper bound on $cost(S-s+o)$Upper bound on $cost(S-s+o)$Upper bound on $cost(S-s+o)$Upper bound on $cost(S-s+o)$Upper bound on $cost(S-s+o)$Upper bound on $cost(S-s+o)$Upper bound on the increase in the costUpper bound on the increase in the costPlanThe first term $ldots $The second term $ldots $The second term $ldots $Putting things togetherA tight exampleFuture directions