Efficient algorithms for two generalized 2-median problems and the group median problem on trees

  • Authors:
  • Chi-Yuan Chan;Shan-Chyun Ku;Chi-Jen Lu;Biing-Feng Wang

  • Affiliations:
  • Department of Computer Science, National Tsing Hua University, Hsinchu, 30043, Taiwan, ROC;Department of Computer Science, National Tsing Hua University, Hsinchu, 30043, Taiwan, ROC;Institute of Information Science, Academia Sinica, Taipei, Taiwan, ROC;Department of Computer Science, National Tsing Hua University, Hsinchu, 30043, Taiwan, ROC

  • Venue:
  • Theoretical Computer Science
  • Year:
  • 2009

Quantified Score

Hi-index 5.23

Visualization

Abstract

The p-median problem on a tree T is to find a setS of p vertices on that minimizes the sum ofdistances from T's vertices to S. In this paper, westudy two generalizations of the 2-median problem, which areobtained by imposing constraints on the two vertices selected as a2-median: one is to limit their distance while the other is tolimit their eccentricity. Previously, both the best upper bounds ofthese two generalizations were O(n2) [A.Tamir, D. Perez-Brito, J.A. Moreno-Perez, A polynomial algorithmfor the p-centdian problem on a tree, Networks 32 (1998)255-262; B.-F. Wang, S.-C. Ku, K.-H. Shi, Cost-optimal parallelalgorithms for the tree bisector problem and applications, IEEETransactions on Parallel and Distributed Systems 12 (9) (2001)888-898]. In this paper, we solve both inO(nlogn) time. We also study cases when lineartime algorithms exist for the two generalizations. For example, wesolve both in linear time when edge lengths and vertex weights areall polynomially bounded integers. Furthermore, we consider therelaxation of the two generalized problems by allowing 2-medians onany position of edges, instead of just on vertices, and we giveO(nlogn)-time algorithms for them. A problem,named the tree marker problem, arises several times in ourapproaches to the two generalized 2-median problems, and we give anO(nlogn)-time algorithm for this problem. Wealso use this algorithm to speedup an algorithm of Gupta and Punnen[S.K. Gupta, A.P. Punnen, Group center and group median of a tree,European Journal of Operational Research 65 (1993) 400-406] for thegroup median problem, improving the running time fromO(kn) to O(n+klogn),where k is the number of groups in the input.