14
?~ ;- :~1' ' / I ELSEVIER European Journal of Operational Research 100 (1997) 594-607 EUROPEAN JOURNAL OF OPERATIONAL RESEARCH Theory and Methodology Generalized p-Center problems: Complexity results and approximation algorithms Dorit S. Hochbaum a,b,l, Anti Pathria a,2, * a Department of Industrial Engineering and Operations Research, University of California, Berkeley, CA 94 720, USA b Walter A. Haas School of Business, University of California, Berkeley, CA 94 720, USA Received 1 May 1995; accepted 1 December 1995 Abstract In an earlier paper, two altemative p-Center problems, where the centers serving customers must be chosen so that exactly one node from each of p prespecified disjoint pairs of nodes is selected, were shown to be NP-complete. This paper considers a generalized version of these problems, in which the nodes from which the p servers are to be selected are partitioned into k sets and the number of servers selected from each set must be within a prespecified range. We refer to these problems as the 'Set' p-Center problems. We establish that the triangle inequality (A-inequality) versions of these problems, in which the edge weights are assumed to satisfy the triangle inequality, are also NP-complete. We also provide a polynomial time approximation algorithm for the two A-inequality Set p-Center problems that is optimal for one of the problems in the sense that no algorithm with polynomial running time can provide a better constant factor performance guarantee, unless P ~ NP. For the special case 'alternative' p-Center problems, which we refer to as the 'Pair' p-Center problems, we extend the previous results in several ways. For example, the results mentioned above for the Set p-Center problems also apply to the Pair p-Center problems. Furthermore, we establish and exploit a correspondence between satisfiability and the dominating set type of problems that naturally arise when considering the decision versions of the Pair p-Center problems. © 1997 Elsevier Science B.V. Keywords: p-Center; Approximation algorithms; Bottleneck optimization problems; Location of facilities Introduction Bottleneck problems appear frequently in resource management, capacity planning, service planning, scheduling, emergency facility planning, routing lo- * Corresponding author, e-mail: [email protected] Research supported in part by ONR contract N00014-91-J- 1241. 2 Author supported in part by an NSERC '67 scholarship provided by the Natural Sciences and Engineering Research Coun- cil of Canada, and in part by ONR contract N00014-91-J-1241. cation, and communication network design. The dis- tinguishing feature of these problems is the existence of a certain parameter, the bottleneck, where the constraints require a set of variables not to exceed the bottleneck value. One renowned problem in this class is the vertex (node) p-Center problem. The p-Center problem is to find the optimal location of p nodes so that the maximum distance of a node to its nearest center is minimized. This problem, which is known to be NP-hard (see Kariv and Hakimi, 1979), turns up in the context of locating emergency facili- ties, say hospitals: we wish to locate no more than p 0377-2217/97/$17.00 © 1997 Elsevier Science B.V. All fights reserved PH S0377-221 7(96)00076-8

Generalized p-Center problems: Complexity results and approximation algorithms

Embed Size (px)

Citation preview

Page 1: Generalized p-Center problems: Complexity results and approximation algorithms

?~ ;- :~1' ' / I

ELSEVIER European Journal of Operational Research 100 (1997) 594-607

EUROPEAN JOURNAL

OF OPERATIONAL RESEARCH

Theory and Methodology

Generalized p-Center problems: Complexity results and approximation algorithms

Dorit S. Hochbaum a,b,l, Anti Pathria a,2, *

a Department of Industrial Engineering and Operations Research, University of California, Berkeley, CA 94 720, USA b Walter A. Haas School of Business, University of California, Berkeley, CA 94 720, USA

Received 1 May 1995; accepted 1 December 1995

Abstract

In an earlier paper, two altemative p-Center problems, where the centers serving customers must be chosen so that exactly one node from each of p prespecified disjoint pairs of nodes is selected, were shown to be NP-complete. This paper considers a generalized version of these problems, in which the nodes from which the p servers are to be selected are partitioned into k sets and the number of servers selected from each set must be within a prespecified range. We refer to these problems as the 'Set ' p-Center problems. We establish that the triangle inequality (A-inequality) versions of these problems, in which the edge weights are assumed to satisfy the triangle inequality, are also NP-complete. We also provide a polynomial time approximation algorithm for the two A-inequality Set p-Center problems that is optimal for one of the problems in the sense that no algorithm with polynomial running time can provide a better constant factor performance guarantee, unless P ~ NP. For the special case 'alternative' p-Center problems, which we refer to as the 'Pair ' p-Center problems, we extend the previous results in several ways. For example, the results mentioned above for the Set p-Center problems also apply to the Pair p-Center problems. Furthermore, we establish and exploit a correspondence between satisfiability and the dominating set type of problems that naturally arise when considering the decision versions of the Pair p-Center problems. © 1997 Elsevier Science B.V.

Keywords: p-Center; Approximation algorithms; Bottleneck optimization problems; Location of facilities

Introduction

Bottleneck problems appear frequently in resource management, capacity planning, service planning, scheduling, emergency facili ty planning, routing lo-

* Corresponding author, e-mail: [email protected] Research supported in part by ONR contract N00014-91-J-

1241. 2 Author supported in part by an NSERC '67 scholarship

provided by the Natural Sciences and Engineering Research Coun- cil of Canada, and in part by ONR contract N00014-91-J-1241.

cation, and communicat ion network design. The dis- tinguishing feature of these problems is the existence of a certain parameter, the bottleneck, where the constraints require a set of variables not to exceed the bottleneck value. One renowned problem in this class is the vertex (node) p-Center problem. The p-Center problem is to find the optimal location of p nodes so that the maximum distance of a node to its nearest center is minimized. This problem, which is known to be NP-hard (see Kariv and Hakimi, 1979), turns up in the context of locating emergency facili- ties, say hospitals: we wish to locate no more than p

0377-2217/97/$17.00 © 1997 Elsevier Science B.V. All fights reserved PH S0377-221 7 ( 9 6 ) 0 0 0 7 6 - 8

Page 2: Generalized p-Center problems: Complexity results and approximation algorithms

D.S. Hochbaum, A. Pathria / European Journal of Operational Research 100 (1997) 594-607 595

v~ v2 v~

0 0 0 supply nodes

°., Q

Fig. 1.

customer nodes

hospitals such that the largest distance between each potential patient zone and the nearest hospital is minimized. Variations of the p-Center problem have also been studied (see Hochbaum and Shmoys, 1986): in the p-Supplier problem only a subset of the nodes can be in the center, but the nodes in this subset do not themselves have to be 'served'; in the weighted p-Center problem (with weights 1 and oo) nodes in the subset also have to be served.

An interesting variation was considered by Hudec (1991), who introduced two so-called 'alternative' p-Center problems. We refer to these problems as p-PairSupplier and p-PairCenter because of the their similarity to p-Supplier and (weighted) p-Center, respectively. The essential distinguishing feature of these problems is that the p nodes in the center must be chosen from p prespecified disjoint pairs of nodes, with exactly one node from each pair se- lected. A reasonable and quite general extension of this idea, which we refer to as the 'Set' p-Center problems, is to select the p nodes in the center from k prespecified disjoint sets of nodes (see Fig. 1), with the number of nodes selected from each set within a prespecified range. We now give a formal description of our two Set p-Center optimization problems:

Instance: Given a complete 3 weighted graph, G = (V U W, E), where V and W are disjoints sets of nodes such that I W l = n and V = V 1U . . . UV k, where the Vi's form a partition o f V. For j = 1 . . . . . k, specify non-negative integers lj and uj. Let w{,. j~ be the weight of the (undirected) edge {i, j}.

3 Instances of p-SetSupplier and p-SetCenter do not necessar- ily have to be given as complete graphs because certain edge weights are irrelevant (though perhaps constrained because of some special case such as the A-inequality versions of these problems).

p-SetSupplier: Select a set of p nodes, C, such that the maximum distance of any node in W to its nearest neighbor in C is minimized, where

l j~ Icnvjl <<.uj Vj.

p-SetCenter: Select a set of p nodes, C, such that the maximum distance of any node in V U W to its nearest neighbor in C is minimized, where

l j < ~ l c n V j l < u j Vj.

We define the distance of a node, v, from a set of nodes, U, to be

min { Wtx,v}}, x~U

(Note that the distance of a node from itself is assumed to be 0: wtv,v } = 0.)

p-SetSupplier is similar to the p-Supplier prob- lem in that the center must be chosen from a subset of nodes that do not, themselves, have to be served. p-SetCenter is similar to the weighted p-Center prob- lem (with weights 1 and oo) in that the subset of nodes from which the center can be chosen must also be served. The restricted versions of p-SetSupplier and p-SetCenter, in which k = p and Vj, [Vj [ = 2 and lj = uj = 1, yield the problems p-PairSupplier and p-PairCenter, respectively. Because many of the salient ideas necessary for our discussion of the Set p-Center problems also apply to the Pair p-Center problems, it will be easier to understand these Set p-Center problems by first considering the Pair p- Center problems from Hudec (1991) in detail. Fur- thermore, we establish a correspondence between p-PairSupplier and SAT that does not generalize to p-SetSupplier. Hence, we will discuss the Pair p- Center problems in some detail before moving on to the more general Set p-Center problems in Section 4.

The original paper in which the 'alternative' prob- lems, p-PairSupplier and p-PairCenter, were intro- duced provided three main results: the first two established that the decision problems associated with p-PairSupplier and p-PairCenter are NP-complete, which we present in a slightly different manner in Theorem 1.1; the third result concerned the polyno- mial running time of a special case of a dominating set type of problem closely associated with p-Pair- Supplier, which we improve upon in Corollary 2.1.

Page 3: Generalized p-Center problems: Complexity results and approximation algorithms

596 D.S. Hochbaum, A. Pathria / European Journal of Operational Research 100 (1997) 594-607

In this paper, in addition to extending the complexity results for the Pair p-Center problems, we provide approximation algorithms for the triangle inequality (A-inequality) versions of the problems. In the A-in- equality versions of the problems, the edges weights are assumed to satisfy the triangle inequality. We establish that the A-inequality versions of these problems are also NP-hard and provide approxima- tion algorithms that generate a solution guaranteed to be within a factor of 3 of the optimal solution.

We mention here notation for a few other prob- lems related to p-PairSupplier and p-PairCenter that will arise in this paper: first of all, two dominating set type of problems, which we will refer to as p-PairSupplier D and p-PairCenter D, arise naturally when considering the decision versions of p-Pair- Supplier and p-PairCenter, respectively (they will also be relevant to the development of approximation algorithms using the Bottleneck Algorithm described in Hochbaum and Shmoys, 1986); secondly, we observe that by changing the objective function ap- propriately, we can study the associated 'alternative' p-Median problems, which we will refer to as p- PairSupplier M and p-PairCenter M, respectively; the corresponding problems for p-SetSupplier and p- SetCenter are analogously defined. Throughout this paper we will use the symbol A to refer to those problem instances in which the edge weights satisfy the triangle inequality.

This paper is organized in the following way: in Section 1, we develop a set of results concerning the complexity of the Pair p-Center problems; Section 2

discusses results for the 'alternative' dominating set

problems associated with the Pair p-Center decision

problems; Section 3 provides approximation algo- rithms, based on the Bottleneck Algorithm intro- duced in Hochbaum and Shmoys (1986), for p- PairSupplier and p-PairCenter; in Section 4, we describe the results for the generalized Set p-Center problems; finally, Section 5 provides a summary and suggests directions for future study.

Table 1 summarizes some of the main results of this paper. Column 1 describes the problem, column 2 gives a best achievable (assuming P 4: NP) con- stant factor bound for a polynomial time approxima- tion algorithm for the problem, and column 3 lists the factor within optimality that the polynomial algo- rithms that we develop in this paper achieve.

1. Complexity results for the 'Pa i r ' problems

In this section we outline a series of NP-com- pleteness results relating to the 'Pair' p-Center prob- lems, which were referred to as the 'alternative' p-Center problems in Hudec (1991). As mentioned earlier, the Pair p-Center optimization problems are restricted versions of the Set p-Center optimization problems:

I n s t a n c e : Given a complete weighted graph, G = (V U W, E), where V and W are disjoints sets of nodes such that I V ] - - 2 p and I W l = n . V = P I U . . . U

Pp, where the Pi's are disjoint pairs of nodes. Let wti.j 3 be the weight of the (undirected) edge {i, j}.

Table 1 Complexity results and approximation algorithm quality

Problem Best possible Bound achieved by our name approximation algorithm approximation algorithm

p-PairSupplier Constant factor approximation guarantee p-PairCenter shown not to be possible, unless P = NP A p = PairSupplier 3 3 A p = PairCenter 2 3

p-SetSupplier Constant factor approximation guarantee p-SetCenter shown not to be possible, unless P = NP A p-SetSupplier 3 3 a p-SetCenter 2 3

Page 4: Generalized p-Center problems: Complexity results and approximation algorithms

D.S. Hochbaum, A. Pathria / European Journal o f Operational Research I 0 0 (1997) 5 9 4 - 6 0 7 597

.... 2p variable nodes

•. • • , . ~ ¢h~v.se nodes

Fig. 2.

p-PairSupplier: Select p nodes, one from each Pl, such that the maximum distance of any node in W to its nearest neighbor in the p-set is minimized. p-PairCenter: Select p nodes, one from each P;, such that the maximum distance of any node in V tJ W to its nearest neighbor in the p-set is mini- mized.

We will sometimes refer to the n customer nodes, W, as clause nodes and the 2 p supply (and possibly customer) nodes, V, as variable nodes, for reasons that will become apparent (we will establish a corre- spondence with SAT); see Fig. 2.

The essential difference between the problems p-PairSupplier and p-PairCenter and the problems p-Supplier and p-Center, respectively, is that we have the additional 'exclusive-or' type of restriction that exactly one node from each of p prespecified pairs of nodes must be chosen.

1.1. The Pair Center problems

The first theorem establishes the first two results from Hudec (1991).

complete.) Now, there exists a p-Center of cost 0 (for both p-PairSupplier and p-PairCenter) if and only if the given instance of SAT is satisfiable (p nodes chosen correspond to SAT variable assign- ment). []

We can modify the proof in the above theorem to establish the next corollary:

Corollary 1.1. There is no polynomial time a-ap- proximation algorithm for p-PairSupplier or p- PairCenter, for any constant a, unless P = NP.

Proof. Reduction same as above. Note that all cen- ters are of cost 0 or 1, with centers of cost 0 corresponding to truth assignments satisfying the given instance of SAT. Therefore, an a-approxima- tion algorithm will return a p-Center of cost 0 if and only if the given instance of SAT is satisfiable. []

The following results deal with the A-inequality versions of the problems. Note that some of the edges in the graph are irrelevant to the solutions of the problem (irrelevant edges slightly different for p-PairSupplier and p-PairCenter); still, we require the relevant edge weights that are specified be such that the remaining edges can be added and assigned some weight such that the A-inequality is not vio- lated (basically, the relevant edge weights have to be such that there is no shorter path available between two nodes than the weight of the edge between them).

Theorem 1.1. The decision versions of p-PairSup- plier and p-PairCenter are NP-complete.

Proof. Clearly, both problems are in NP. To prove completeness, we provide a polynomial time reduc- tion from SAT. Suppose we are given an instance of SAT on p variables, xl, x 2 . . . . . xp, and n clauses. In our reduction, we construct a graph, G, on 2p + n nodes with Pi associated with the variable x i (the two nodes in Pi correspond to x i and xi), and each of the n additional nodes to be served corresponding to a clause in the SAT expression. The weight of an edge from a clause node to a variable node is 0 if that variable is in the clause, 1 otherwise. (Add additional edges of weight 0 to make the graph

Theorem 1.2. The decision problems associated with the A-inequality versions of both p-PairSupplier and p-PairCenter are NP-complete.

Proof. Change edges of weight 0 and 1 to 1 and 2, respectively, in the graph constructed for the NP- completeness proof in Theorem 1.1; observe that the A-inequality is satisfied in the resulting graph. Now, there exists a p-Center of cost 1 if and only if the given instance of SAT is satisfiable. []

Corollary 1.2. There is no polynomial time (2 - ¢)- approximation algorithm for the A-inequality ver- sions of p-PairSupplier or p-PairCenter, for any E > O, unless P = N-P.

Page 5: Generalized p-Center problems: Complexity results and approximation algorithms

598 D.S. Hochbaum, A. Pathria / European Journal of Operational Research 100 (1997) 594-607

Proof. Reduction same as above. Note that all cen- ters are of cost 1 or 2, with centers of cost 1 corresponding to truth assignments satisfying the given instance of SAT. Therefore, a ( 2 - E)- approximation algorithm will return a p-Center of cost less than or equal to 2 - ~ (and hence of cost 1) if and only if the given instance of SAT is satisfi- able. []

This last result can be further strengthened in the case of p-PairSupplier.

Theorem 1.3. There is no polynomial time (3 - ¢)- approximation algorithm for the A-inequality ver- sion of p-PairSupplier, for any ~ > 0, unless P = NP.

Proof. It is clear that both problems are in NP. To prove completeness, we provide a polynomial time reduction from SAT. Suppose we are given an in- stance of SAT on p variables, x l, x 2 . . . . . Xp, and n clauses. In our reduction, we construct a graph G on 2p + n nodes, with Pi associated with x; in the SAT expression, and each of the n additional nodes to be served associated with a clause. Add an edge from a clause node to a variable node with weight 0 if that variable is in the clause, and with weight 1 otherwise. (Add additional edges of weight 0 to make graph complete). Now, there exists a median of cost 0 (for both p-PairSupplierr~ and p-Pair- Center M) if and only if the given instance of SAT is satisfiable. []

Proof. Reduction same as in Theorem 1.2 showing that the A-inequality version of p-PairSupplier is NP-complete, except: for edges between clause nodes and variable nodes, assign weight of 1 between clause node and variable node if that variables is in the clause, 3 otherwise; for all remaining edges, assign weight 2. With edges of weight 1, 2, and 3, the only way for A-inequality to be violated is if there exists a triangle with edge weights (1, 1, 3); we do not have any such triangles. Now, note that all centers are of cost 1 or 3, with centers of cost 1 corresponding to truth assignments satisfying the given instance of SAT. Therefore, a ( 3 - e)- approximation algorithm will return a p-Center of cost less than or equal to 3 - E (and hence of cost 1) if and only if the given instance of SAT is satisfi- able. []

1.2. The Pair Median problems

We can define our objective function to sum the distances of the nodes to be served, rather than looking at the bottleneck distance; that is, we can look at the related 'altemative' p-Median problems, which we refer to as p-PairSupplier M and p-Pair- Center M. While this paper is primarily concerned with the Pair p-Center and Set p-Center problems, we make note of the following results:

Theorem 1.4. The decision problems associated with p-PairSupplier M and p-PairCenter M are NP-com- plete.

Corollary 1.3. There is no polynomial time a-ap- proximation algorithm for p-PairSupplier M or p- PairCenterM, for any constant a, unless P = NP.

Proof. Reduction same as above. Note that a median of cost 0 corresponds to a truth assignment satisfying the given instance of SAT. Therefore, an a-ap- proximation algorithm will return a median of cost 0 if and only if the given instance of SAT is satisfi- able. []

Theorem 1.5. The decision problems associated with the A-inequality versions of both p-PairSupplier M and p-PairCenter M are NP-complete.

Proof. Change edges of weight 0 and 1 to 1 and 2, respectively, in the graph constructed for the NP- completeness proof in Theorem 1.4; observe that the A-inequality is satisfied in the resulting graph. Now, there exists a median of cost C if and only if the given instance of SAT is satisfiable, where C = n or n + p for p-PairSupplier~ or p-PairCenter M, respec- tively. []

2. The Pair dominating set problems

In this section we consider the decision problems for p-PairSupplier and p-PairCenter: " I s there a solution to p-PairSupplier (or, p-PairCenter) of cost less than or equal w?"

Suppose we are given a graph, G, as defined in the introduction of this paper. We define the un-

Page 6: Generalized p-Center problems: Complexity results and approximation algorithms

D.S. Hochbaum, A. Pathria / European Journal o f Operational Research 100 (1997) 594-607 599

weighted graph G(w) to have the same nodes as G and to have those edges in G whose weight does not exceed w. Then the above decision problems are equivalent to asking if G(w) has an appropriately defined dominating set (p-PairSupplier D and p- PairCenter o are the dominating set problems associ- ated with p-PairSupplier and p-PairCenter, respec- tively):

p-PairSupplierD: Do there exist p nodes, one from each Pi, such that each node in W is adjacent to at least one node in the p-set chosen?

p-PairCenterD: Do there exist p nodes, one from each Pi, such that each node in V t3 W is adjacent to at least one node in the p-set chosen?

Since the optimal solution value to the Pair p- Center problems is equal to the weight of one of the edges in the original graph, we can imagine solving a series of 'alternative' dominating set problems, with the optimal solution value being the smallest edge weight, w, such that the answer to the appropriate dominating set problem with G(w) as input is 'yes ' . Hence, the study of the decision problems p-Pair- Supplier D and p-PairCenter D is relevant to solving p-PairSupplier and p-PairCenter, respectively. Clearly, the 'alternative' dominating set problems are NP-complete, because a polynomial algorithm for p-PairSupplier D or p-PairCenter D would imply a polynomial algorithm for p-PairSupplier or p-Pair- Center, respectively.

p-PairSupplier D will be the focus of this section; we establish the following correspondence with SAT:

Theorem 2.1. Consider the set of SAT instances on n clauses and p variables. Consider the set of p- PairSupplier D instances, with n nodes to be served and p pairs. There is a one-to-one correspondence between such instances so that the p-PairSupplier D instance has a solution if and only if the SAT instance is satisfiable; furthermore, for correspond- ing instances, a solution to the p-PairSupplier D in- stance corresponds to a satisfying assignment for the SAT instance, and vice-versa.

Proof. For a SAT instance, the corresponding p- PairSupplier o instance has an edge from a clause node to a variable node if and only if that variable is

in the clause (this correspondence is a bijection). It is easy to see that a solution to the p-PairSupplier D instance corresponds to a satisfying assignment to the corresponding SAT instance, and vice-versa. []

Hence, we can establish the following result:

Theorem 2.2. Special cases of p-PairSupplier D that are solvable in polynomial time have a one-to-one correspondence with polynomial time solvable spe- cial cases of SAT.

This last observation leads to a whole series of corollaries concerning polynomial time solvable spe- cial classes of p-PairSupplier D, since SAT has been so extensively studied. It also allows us to show that certain subclasses of p-PairSupplier D remain NP- complete. We begin with the third result from Hudec (1991), slightly improving upon the O(np) running time given there, and add a few more corollaries based on Theorem 2.2.

Corollary 2.1. Given an instance of p-PairSupplierD, suppose that each of the n nodes to be served is adjacent to exactly one node in each of the p pairs. This is solvable in O(n min{p, log 2 n}) time.

Proof. We simply have a corresponding SAT expres- sion, F, in conjunctive normal form (each clause contains each variable or its negation). The negation of F, /~, can be expressed in disjunctive normal form applying De Morgan's Law. Now, a truth assignment satisfying F corresponds to finding a missing minterm in the disjunctive normal form ex- pression of F. Such an assignment (or showing that no such assignment exists) can be found using radix sort in O(np) time. (The result from Hudec (1991) achieves this bound by considering n binary se- quences of length p, which is equivalent to looking at n clauses on p Boolean variables, as we are doing.)

We note that for a SAT expression on k variables in conjunctive normal form, if there are less than 2 k clauses, it is guaranteed to be solvable; so, if n < 2 P, we need only consider the first k variables and find a solution relying only on these k variables (and assign the remaining arbitrarily), where k is the smallest integer such that 2 k is greater than n (essen-

Page 7: Generalized p-Center problems: Complexity results and approximation algorithms

600 D.S. Hochbaum, A. Pathria / European Journal of Operational Research 100 (1997) 594-607

tially, k = O(log2n)): the radix sort takes time O(nk) =- O(n log2n) in this case. The result follows. []

The next two corollaries are essentially a restate- ment of the fact that 2-SAT is polynomial, but that 3-SAT is NP-complete.

Corollary 2.2. Given an instance of p-PairSupplier o, suppose that each of the n nodes to be served is adjacent to at most two variable nodes. This is solvable in O(n) time.

Proof. From the SAT perspective, we have an in- stance of 2-SAT on n clauses (each clause has one or two variables in it), which can be solved in linear time (see Even, Itai and Shamir, 1976). []

one solution that would not satisfy this node's clause) and we wish to find a k-ary sequence missing from the list. The result now follows in an analogous manner to before. []

Note that this last result could also be expressed even more generally, by allowing the tuples to be of different sizes and requiring each clause node to be non-adjacent to at most one node in each tuple. Note also that all of the above results could be augmented by also allowing clause nodes that are adjacent to all variable nodes in a given pair (k-tuple) because such nodes can be ignored as they are always 'satisfied' (i.e. a tautology), so that, for example, Corollary 2.1 would read "adjacent to at least one node per pair' rather than "adjacent to exactly one node per pair'.

Corollary 2.3. Consider p-PairSupplier D restricted to those instances where each clause node can be incident to at most 3 variable nodes. Solving p- PairSupplier D for this subclass of instances remains NP-hard.

Proof. Reduction from 3-SAT, which is known to be NP-complete (see Karp, 1972). []

As we have previously mentioned, such corollar- ies simply correspond to polynomial time solvable or NP-complete instances of SAT, so we will not pur- sue this any further.

Finally, we provide a generalized version of Corollary 2.1, in which we generalize p-PairSupplier to have k-tuples rather than pairs, and in which we still choose exactly 1 center from each k-tuple:

Corollary 2.4. Given an instance of "k-tuple' p- PairSupplier o, suppose that each of the n nodes to be served is adjacent to exactly k - 1 nodes in each of the p k-tuples. This is solvable in O(n min{p, log ~ n}) time.

Proof. It is now better to look at this in the Hudec (1991) context (from the earlier corollary) for gener- alization: we have n k-ary sequences (for each clause node, we have a k-ary sequence corresponding to the

3. Approximation algorithms for the Pair Center problems

In this section, we provide approximation algo- rithms for the A-inequality versions of p-PairSup- plier and p-PairCenter. In both cases, the solution provided is guaranteed to be within a factor of 3 of the optimal. For A p-PairSupplier our algorithm is best possible in the sense that, by Theorem 1.3, no approximation algorithm with polynomial running time whose performance is guaranteed to be within a constant factor less than 3 of the optimal exists, unless P = NP. For A p-PairCenter we cannot claim that our algorithm is best possible because we have only shown that finding a better than 2-approxima- tion algorithm is NP-hard; it would be nice to close, or even narrow, this gap, either by providing an approximation algorithm with a better performance guarantee or by establishing a stronger NP-complete- ness result regarding approximation algorithms for A p-PairCenter.

The technique that we employ for constructing approximation algorithms for A p-PalrSupplier and A p-PairCenter is to use 'powers of graphs' in conjunction with the Bottleneck Algorithm, as intro- duced by Hochbaum and Shmoys (1986). In their article, this approach was applied to numerous NP- complete bottleneck problems to provide approxima- tion algorithms for the given problems.

Page 8: Generalized p-Center problems: Complexity results and approximation algorithms

D.S. Hochbaum, A. Pathria / European Journal of Operational Research 100 (1997) 594-607 601

3.1. Powers of graphs and the Bottleneck Algorithm

Because the optimal solution value to bottleneck graph problems is often restricted to an easily com- putable set of values (for example, the weight of an edge, in our problems), the Bottleneck Algorithm is used in conjunction with a 'test' as follows:

procedure Bottleneck f o r i = 1 . . . . . m do

5_f Test (G`.) -- 'no' t h e n continue e l s e output certificate; stop

e n d

For NP-hard bottleneck optimization problems, finding the optimal solution via Bottleneck involves solving a 'test' that is typically an NP-complete decision problem. For p-PairSupplier, for example, let the possible optimal solution values be given by the graph edge weights,

we <~ we <~ "'" <~ we .

Then, Test(G,) would be equivalent to p-PairSup- plier D with G .̀ as input, where G .̀ is equivalent to G(w`.) as defined in the last section.

As was shown in Hochbaum and Shmoys (1986), however, when confronted with bottleneck graph optimization problems in which the edge weights satisfy the A-inequality, solving a 'test' problem (that is not NP-complete) on a related graph, namely the power of the original graph, can provide suffi- cient information for the derivation of an approxima- tion algorithm running in polynomial time.

maximum edge weight w, then H k is a subgraph of G with maximum edge weight <~ kw.

For the following discussion, we will assume that we have a minimization problem and that Bottleneck iterates through the possible optimal solution values in increasing order. Suppose we have a 'test' such that, for a particular positive integer k, Test(G`.) = 'no' implies that the answer to the decision prob- lem for G .̀ is no, but that Test(G`.)= 'yes ' implies that the answer to the decision problem for G~ is yes. Then, let i * = i be the smallest index for which the answer to Test(G`.)='yes ' . As Test(G`.._ l) = ' n o ' , we know that the optimal solution to the optimization problem is at least we,.; by Fact 3.1, however, T e s t ( G i . ) = ' y e s ' returns a solution with value no greater than kwe," . Thus, given such a test, it is easy to see that Bottleneck is a k-approximation algorithm for the original problem. We note that, as the goal is to find the smallest index i for which Test(G`.) = 'yes ' , it may be more efficient to imple- ment Bottleneck using a binary search strategy rather than in the iterative manner presented.

As demonstrated in Hochbaum and Shmoys (1986), and as we will now illustrate, one can often provide a suitable polynomial time 'test', and thereby yield a polynomial time approximation algorithm for the original NP-hard optimization problem.

3.2. 3-Approximation algorithms

We provide, in the proof of the next theorem, a 3-approximation algorithm that can be adapted for both p-PairSupplier and p-PairCenter.

Definition. The k-th power of a graph G, for a positive integer k, is denoted as G k. G k is the graph with the same set of nodes as G, and with an edge between two nodes if and only if there is a path with at most k edges between those two nodes in G.

We note the following fact:

Fact 3.1. Let G be a complete weighted graph whose edge weights satisfy the A-inequality, and let k be a positive integer. I f H is a subgraph of G with

Theorem 3.1. There exist polynomial time 3-ap- proximation algorithms for the A-inequality versions of p-PairSupplier and p-PairCenter.

Proof. Using Bottleneck, we need only establish that given an unweighted graph G, we can find a domi- nating set as in p-PairSupplier D or p-PairCenter D in G 3 or prove that no such dominating set exists in G. We let S be the set nodes to be served ( I W I = n nodes if we are solving p-PairSupplier, I W U V I = (n + 2p) nodes for p-PairCenter).

Page 9: Generalized p-Center problems: Complexity results and approximation algorithms

602 D.S. Hochbaura, A. Pathria / European Journal of Operational Research 100 (1997) 594-607

In G 2, find a maximal independent set, I, amongst the nodes to be served, S; each of the nodes in 1 must be served by a different node and, hence, by a different pair, Pr Now, consider the bipartite graph connecting nodes to be served, I, with super-nodes (one super-node for each of the p pairs, Pi) such that an edge exists between a node in I and a super-node if and only if the node from I is adja- cent, in G, to at least one of the nodes in the super-node. Now, we find a maximum matching, M, in this bipartite graph. If [ M [ < [ I I, then not all of the nodes, I, can be served by a different supply node; that is, there is no feasible solution and the answer to the dominating set problem is no. Other- wise, for each m ~ M, let c m be the clause node incident to m and let d m be the node in the super- node incident to rn that is adjacent to c m in G. I_~t

D f { d m l m ~ M }.

NOW, in G, each node in the set of nodes to be served, S, is within distance 2 of some node in 1 (since I is a maximal independent set in Gz), and each node in I is adjacent to a node in D (because I DI = I I I). Hence, all nodes in S are within dis- tance 3 of some node in D, in other words, D is an appropriate dominating set in G 3. (Note: if I D [ < p, then one can arbitrarily augment D if it is desired to return a solution with exactly p centers.)

It is easy to see that all of the given operations can be carried out in polynomial time. []

A description of the ' test ' used in the 3-approxi- mation algorithm, as discussed in the previous theo- rem, is given in Table 2. An illustrative example is provided next.

~ V: a~er nodes

W: e~om~r nodes

Scheme 1.

Scheme 2.

Example. We illustrate application of Test(G), step by step, by way of an example of p-PairSupplier D. Input: Consider an instance of p-PairSupplier D on the graph G. (see Scheme 1).

Step 1. W is the set of nodes to be served. Step 2. Given in Scheme 2 is G 2 (actually, the

subgraph of G 2 induced by W, as those are the nodes that we are interested in). I = {w 3, w 4} is a maximal independent set.

Step 3. Now form the bipartite graph B as de- scribed in Test(G) in Table 2; see Scheme 3.

Step 4. M = {(w 3, Pl), (w4, P2)} is a maximum matching in B. In the graph G, w 3 is adjacent to dl2 E P~ and w 4 is adjacent to d21 E P2; SO, we set D ---- {d12, d21}.

~ P

_ _ I

Scheme 3.

Table 2 Test (G) used by Bottleneck for p-PairSupplier and p-PairCenter

Input: G = (VU W, E), an instance of p-PairSupplier D or p-PalrCenter D, where V is partitioned into p pairs of vertices P~ . . . . . Pp. Step 1. Let S be the nodes to be served (W for p-PairSupplier, W 13 V for p-PairCantcr). Step 2. In G 2, find a maximal independent set I amongst the vertices S. Step 3. Form the bipartite graph B = (! U P, E B), where

P f { p i l P j ~ V } and E B f { ( c , P ~ ) [ c ~ l , cadjacentto Pi inG} . Step 4. Find M, a maximum matching in B.

For each ( c m, Pro) ~ M, select a node d m ~ Pm such that ( cm, din) ~ E( G) Let D = {din}. / * note that ] M [ = [ D I* /

Step 5. If [ M [ < [II then output 'no ' / * no appropriate 'alternative' dominating set in G * / else output D / * Test(G) = 'yes ' ; appropriate 'alternative' dominating set in G 3 * /

Page 10: Generalized p-Center problems: Complexity results and approximation algorithms

D.S. Hochbaum, A. Pathria / European Journal of Operational Research 100 (1997) 594-607 603

Step 5. [ M I = I I [. Thus, Test(G) = 'yes ' , and D is an appropriate 'alternative' dominating set in G 3.

p-PairCenter are restricted versions of p-SetSupplier and p-SetCenter, respectively. I:]

We make one comment regarding Step 2 in the Example. One could have selected I - - {w2, 14,'4, Ws} as the maximal independent set, in which case 'no' would have been returned as the answer to Test(G), indicating that there is no appropriate 'alternative' dominating set in G. This is not inconsistent with the fact that the selection of I = {w 3, w 4} leads to the conclusion that there is an appropriate 'alternative' dominating set in G 3.

Similarly, the median and dominating set ver- sions of the Set p-Center problems are also NP-com- plete. The results of Section 2, however, in which the correspondence between p-PairSupplier D and SAT was explored, do not naturally generalize to p-SetSupplier D.

4.2. Approximation algorithms

As noted earlier, our approximation algorithm is best possible for A p-PalrSupplier in that, as shown in Theorem 1.3, it is NP-hard to find polynomial time algorithm with a better constant factor perfor- mance guarantee. For A p-PairCenter there is a gap between the quality of approximation that our algo- rithm guarantees and the result in Theorem 1.2.

We can adapt the approximation algorithms of the previous section to get polynomial time 3-approxi- marion algorithms for the A-inequality versions of these generalized Set p-Center problems.

Theorem 4.2. There exist polynomial time 3-ap- proximation algorithms for the A-inequality versions of p-SetSupplier and p-SetCenter.

4. The Set Center problems

4.1. Complexity

We now turn to the more general Set p-Center problems, p-SetSupplier and p-SetCenter. The fol- lowing theorem establishes the complexity of these problems.

Theorem 4.1. The decision problems associated with p-SetSupplier and p-SetCenter are NP-complete; furthermore, there is no a polynomial time a-ap- proximation algorithm for p-SetSupplier or p- SetCenter, for any constant a, unless P = NP. In addition, the decision problems associated with A p-SetSupplier and A p-SetCenter are NP-complete; additionally, there does not exist a polynomial time ( 3 - ~)-approximation algorithm for p-SetSupplier or a polynomial time ( 2 - E)-approximation algo- rithm for p-SetCenter, for any constant ~ > O, unless P-~ NP.

Proof. Follows immediately from the results of Sec- tion 1, and the observation that p-PairSupplier and

Proof. First of all, it is easy to see that necessary and sufficient conditions for a problem instance to have a p-Center that satisfies all of the problem constraints is that

0-<< lj~< uj~< Ivj I for j = 1 . . . . . k,

and that

k k

E lj-<< p -<< E u j . j - i j=l

So, we will assume that the problem is well defined in that it is possible to choose a p-Center that satisfies all of the problem constraints; otherwise, we can immediately return that the problem has no feasible solution.

Now, the proof is very similar to that of Theorem 3.1; the dominating set type of problem encountered is simply altered to correspond to the decision prob- lem associated with the relevant generalized p-Center problem. As before, we let S be the set nodes to be served. In G 2, find a maximal independent set, I, amongst the nodes to be served, S. Because I is an independent set in G 2, no two nodes in 1 are adja- cent to a common node in G; hence, each of the

Page 11: Generalized p-Center problems: Complexity results and approximation algorithms

604 D.S. Hochbaum, A. Pathria / European Journal of Operational Research 100 (1997) 594-607

nodes in I must be served by a different node in V. Now, consider the bipartite graph connecting nodes to be served, I, with super-nodes, J (one super-node for each of the k sets, Vj) such that an edge exists between a node in 1 and a super-node if and only if the node from I is adjacent, in G, to at least one of the nodes in the super-node. In addition, add a dummy node i 0 that is adjacent to each of the nodes of J to ensure both that exactly p supply nodes are selected and that a suitable number of nodes from each Vj is selected. Call the resulting graph B.

We determine if the following system of integer inequalities, (II), is feasible. (II) formulates a gener- alized matching problem on the bipartite graph B: The variable xi/corresponds to the weight assigned to the edge {i, j}.

(II)

{lp for i E / , xiJ= - I 1 1 f o r i = i 0,

j ~ J

lj< ~. x,j<~uj vj~J, i~ lU{i o)

xig~>0, integer Vi~IU{ io} , j ~ J ,

xi~ = 0 V{i,j} such that i not adjacent to Vj.

See Fig. 3. Now, if (II) is infeasible, then not all of the nodes

I can be legally served by a different supply node; that is, the answer to the associated dominating set type of problem is no. Otherwise, as in the proof of Theorem 3.1, define D to be the selected set of

Each node in I must be se rved be a different center.

Each node j E J corresponds to a set ~ .

: ................... v ................................................................................. B 1 :

J

=o ,~1

• i

: I

A feasible solution to the system (II) eorrespondl to assigning integer weights to the edges in B as follows (zi$ is the nonnegntlve integer weight uslgned to the edge {i, j} , where i ~ zu {io},j ~ 1): N o d e s in JJ Each node .i E J eorrmponds to a different set of suppliers Vj. The sum of

weights of edges incident to j , which represents the number of nodes from Vj selected for the center, must be between lj and uj.

N o d e s in I~ These nodes must be served by a different supply node. For each node i E I , exactly one e ~ e incident to i is to he aes~ned weight 1 (~q = 1 corresponds to node i being served by a node in ~ ) , and the rest are ass~ned weight O. Note that zi$ = 0 whenever t in the graph G, i is not adjacent to any node in ~ .

N o d e s01 Additional nodes from the Y~'s may need to be arbitrarily selected for the center in order to sati~ey the constraints on how many centers are to be selected from each set ~ . The weight zioj represents the number of additional centers chosen from ~ . The sum of the weights of edges incident to 10 must he p - [I[, ensuring that p centers are selected in total.

Fig. 3. Integer inequali t ies (II) ar is ing in Test(G) for p-SetSupplier and p-SetCenter.

Page 12: Generalized p-Center problems: Complexity results and approximation algorithms

D.S. Hochbaum, A. Pathria / European Journal of Operational Research 100 (1997) 594-607 605

server nodes in G corresponding to the solution to (II). That is, for each xij > 0, where i E I, j ~ J, select a node in J adjacent to i in G to be in D; additional centers needed, to ensure that the interval restrictions for each V~ are satisfied, can be found by selecting an additional xi0j nodes from Vj.

In G, each node in the set of nodes to be served S is within distance 2 of some node in I (since I is a maximal independent set), and each node in I is adjacent to a node in D. Hence, all nodes in S are within distance 3 of some node in D; in other words, D is an appropriate dominating set in G 3. (Note that if we only require that up to p nodes be selected, then the constraint involving x~0 in (II) can be converted from an equality constraint to an inequal- ity constraint.)

In order to establish that all of the operations in the above proof can be carried out in polynomial time, we need only establish that (II) can be solved in polynomial time. We claim that (II) has a totally unimodular constraint matrix (A), from which it follows that it can solved in polynomial time using a polynomial time LP solver. Consider a square sub- matrix A' of A. If A' contains both rows corre- sponding to the upper bound and the lower bound constraint for a particular j ~ J, then A' has determi- nant 0. Otherwise, A' is simply a square submatrix of a matrix in which only one of the two inequalities for each j ~ J occurs; because B is bipartite, such a matrix is known to be totally unimodular. []

We note that the fact that the constraint matrix of (II) is totally unimodular can also be considered a corollary of the following more general lemma, whose validity can be established in a manner analo- gous to that presented in the above proof.

Lemma 4.1. Let A be a totally unimodular matrix and let A' be a matrix made up of a subset of the rows of A. Then, the matrix

[aA] is totally unimodular.

Before concluding, we remark that (II) can also be solved using network flow techniques (see Ahuja,

Magnanti and Odin, 1993, for an extensive treatment of the topic of network flows), which tend to be more efficient than solving the LP-relaxation using a polynomial time LP solver. Let N be a network flow problem corresponding to (II) as follows:

Nodes: A source s, a sink t, and nodes i0, 1, and J.

Arcs: An arc (s, i), for each i ~ I, with capacity 1; an arc (s, i 0) with lower bound and capacity I I I - p (the lower bound constraint can be dropped if, rather than requiring exactly p centers be selected, it is only required to select up to p centers); an uncapaci- tated arc (i, j), i ~ I, j ~ J, if i is adjacent to a node in Vj in G; an uncapacitated arc from i 0 to each j E J; and, finally, an arc ( j , t), for each j E J, with lower bound lj and capacity uj.

Now, it is easy to see that there is a one-to-one correspondence between feasible integer flows in N and solutions to (II).

5. Summary

In this paper, motivated by two 'alternative' p- Center problems introduced in Hudec (1991), p- PairSupplier and p-PairCenter, we defined two gen- eral 'Set' p-Center problems: p-SetSupplier and p- SetCenter. We studied the 'Pair' p-Center problems in some detail, including the derivation of results based on a correspondence established between SAT and p-PairSupplier. In addition, we have established NP-completeness results for p-SetSupplier and p- SetCenter (as well as the restricted versions, p- PairSupplier and p-PairCenter, respectively); for the cases where the edge weights satisfy the Ll-in- equality, we have provided 3-approximation algo- rithms for both p-SetSupplier and p-SetCenter; for p-SetSupplier, the constant 'factor within optimality' bound of 3 achieved by our approximation algorithm cannot be improved upon by any algorithm with polynomial running time, unless P = NP.

For p-SetCenter, it would be nice to close the gap between the 3-approximation algorithm that we pro- vide and our result (Theorem 4.1; Corollary 1.2 in the case of p-PairCenter) that states that finding an a-approximation algorithm with polynomial running

Page 13: Generalized p-Center problems: Complexity results and approximation algorithms

606 D.S. Hochbaum, A. Pathria / European Journal of Operational Research 100 (1997) 594-607

time, for a < 2, is NP-hard. As we have noted earlier, p-SetCenter is similar to the weighted p- Center problem; interestingly, a similar gap exists between the best known approximation algorithm and the strongest NP-completeness result for the weighted p-Center problem (see Hochbaum and Shmoys, 1986).

Our approximation algorithms have been devel- oped using the Bottleneck Algorithm. Just as approx- imation algorithms based on other techniques exist for the regular p-Center problem (for example, the greedy 2-approximation algorithm in Gonzalez, 1985), so too should approximation algorithms using alternative approaches exist for the problems studied in this paper. It may be interesting to develop such algorithms; indeed, it may help close the 'gap' al- luded to in the previous paragraph.

In this study, we have been primarily concerned with establishing NP-completeness results and demonstrating the existence of polynomial time ap- proximation algorithms. We have not been overly concerned with the precise running times of our approximation algorithms; as it turns out, the algo- rithms developed for p-PairSupplier and p-Pair- Center are very straightforward and can be effi- ciently implemented. An immediate improvement to the running time of Bottleneck can be achieved by employing a binary, rather than iterative, search for the optimal solution, thereby reducing the number of calls to Test(G.) to log m from m (where m is the number of possible optimal solution values). It may be worthwhile to develop heuristics that improve the running time of each application of the 'test' in Bottleneck. For example, to improve the running time of the 'test' based on the proof of Theorem 3.1, we can check to see if I I [ > P (and return 'no') before constructing the maximum matching. Con- sider also the approximation algorithms for p- SetSupplier and p-SetCenter that involve solving a generalized matching problem. While this can be done in polynomial time by solving the associated integer program using a polynomial time time LP solver, it would be more efficient, as we have noted, to solve the integer program by using network flow techniques. The problem encountered can be thought of as a generalized matching problem in which the objective is to find a subset of edges such that each node is incident to a number of subset edges that

is within a pre-specified range [l i, ui] for each node i. 4

It may also be interesting to further study special cases of the dominating set type of problems that arise when using the Bottleneck Algorithm for solv- ing p-PairSupplier and p-PairCenter. We have pro- vided some results along these lines for p-PairSup- plier D, but they may be extendible to p-PairCenter D and to the generalized dominating set type of prob- lems associated with p-SetSupplier and p-SetCenter.

Finally, we mention that there has been some recent work to develop 'sub-exponential' algorithms for the Eucl idean (where all of the points lie in the plane) versions of several NP-hard graph problems. Indeed, this is the case for the Euclidean p-Center problem (see Hwang, Lee and Chang, 1993), where an algorithm with running time O(n¢ "~) is given. Other interesting results have also been developed for Euclidean problems, including the linear time algorithm of Megiddo (1983) for the Euclidean 1- Center problem. It would be interesting to establish the complexity of, and to develop such algorithms for, the Euclidean versions of the 'alternative' p- Center problems.

References

Ahuja, R.K., Magnanti, T.L., and Odin, J.B. (1993), Network Flows: Theory, Algorithms, and Applications, Prentice-Hall, Englewood Cliffs, NJ.

Even, S., Itai, A., and Shamir, A. (1976), "On the complexity of timetable and multicommodity flow problems", SlAM Journal on Computing 5, 691-703.

Garey, M.R., and Johnson, D.S. (1979), Computers and In- tractability: A Guide to the Theory of NP-Completeness, Free- man, San Francisco, CA.

Gonzalez, T.F. (1985), "Clustering to minimize the maximum intercluster distance", Theoretical Computer Science 38/2-3, 293-306.

Hwang, R.Z., Lee, R.C.T., and Chang, R.C. (1993), "The slab dividing approach to solve the Euclidean p-Center problem", Algorithmica 9, 1-22.

4 Motivated by this application, we have developed a polyno- mial algorithm (Hochbaum and Pathria, 1994) to find a minimum weight generalized matching in a general graph; the method of solution is to reduce the original problem to a minimum weight perfect matching problem on a related graph.

Page 14: Generalized p-Center problems: Complexity results and approximation algorithms

D.S. Hochbaum, A. Pathria / European Journal of Operational Research 100 (1997) 594-607 607

Hochbaum, D.S., and Pathria, A. (1994), ".S"~'-matchings", Un- published manuscript.

Hochbaum, D.S., and Shmoys, D. (1986), "A unified approach to approximation algorithms for Bottleneck problems", Journal of the Association for Computing Machinery 33/3, 533-550.

Hudec, O. (1991), "On alternative p-Center problems", Zeitschrift f~r Operations Research - Methods and Models of Operations Research 36, 439-445.

Karp, R.M. (1972), "Reducibility among combinatorial

problems", in: R.E. Miller and J.W. Thatcher (eds.), Complex- ity of Computer Computations, Plenum Press, New York, 85-103.

Kariv, O., and Hakimi, S.L. (1979), "An algorithmic approach to network location problems: The p-Centers", SlAM Journal on Applied Mathematics 3, 513-538.

Megiddo, N. (1983), "Linear-time algorithms for linear program- ming in R 3 and related problems", SlAM Journal on Comput- ing 12/4, 759-776.