# A new characterization of tree medians with applications to distributed algorithms

## Abstract

A new characterization of tree medians is presented: we show that a vertex *m* is a median of a tree *T* with *n* vertices iff there exists a partition of the vertex set into ⌊n/2⌋ disjoint pairs (excluding *m* when *n* is odd), such that all the paths connecting the two vertices in any of the pairs pass through m. We show that in this case the sum of the distances between these pairs of vertices is the largest possible among all such partitions, and we use this fact to discuss lower bounds on the message complexity of the distributed sorting problem. We show that, given a network of a tree topology, choosing a median and then routing all the information through it is the best possible strategy, in terms of worst-case number of messages sent during any execution of any distributed sorting algorithm. We also discuss the implications for networks of a general topology and for the distributed ranking problem.

## Keywords

Span Tree Tree Topology Ranking Problem Ranking Algorithm Tree Network## Preview

Unable to display preview. Download preview PDF.

## References

- 1.J.A. Bondy and U.S.R. Murty,
*Graph Theory with Applications, North-Holland*, 1976.Google Scholar - 2.R.G. Gallager, P.A. Humblet and P.M. Spira,
*A distributed algorithm for minimum spanning tree*,*ACM Trans. on Programming Languages and Systems*, 5, 1, 1983, pp. 66–77.Google Scholar - 3.O. Gerstel, Y. Mansour and S. Zaks,
*Bit complexity of order statistics on a distributed star network*,*Information Processing Letters*, 30, 1989, pp. 127–132.Google Scholar - 4.S.L. Hakimi,
*Optimum locations of switching centers and the absolute centers and medians of a graph*,*Operations Res.*, 12, 1964, pp. 450–459.Google Scholar - 5.C. Jordan,
*Sur les assembblages des lignes, J. Reine Angew. Math.*, 70, 1869.Google Scholar - 6.O. Kariv and S.L. Hakimi,
*An algorithmic approach to network location problems. I: the p-centers, SIAM J. Appl. Math.*, Vol. 37, No. 3, December 1979, pp. 513–538.Google Scholar - 7.O. Kariv and S.L. Hakimi,
*An algorithmic approach to network location problems. II: the p-medians*,*SIAM J. Appl. Math.*, Vol. 37, No. 3, December 1979, pp. 539–560.Google Scholar - 8.E. Korach, D. Rotem and N. Santoro,
*Distributed algorithms for finding centers and medians in networks*,*ACM Trans. on Programming Languages and Systems*, Vol. 6, No. 3, July 1984, pp. 380–401.Google Scholar - 9.E. Korach, D. Rotem and N. Santoro,
*Distributed algorithms for ranking the vertices of a network, Proceedings of the 13th Southeastern Conference on Combinatorics, Graph Theory and Computing*, 1982, pp. 235–246.Google Scholar - 10.M.C. Loui,
*The complexity of sorting on distributed systems*,*Information and Control*, Vol. 60, 1–3, 1984, Vol. 60, 1–3, 1984, pp. 70–85.Google Scholar - 11.
- 12.P.J. Slater,
*Centers to centroids in graphs*,*J. of Graph Theory*, 2, 1978, pp. 209–222.Google Scholar - 13.O. Wolfson and A. Milo,
*The multicast policy and its relationship to replicated data placement*,*ACM Trans. on Database Systems*, Vol. 16, 1, 1991, pp. 181–2055.Google Scholar - 14.S. Zaks,
*Optimal distributed algorithms for sorting and ranking*,*IEEE Trans. on Computers*, c-34,4,April 1985, pp. 376–379.Google Scholar - 15.