• No results found

Approximation Algorithm for Facility Location Problems

N/A
N/A
Protected

Academic year: 2020

Share "Approximation Algorithm for Facility Location Problems"

Copied!
5
0
0

Loading.... (view fulltext now)

Full text

(1)

Approximation Algorithm for Facility Location

Problems

Pawan Kumar Patel

Department of Computer Science & Engineering Indian Institute of Technology, Kanpur, INDIA

Karnataka, India

ABSTRACT

Significant research effort has been devoted in the study of ap-proximation algorithms for NP-hard problems. In this work we modify a known primal-dual approximation algorithm for facil-ity location problem. Although we fail to give a performance guarantee for the new approach but we show that our method performs better in a tight case.

Keywords:

3D face recognition, range image, radon transform, Symbolic LDA.

1. INTRODUCTION

We will solve NP-hard problem in this work, namely the the facility locationproblem. Good approximation algorithms are known in the literature for this problem. Our objective is to seek possible improvements in one of the approximation algorithms for the facility location problem.

1.1 Facility location problem

An oil distribution company plans to set up a oil distributing sta-tion in some of the chosen locasta-tions (potential facility sites). The company has already figured out the cost of setting up the dis-tribution station in each of these sites. The cost of supplying the oil from each site to each city is also known. The objective of this problem is to select some of the sites to setup the facilities so that the total cost of setting plus the cost of supplying to all the cities is minimized.

The above problem is an example of the facility location prob-lem. Since the early 1960’s location problems have important place in operation research. Facility location problems are help-ful in taking decision to setup factories, hospitals, warehouse, fire station. Some of the significant contributions to this problem. include Stollsteimer [1], Kuehn and Hamburger [2], Manne [3]. A variant of the problem, calledmetric uncapacitated facility location problemis described as follows.Lis a set of location where facilities may potentially be built. For every location in-formation about the cost of building is given.Cis a set of de-mand points(cities) each of which has to be assigned to a func-tional facility to receive service. A fixed one-time cost is known to connect a given city to a given facility location. The objective is to find a set of locations where facilities should be built and associate each city to one of the built facilities such that the total cost, the cost of facility building and the cost of connecting, is minimized.

Cornuejols, Nemahauser and Wolsey [4] showed that Unca-pacited facility location problemUFLPis NP-hard. Their results extends to metric UFLP as well. Guha and Khullar [5] showed that metric UFLP is APX-complete. Sviridenko [6] proved that a performance guarantee of less than1.467can not be given for an approximation algorithm for metric UFLP unlessP =N P. The first approximation algorithm for this problem was due to Hochbaum [7] havingO(logn)approximation guarantee. The first constant factor approximation was due to Shymoys et. al. [8] with3.16approximation guarantee. Subsequently Jain and Vazirani [9] gave a3-factor approximation algorithm. Guha and Khullar [5] obtained2.47performance guarantee for this prob-lem using Lp rounding and greedy augmentation.1.52 perfor-mance guarantee was obtained by Mahdin,Yeh, and Zhang [10] using dual fitting and greedy augmentation inn3 running time, wherenis number of vertex in given graph. An optimal bi factor approximation algorithm for the metric UFLP with1.5 perfor-mance guarantee proposed by Byrka and Aardal [11] is the best known performance guarantee for this problem.

In this thesis we revisit Jain and Vazirani’s algorithm but we use a different linear program for the problem in order to see if it leads to an improved performance.

2. UNCAPACITED FACILITY LOCATION

PROBLEM

LetGbe a bipartite graph with bipartition(F, D)whereF ver-tices denote the facility locations andDvertices denote the cities or demand points. The edge weightcijfor the edge(i, j)denote

the cost of setting up a supply route from facility locationito the cityj. We will denote|F|and|D|bynfandndrespectively.fi

denotes the cost of setting up the facility at locationi.

The problem is to determine a subsetS⊆Fwhere the facilities must be setup and an assignmentφ:D →Sof demand points to facilities inS, so thatP

i∈Sfi+Pj∈Dcφ(j)jis minimum.

3. JAIN AND VAZIRANI’S 3-APPROXIMATION

SOLUTION FOR UNCAPACITATED FACILITY LOCATION PROBLEM

The problem is expressed as a linear program whereyiis an

indi-cator variable denoting whether facility atiis open, and variable xij to indicate whether demand pointjis served by facilityi,

(2)

minimize X

i∈F,j∈D

cijxij+

X

i∈F

fiyi

subject to X

i∈F

xij≥1, j∈D,

yi−xij≥0, i∈F, j∈D,

xij∈ {0,1}i∈F, j∈D,

yi∈ {0,1}i∈F.

The first set of constraints ensures that each city is connected to at least one facility, and second ensures that demand points are served only by open facilities.

Consider the following LP-relaxation of UFLP.

minimize X

i∈F,j∈D

cijxij+

X

i∈F

fiyi

subject to X

i∈F

xij≥1, j∈D,

yi−xij≥0, i∈F, j∈D,

xij≥0, i∈F, j∈D,

yi≥0, i∈F.

The dual program of UFLP is formulated as follows.

minimize X

j∈D

zj

subject to zj−pij≤cij, i∈F, j∈D,

X

j∈D

pij≤fi, i∈F,

zj≥0, j∈D,

pij≥0, i∈F, j∈D.

Let(x, y)and(z, p)be an optimal primal and dual solution re-spectively.

The primal and dual complementary slackness conditions are as follows.

Primal complementary slackness conditions:

∀i∈F, j∈D:xi>0⇒zj−pij=cij (1)

∀i∈F :yi>0⇒

X

j∈D

pij=fi (2)

Dual complementary slackness conditions:

∀j∈D:zj>0⇒

X

i∈F

xij= 1 (3)

∀i∈F, j∈D:pij>0⇒yi=xij (4)

Letibe a facility for whichyi ≥ 0. ThenPj∈Dpij =fiby

equation 2. Thus we can interpret that demand pointjis willing to pay amountpijto setup the facility ati. To open the facility at

i, the demand points have to pay costfi. This interpretation can

also be seen as follows. Letjbe a demand point that is not served byii.e.,xij= 0. Sincexij6=yifrom equation 4 implies that

pij= 0, hencedjdoes not contribute in setting up the facility at

fi, which it is not assigned to it.

To interpret equation 1 we definezjto be the cost paid by the

demand pointdjtowards its share of setting up of the facility

assigned to it and the cost of connectingdjwith that facility.

3.1 Primal-dual schema based algorithm

Their algorithm consists of two phases. In the first phase a pri-mal/dual solution is computed using the complementary condi-tions. In the second phase the primal solution is refined.

3.1.1 Phase 1. In first phase they defined a notion of time so that each event can be associated with time. This phase starts with timet= 0and each demand point is declared as uncon-nected at the beginning. Following process is performed after each unit of time. Dual variablezjis raised by a unit after each

unit of time elapses. For everyjif there exists anisuch that zj=cij, the pair(i, j)is declared a tight edge. From nowpijis

also incremented by one unit after every unit of time so the first constraint of the dual program is never violated. Declare edge (i, j)as special edge which haspij≥0.

A facilityiis said to be fully paid for ifP

j∈Dpij≥fiand

de-clare this facility temporarily open. All the demand pointsjare said to be tight which are connected to the facilityiand declare ias connecting witness for thosej. In future if any unconnected demand pointjgets connected withideclare(i, j)a edge but not special because ofpij = 0and declareias connecting witness

for this demand pointj. When all demand points get connected with some temporarily open facility, first phase terminates.

3.1.2 Phase 2. In phase-1 a demand point may get attached to more than one facility. Since each such point only needs to be attached to only one facility, we select one facility for each demand point in the second phase.

LetFtdenotes the set of temporarily open facilities andT

de-notes the subgraph ofGcomprising all special edges. GraphT2 is defined on the same vertices but(u, v)is defined an edge iff there is a path betweenuandvinThaving length at most2. Let Hbe the subgraph ofT2induced onF

t.

Compute a maximal independent setIinH. Declare the facil-ities inI to be permanently open. Each city will have at most one neighbor inIinH. If a cityjhas a neighboriinI, then defineφ(j) =i. Otherwise select any vertexi0inF

t which is

its connecting witness (which is ensured in the first phase). If i0 I, then setφ(j) =i0. Otherwise due to maximality ofIas

an independent set, there must be a neighbor ofi0 inI, sayi00.

Setφ(j) =i00.

3.2 Analysis of the Algorithm

Dual variablezjcomprises the primal costs of connecting cities

to facilities and the cost of opening the facilities. Ifjis connected inHtoφ(j) =i, then definezm

j =pijandznj =cij. Ifjis not

connected toφ(j) =i, thenzm

j = 0andzjn=zj.

LEMMA 1. Leti∈Ithen, P

φ(j)=iz m j =fi.

PROOF. In phase-1 facilityiwas temporarily open and only special edges contributed to open it, i.e.,

X

(i,j)is special edge pij=fi

COROLLARY 1. P

i∈Ifi=

P

j∈Dzjm

Note that only the directed connected demand points contributed to open facilities. Also if a cityjwas connected to the facility i=φ(j)inH, thenzn

j =cij. The only case that needs to be

addressed is whenjwas not connected toiinH. In this case it was connected to somei0which was a neighbor ofi. So we need to relateci0jwhich is accounted for inzjandci0jwhich actually occurs in this solution.

LEMMA 2. cij≤3zjm, for all indirectly connecting witness,

whereφ(j) =i.

PROOF. Sincejis indirectly connected toiso there must be a tight edge(i0, j)and an edge(i, i0)inH. SinceH =T2, there must be a cityj0such that(ij0)and(i0j0)are both edges inT,

(3)

both edges are special, they must have gone tight beforeiandi0

both were declared temporarily open. Lett1,t2be times at which iandi0were declares temporarily open. Soz

j0 ≤min{t1, t2}. On the other handi0is the connecting witness ofjsoz

j≥t2≥ zj0. Putting these inequalities together we havezj ≥ cij0 and

zj≥ci0j0. From triangular inequalitycij≤3zj= 3zmj . We have the following result which establishes that this algo-rithm gives a3approximation.

THEOREM 1. The primal and dual solutions constructed by the algorithm hold following inequality

P

i∈F,j∈Dcijxij+ 3

P

i∈FFiyi≤3

P

j∈Dzj

This analysis is tight and it can be seen by the following example 1.

[image:3.595.79.268.299.466.2]

3.3 A Tight Example

Fig. 1. Graph of Tight Example

The graph in figure1 hasncitiesd1, . . . dnand two facilitiesf1 andf2. Costc11 = 2, c1j = 3for allj > 1, andc2j = 1

for allj ≥ 1. The opening cost off1 andf2 areand(n+ 1), respectively, for a small positive≤≤1. The Jain-Vazirani algorithm computes a solution in whichf1is open and all cities are served by it. This leads to a total cost of3n−2 +. It about three times the optimal costn+ (n+ 1)in which onlyf2must be open and all cities must be associated with it.

4. MOTIVATION

It is easy to see that in the above example the optimal solution opens the facility only atf2. But the above algorithm fails to achieve the optimal solution even for such a simple situation. This shows that the algorithm needs to be improved.

In the following section we modify the algorithm by describing the conditions of the problem using an alternative linear program and again try to devise an algorithm using primal-dual technique.

5. PRIMAL-DUAL METHOD TO SOLVE UFLP

WITH ALTERNATE LINEAR PROGRAM

We again attempt to solve this problem using primal-dual method but we will consider an alternative linear program. We will for-mulate linear program for uncapacitated facility location prob-lem by first writing the LP for the capacitated facility location program and then take its restriction to uncapacitated case.

5.1 Capacitated Facility Location Problem (CFLP)

Let G be a bipartite graph with bipartition(F, D)where number of facility locationsnf = |F|, the number of demand points

nd = |D|, the costs of opening facilitiesfi,1 ≤ i ≤ nf, the

demandsdj,1≤j≤ndand the connecting costscij,1≤i≤

nf,1≤j≤nd. A cityjrequiresrjsupply and it may procure it

from one or more locations. The supply from facilityito the city jis charged at the rate ofcijper unit. Furthermore, if a facility

is built atfi, then it will have a capacity ofsi. It will be able to

supply at mostsiunits.

The solution includes a subset S ⊆ F and an assignment α: S×D → Rwhere facilities will be open at all locations inSandα(i, j)(equivalently,αij) denotes the amount of

prod-uct being supplied by facilityito the city j. The objective is to minimizeP

i∈S(fi+

P

j∈Dcijαij)subject to the conditions

thatP

jα(i, j) ≤ sifor alli∈ SandPi∈Sαij ≥ rjfor all

j∈D.

Consider the following integer program for this problem. In this program,yiis an indicator variable denoting whether facilityiis

selected for opening.

minimize X

i∈F,j∈D

cijαij+

X

i∈F

fiyi

subject to X

i∈F

αij≥rj, j∈D,

siyi+

X

j∈D

−αij≥0, i∈F,

αij≥0, i∈F, j∈D,

yi∈ {0,1}, i∈F.

LP-relaxation of CFLP is as follows.

minimize X

i∈F,j∈D

cijαij+

X

i∈F

fiyi

subject to X

i∈F

αij≥rj, j∈D,

siyi+

X

j∈D

−αij≥0, i∈F,

αij≥0, i∈F, j∈D,

yi≥0, i∈F.

The dual program for CFLP is as follows.

minimize X

j∈D

zj

subject to zj−pi≤cij, i∈F, j∈D,

sipi≤fi, i∈F,

zj≥0, j∈D,

pi≥0, i∈F.

The dual variables may be interpreted as follows.zjrepresents

the total cost incurred by cityjandpidenotes the setup cost per

unit supply.

Primal complementary slackness conditions:

∀i∈F :yi>0⇒pisi=fi (5)

∀i∈F, j∈D:αij>0⇒zj−pi=cij (6) Dual complementary slackness conditions:

∀i∈F :pi>0⇒siyi−

X

j∈D

αij= 0 (7)

∀j∈D:zj>0⇒

X

i∈F

(4)

For ak-approximation we relax these conditions as follows:

Relaxed primal complementary slackness conditions:

∀i∈F:yi>0⇒fi/(ksi)≤pi≤fi/si (9)

∀i∈F, j∈D:αij>0⇒cij/k≤zj−pi≤cij (10) Relaxed dual complementary slackness conditions:

∀i∈F :pi>0⇒siyi−

X

j∈D

αij≥0 (11)

∀j∈D:zj>0⇒

X

i∈F

αij=rj (12)

Algorithm 1 is the heuristic algorithm for capacitated case.

Algorithm 1Primal-Dual Algorithm for a givenk 1. Initialize all dual variables to zero;

2. Initialize an empty graphHover verticesD∪F; 3. Unlock allzj’s and lock allpi’s;

4. repeat

5. Raise all unlocked dual variables with time till one of the following events occur(i) cij/k = zj for somei, j or

(ii)zj=cij−pifor someior(iii)pi=fi/si;

6. iffor eachi, jsuch thatcij/k=zjis just realizedthen

7. Setpi=fi/(ksi);

8. end if

9. ifFor eachi, j such thatcij = zj−piis just realized then

10. Add the edge(i, j)inH; 11. end if

12. if pi< fi/sithen

13. Unlockpi;

14. end if

15. ifpi=fi/siis just realizedthen

16. Lockpi;

17. end if

18. ifcij=zj−pithen

19. Lockzj;

20. end if

21. ifGraph changes from the previous iterationthen

22. Solve the following LP:siyi−Pjαij≥0for alliwith

degree greater than zero,P

iαij=rjfor feasibility;

23. end if

24. ifFeasiblethen

25. Report solution;

26. else ifHis a complete bipartite graphthen

27. Report no solution and stop. 28. end if

29. untilA solution is realized or no solution is found feasible

Due to the demand and supply parametersrjandsi, we find it

difficult to determine a value ofkfor which a solution can be guaranteed. Hence we propose this solution as a heuristic ap-proach. For an instance of a problem one can run this algorithm for increasing values ofktill a solution is found.

5.2 Adopting the algorithm to uncapacitated case

In order to specialize the algorithm for capacitated case to un-capacitated case we need to reinterpretsi’s andrj’s. Since in

the latter case only one connection from each city to a facility is required, we may definerj=δ≤≤1.

To definesirecall the primal conditionsiyi ≥Pjαij. To

en-able the case when all cities choose to connect to the same facil-ity, we define eachsiequal to|D|=nd.

The LP in the above algorithm is no longer required in the un-capacitatted case. In stead, it is sufficient to check if each city is connected to at least one facility. It is possible that a city may

get connected to more than one facility. Hence we need to prune out unnecessary connections. Hence we randomly remove edges until the degrees all cities reduce to one.

Algorithm 2 is the heuristic algorithm for uncapacitated case.

Algorithm 2Primal-Dual Algorithm for a givenk 1. Initialize all dual variables to zero;

2. Initialize an empty graphHover verticesD∪F; 3. Unlock allzj’s and lock allpi’s;

4. repeat

5. Raise all unlocked dual variables with time till one of the following events occur(i)cij/k = zj for somei, j or

(ii)zj=cij−pifor someior(iii)pi=fi/nd;

6. iffor eachi, jsuch thatcij/k=zjis just realizedthen

7. Setpi=fi/(knd);

8. end if

9. ifFor eachi, j such thatcij = zj−piis just realized then

10. Add the edge(i, j)inH; 11. end if

12. if pi< fi/ndthen

13. Unlockpi;

14. end if

15. ifpi=fi/ndis just realizedthen

16. Lockpi;

17. end if

18. ifcij=zj−pithen

19. Lockzj;

20. end if

21. ifAll cities are connected to at least one facilitythen

22. repeat

23. Randomly prune edges;

24. untilThe degree of all cities reduce to one 25. end if

26. ReturnHand stop. 27. untilA solution is realized

In order to test this algorithm we ran it on the tight example. It resulted into a graph in which each city was connected tof2. We further ran the algorithm on the same example but tookto very very large. In that case all cities were connected tof1. In each case, the solutions were optimal.

6. CONCLUSION

We revisited the uncapacitated facility location problem and its algorithm given by Jain and Vazirani. We gave a heuristic algo-rithm derived from primal-dual schema which perform better on a tight example compare to performance of Jain and Vazirani.

7. REFERENCES

[1] J.Stollsteimer, “A working model for plant numbers and lo-cations,”Journal of Farm Economics, vol. 45, pp. 631–645, 1963.

[2] A. A. Kuehn and M. J. Hamburger, “A heuristic program for locating warehouse,”Management Science, vol. 9, pp. 643–666, 1963.

[3] A. Manne, “A plant location and economy of scale de-centralization and computation,” Management Science, vol. 11, pp. 213–235, 1964.

[4] G.Cornuejola, G.L.Nemhauser, and L. Wolsey, “The unca-pacitated facility location problem,”In P.Mirchandani and R.Francis editors Discrete Location Theory John Wiley and Sons New York, pp. 119–171, 1990.

(5)

[6] M.Sviridenko, “Approximation algorithms for facility lo-cation problem,”PhD thesis Stanford, 2000.

[7] D.Hochbaum, “Heuristics for the fixed cost median prob-lem,”Mathematical Programming, vol. 22), pp. 148–162, 1982.

[8] D.B.Shmoys, E.Tardos, and K.I.Aardal, “Approximation algorithms for facility location problems,”In proceedings of the29th

Annual Symposium on Theory of Computing, pp. 265–274, 1997.

[9] K. Jain and V. V. Vazirani, “Approximation algorithm for metric facility location and k-median problems us-ing primal-dual schema and lagrangian relaxation,”ACM, vol. 48, March 2001.

[10] M.Mahdian, Y.Ye, and J.zhang, “A 1.52 approximation al-gorithm for the uncapacitated facility location problem,” Manuscript.

[11] J. Byrka, “An optimal bifactor approximation algorithm for the metric uncapacitated facility location problem,” Proceedings of the 10th

International Workshop on Ap-proximation and the11thInternational Workshop on

Figure

Fig. 1.Graph of Tight Example

References

Related documents

Furthermore, women residing in urban areas, having at least secondary-level education, with high autonomy, belonging to the richest wealth quintile and having exposure to mass media

A szeparáció alapjául szolgáló diszjunktság a legtöbbször úgy jelentke- zik, hogy a lehetséges termelési eljárásokat tartalmazó termelési halmaz olyan, hogy nem

• Chapter 4 gives a formal explanation of how the proposed method can be used to estimate the predictive accuracy of the imputed values generated by any imputation technique

Therefore, data need to be gathered at the firm level to properly test whether entrepreneurship capital has positive spillovers on a regional level that increase

Virtues and vices in positive psychology : a philosophical critique / Kristján Kristjánsson, University of Birmingham, University of Iceland.. pages

The Harvard APA-style of referencing detailed above allows the reader of an essay to search for the full details of each cited reference in an essay within the

The challenge to the thesis that processing components in the language system are functionally discrete rests on the interpretation that when seman- tic knowledge is impaired,

In the current research, teachers at the same schools as the student participants in our 2017 study were surveyed about their views on classroom management, including those