Mathematical Problems in Engineering

Volume 2013, Article ID 313868, 6 pages

http://dx.doi.org/10.1155/2013/313868

## The Inverse 1-Median Problem on Tree Networks with Variable Real Edge Lengths

^{1}College of Science, China Jiliang University, Hangzhou 310018, China^{2}Division of Computer Science and Engineering, Chonbuk National University, Jeonju, Jeonbuk 561-756, Republic of Korea^{3}College of Computer Science, Zhejiang University of Technology, Hangzhou 310023, China

Received 25 January 2013; Accepted 22 March 2013

Academic Editor: Carlo Cattani

Copyright © 2013 Longshu Wu et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### Abstract

Location problems exist in the real world and they mainly deal with finding optimal locations for facilities in a network, such as net servers, hospitals, and shopping centers. The inverse location problem is also often met in practice and has been intensively investigated in the literature. As a typical inverse location problem, the inverse 1-median problem on tree networks with variable real edge lengths is discussed in this paper, which is to modify the edge lengths at minimum total cost such that a given vertex becomes a 1-median of the tree network with respect to the new edge lengths. First, this problem is shown to be solvable in linear time with variable nonnegative edge lengths. For the case when negative edge lengths are allowable, the NP-hardness is proved under Hamming distance, and strongly polynomial time algorithms are presented under and norms, respectively.

#### 1. Introduction

Location problems have found important applications in operations research, computer science, and logistics management. The -median problem is a typical location problem and has been intensively considered in the literature. The -median problem on an undirected graph is to locate facilities on edges or vertices of the graph such that the sum of the weighted distances of the vertices to the closest facility is minimized. This problem possesses the vertex optimality property which asserts that there exists an optimal solution such that all facilities are located at the vertices of the graph. Kariv and Hakimi [1] showed that the -median problem is NP-hard even if the graph is a planar graph of maximum degree 3. Therefore, many investigations are dedicated to special graph classes which allow a more efficient algorithm. In the case of tree networks, the 1-median problem is solvable in linear time by Hua [2] and Goldman [3].

However, in an established network, the locations of facilities have already been fixed. The changing environment might make the existing facilities deviate from the median places of the network. Instead of finding optimal locations, the task is to modify parameters at minimum cost such that the prespecified locations become optimal. This arises what we call the inverse -median problem. In recent years, inverse -median problem found an increasing interest [4–8].

Burkard et al. [9] considered inverse -median problems with variable vertex weights and showed that discrete inverse -median problems with real weights can be solved in polynomial time, if is fixed and not an input parameter.Burkard et al. [9, 10] investigated the inverse 1-median problem with variable vertex weights and showed that the problem is solvable by a greedy-type algorithm in time if the underlying network is a tree or the location problem is defined in the plane (if the distances between the points are measured in the Manhattan or maximum metric) and in time on cycles. The inverse Fermat-Weber problem was studied by Burkard et al. [11]. They derived a combinatorial approach which solves the problem in time for unit cost and under the assumption that the prespecified point that should become a 1-median does not coincide with a given point in the plane. Galavii [12] proposed linear time algorithms for the inverse 1-median problem with variable vertex weights on trees (with nonnegative weights) and on paths (with negative weights while the weights of endpoints are arbitrary). Under weighted Hamming distance, Guan and Zhang [13] presented polynomial time algorithm for the inverse 1-median problem with variable vertex weights on trees. Bonab et al. [14] showed that the inverse -median problem with variable edge lengths is strongly NP-hard on general graphs and weakly NP-hard on series-parallel graphs. In [14], the authors also presented a polynomial time algorithm for the inverse 2-median problem with positive variable edge lengths on trees and a linear time algorithm for the special case of star graphs. In this paper, we first provide a linear time algorithm to solve the inverse 1-median problem on tree networks with variable nonnegative edge lengths. For the case when negative edge lengths are allowable, we show that this problem is NP-hard under Hamming distance and we propose strongly polynomial time algorithms under and norms, respectively.

The paper is organized as follows. In Section 2, we define the inverse 1-median problem on trees with variable edge lengths, then we show some properties of this problem. Based on these properties, a linear time algorithm for variable nonnegative edge lengths is presented; when negative edge lengths are allowable, the NP-hardness of the problem under Hamming distance is proved and the strongly polynomial time algorithms of the problem under and norms are proposed in Section 3. Some final remarks are given in Section 4.

#### 2. Preliminaries

Let be an undirected tree graph with vertex set and edge set with . The weight of a vertex is denoted by , and the length of each edge is denoted by . The 1-median problem on trees is to locate a facility on such that the sum of the weighted distances of the vertices to this facility is minimized.

Let be a criterion function (having length vectors as argument) such that and if . (For , means that , for all .) Suppose that the unique path from to is denoted by . Let be a specific vertex in . Denote the adjusted edge length vector by . Let denote the length of with respect to . The lower bound of is denoted by for each . Readers can refer to [15] for other graph theory terms not defined here. The inverse 1-median problem on tree networks with variable real edge lengths can be formally described as follows:

If we delete an edge from , the tree will be partitioned into two subtrees, one of which containing the prespecified vertex is denoted by , and the other is denoted by , where , denote the vertex sets and , denote the edge sets of , , respectively. Let , and let for each ; then for any , and the first constraint of (1) can be changed to So, we can simplify (1) as

For any , without loss of generality, suppose the sequence of vertices and edges in is . We have Therefore, Then, for , by (2), we have According to (7), we further obtain the following two formulas:

From the above analysis, we have the following.

Theorem 1. *If there exists a vertex satisfying , then and for each , where denotes the edge of the path incident with vertex .*

*Proof. *By contradiction. If , then from (9) we have for each edge . By (2), , which contradicts the fact that . So . As , for each and , by (8), we can deduce that . This completes the proof.

Based on the above properties, we will present some algorithms of the problem under different norms and analyses their complexities in the next section.

#### 3. Algorithms and Complexities

##### 3.1. The Problem with Variable Nonnegative Edge Lengths (I1MT-N)

In this section, we consider the following problem:* **I1MT-N*. When for each , we call (4) Problem I1MT-N, which is the inverse 1-median problem on trees with variable nonnegative edge lengths.

Denote the optimal solution of Problem I1MT-N by . We present Algorithm 2 to solve this problem. particulary, Algorithm 2 can solve Problem I1MT-N under all kinds of norms only by edge length reduction.

*Algorithm 2. ** * * * *Step 1*. Let , .*Step 2*. Let . For each ,(1)if , then let and ;(2)if , then for each , let and . *Step 3.* Let and . If , stop. Otherwise, turn to Step 2.

Theorem 3. *Algorithm 2 correctly finds the optimal solution of Problem I1MT-N in linear time.*

*Proof. *First, we show that obtained by Algorithm 2 is a feasible solution of Problem I1MT-N. It is clear that or ; so it satisfies for each . For each vertex and , from Step 2 of Algorithm 2, when , ; and when , . Hence, for each . Therefore, is a feasible solution of Problem I1MT-N.

Suppose is not the optimal solution of Problem I1MT-N and suppose that the optimal solution is . Then under there exists at least one edge satisfying one of the following two cases:

*Case 1 ( and ). *Without loss of generality, suppose . By (9), for . Notice that for each . We have , which contradicts the feasibility of .

*Case 2 ( and ). *We define a new vector such that
From the result of Case 1, we know that when , . And it is easy to see that for each . Then, we have for each vertex . So is a feasible solution of Problem I1MT-N. But , a contradiction to the optimality assumption of .

Therefore, Algorithm 2 correctly finds the optimal solution of Problem I1MT-N.

The main computation of Algorithm 2 is to compute for each edge , then to modify the corresponding edge length of according to from Step 2. Notice that where is a constant. Let be the root vertex and conduct the breadth-first method to . We can compute iteratively from the edges incident with the leaves at the bottom layer up to in the rooted tree. So Problem I1MT-N can be solved in time by using Algorithm 2.

From Algorithm 2, we know that for Problem I1MT-N it is not necessary to increase the edge lengths of the tree network. So to solve Problem I1MT-N is equivalent to solving the following program:

##### 3.2. The Problem with Variable Real Edge Lengths

###### 3.2.1. The Model Under Norm with Variable Real Edge Lengths (I1MT-R-)

In this section, we consider the following inverse 1-median problem on trees with variable real edge lengths under norm when edge length increase is forbidden. *I1MT-R- **.* When for each and the criterion function is a function such that , where is the cost vector and is the cost of decreasing by one unit for each , we call (4) Problem I1MT-R-, which is the inverse 1-median problem on trees with variable real edge lengths under norm.

Problem I1MT-R-can be formally described as follows:

For a path , suppose that and , where . Denote the optimal solution of Problem I1MT-R- by . We have the following.

Theorem 4. * for .*

*Proof. *By (9), clearly for and for . Suppose to the contrary that there exists an edge such that . Similar to the proof of Case 2 in Theorem 3, we define a new feasible solution such that and when . Then we have for each vertex . But , and therefore , a contradiction to the fact that is the optimal solution of Problem I1MT-R-. This completes the proof.

From Theorem 4, we only need to determine the optimal adjusted edge lengths with . We construct the subtree of with , , and . Clearly, . Regard as a directed tree with the orientation from the root to all leaves (e.g., by conducting the breadth-first method). For each , let denote the path from to on the tree . We can simplify (13) as

In [16, 17], the authors considered the shortest path improvement problem, which is how to shorten the lengths of edges with as less cost as possible such that the distances between specified sources and terminals are reduced to the required bounds. It is not difficult to see that (14) is in fact a shortest path improvement problem for tree networks with single source and the required bound 0 under norm. Let , , and for each . Let for each . Equation (14) can be formulated as the following linear program: Equation (15) is a combinatorial linear program and can be solved by a strongly polynomial time algorithm [18]. Moreover, (15) can be solved much faster [16, 17]. In [16], the authors presented a steepest descent-type combinatorial algorithm to solve this problem, which runs in time. In [17], the authors formulated the dual problem of (15) as a minimum cost flow problem on a two-terminal serial-parallel graph and then gave an algorithm to obtain the primal optimal solution of (15), with the whole procedure running in time.

From the above analysis, we have the following theorem.

Theorem 5. *Problem I1MT-R- can be solved in time.*

###### 3.2.2. The Model under Hamming Distance with Variable Real Edge Lengths (I1MT-R-H)

Now we consider the model under Hamming distance. The definition of Hamming distance will be given in this section.* **I1MT-R-H*. When for each and is the cost of decreasing for each , we call the following program (16) Problem I1MT-R-H, which is the inverse 1-median problem on trees with variable real edge lengths under Hamming distance:
where the Hamming distance is defined as

From a similar discussion in the former Section 3.2.1, Problem I1MT-R-H can be formulated as follows: Equation (18) is a shortest path improvement problem for tree networks with single source and the required bound 0 under Hamming distance [19]. In [19], the authors proved that even if the network is a chain network, the problem is still NP-hard. So, we have the following.

Theorem 6. *Problem I1MT-R-H is NP-hard.*

###### 3.2.3. The Model under Norm with Variable Real Edge Lengths (I1MT-R-)

We consider the model under norm as follows: *I1MT-R*-. When for each and the criterion function is a function such that , where is the cost vector, is the cost of decreasing by one unit for each , and stands for norm of vector , we call (4) Problem I1MT-R-, which is the inverse 1-median problem on trees with variable real edge lengths under norm.

Also from a similar discussion in Section 3.2.1, Problem I1MT-R-can be formally described as follows: Let , , , , and for each and . First, we suppose that for each . Equation (19) can be formulated as the following program:

In [20], the authors presented a strongly polynomial time algorithm to solve this type of problem, which runs in time. Because the network concerned here is tree network, we now give a simplified procedure to solve (20) which runs in time.

On tree , if , we need do nothing. Hence, we only consider the case that . Clearly, the optimal solution satisfies . Denote , then for any edge , we have .

As the procedure in [20], first we sort the edges by their lengths in an increasing order. Beginning with the shortest edge, say , set for each , and check if . If yes, we know that the lengths are overreduced and . If , is the optimal solution. If , then , and in this case we contract the edges with into vertices and repeat the process on the resulted network with respect to . Since at least one vertex disappears in each contraction, the procedure has at most iterations. For the time complexity, to find the shortest edge can be completed in time, and in each iteration, the time for checking if is . Hence, the complexity of this procedure is . In the following, we assume that , which means that the preliminary procedure is finished while the optimality has not been reached.

Because the path between any two vertices on tree network is unique, let denotes the set of vertices which does not satisfy the upper bound demand. Let be the number of edges of path . Let then is the optimal reduction.

*Remark 7. *Note that when for each , (20) can be formulated as the following program:

In this case, we denote ; then for any edge , we have . We sort the edges by in an increasing order to conduct the preliminary procedure to ensure that , where is the edge satisfying . Let then is the optimal reduction. Similar discussions show that the above procedure correctly solves program (22), and its computational complexity is .

From the above analysis, we have the following theorem.

Theorem 8. * Problem I1MT-R- can be solved in time.*

#### 4. Conclusion

In this paper, we discussed the inverse 1-median problem with variable edge lengths on tree networks. We showed that this problem is solvable in linear time with variable nonnegative edge lengths under all kinds of norms. For the case when negative edge lengths are allowable, by formulating this problem to some known combinatorial optimization problems, we showed that this problem is NP-hard under Hamming distance and we proposed strongly polynomial time algorithms under and norms, respectively.

As a future research topic, it will be meaningful to consider the problem on other networks such as the interval graph, the cactus graph, and the block graph, especially under the Hamming distance. We know that Algorithm 2 can solve Problem I1MT-N under all kinds of norms. But when negative edge lengths are allowable, we only dealt with the problems under the constraint that the edge length increase is forbidden. So we can further study the complexity of the problems such that the edge lengths can either be reduced or increased. In addition, for the inverse -median problems for , designing the optimal or approximation algorithms and analysing their computational complexities are also promising.

#### Acknowledgments

This research was supported by the National Natural Science Foundation of China (NSFC nos. 11171316 and 61173002), the Grant of the Second Stage of Brain Korea 21, and Zhejiang Provincial Natural Science Foundation of China (no. Y6090472).

#### References

- O. Kariv and S. L. Hakimi, “An algorithmic approach to network location problems. II. The
*p*-medians,”*SIAM Journal on Applied Mathematics*, vol. 37, no. 3, pp. 539–560, 1979. View at Publisher · View at Google Scholar · View at MathSciNet - L. K. Hua, “Applications of mathematical models to wheat harvesting,”
*Chinese Mathematics*, no. 2, pp. 77–91, 1962. View at Google Scholar - A. J. Goldman, “Optimal center location in simple networks,”
*Transportation Science*, no. 5, pp. 212–221, 1971. View at Google Scholar · View at MathSciNet - H. Shi, W. Wang, N. M. Kwok, and S. Y. Chen, “Game theory for wireless sensor networks: a survey,”
*Sensors*, vol. 12, no. 7, pp. 9055–9097, 2012. View at Google Scholar - O. Berman and J. Wang, “The network
*p*-median problem with discrete probabilistic demand weights,”*Computers & Operations Research*, vol. 37, no. 8, pp. 1455–1463, 2010. View at Publisher · View at Google Scholar · View at MathSciNet - M. Chrobak, C. Kenyon, J. Noga, and N. E. Young, “Incremental medians via online bidding,”
*Algorithmica*, vol. 50, no. 4, pp. 455–478, 2008. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet - R. Tadei, N. Ricciardi, and G. Perboli, “The stochastic
*p*-median problem with unknown cost probability distribution,”*Operations Research Letters*, vol. 37, no. 2, pp. 135–141, 2009. View at Publisher · View at Google Scholar · View at MathSciNet - S. Chen, Y. Zheng, C. Cattani, and W. Wang, “Modeling of biological intelligence for SCM system optimization,”
*Computational and Mathematical Methods in Medicine*, vol. 2012, Article ID 769702, 10 pages, 2012. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet - R. E. Burkard, C. Pleschiutschnig, and J. Zhang, “Inverse median problems,”
*Discrete Optimization*, vol. 1, no. 1, pp. 23–39, 2004. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet - R. E. Burkard, C. Pleschiutschnig, and J. Z. Zhang, “The inverse 1-median problem on a cycle,”
*Discrete Optimization*, vol. 5, no. 2, pp. 242–253, 2008. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet - R. E. Burkard, M. Galavii, and E. Gassner, “The inverse Fermat-Weber problem,”
*Technical Report*2008-14, Graz University of Technology, Graz, Austria, 2008. View at Google Scholar - M. Galavii, “The inverse 1-median problem on a tree and on a path,”
*Electronic Notes in Discrete Mathematics*, no. 36, pp. 1241–1248, 2010. View at Google Scholar - X. C. Guan and B. W. Zhang, “Inverse 1-median problem on trees under weighted Hamming distance,”
*Journal of Global Optimization*, vol. 54, no. 1, pp. 75–82, 2012. View at Publisher · View at Google Scholar · View at MathSciNet - F. B. Bonab, R. E. Burkard, and E. Gassner, “Inverse
*p*-median problems with variable edge lengths,”*Mathematical Methods of Operations Research*, vol. 73, no. 2, pp. 263–280, 2011. View at Publisher · View at Google Scholar · View at MathSciNet - R. Diestel,
*Graph Theory*, Springer, Heidelberg, Germany, 3rd edition, 2005. View at MathSciNet - J. Z. Zhang and Y. X. Lin, “Computation of the reverse shortest-path problem,”
*Journal of Global Optimization*, vol. 25, no. 3, pp. 243–261, 2003. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet - J. Z. Zhang, X. G. Yang, and M. C. Cai, “Inapproximability and a polynomially solvable special case of a network improvement problem,”
*European Journal of Operational Research*, vol. 155, no. 1, pp. 251–257, 2004. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet - E. Tardos, “A strongly polynomial algorithm to solve combinatorial linear programs,”
*Operations Research*, vol. 34, no. 2, pp. 250–256, 1986. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet - B. W. Zhang, J. Z. Zhang, and L. Q. Qi, “The shortest path improvement problems under Hamming distance,”
*Journal of Combinatorial Optimization*, vol. 12, no. 4, pp. 351–361, 2006. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet - J. Z. Zhang, X. G. Yang, and M. C. Cai, “A network improvement problem under different norms,”
*Computational Optimization and Applications*, vol. 27, no. 3, pp. 305–319, 2004. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet