# Parallel algorithms for partitioning sorted sets and related problems

## Abstract

We consider the following partition problem: Given a set *S* of *n* elements that is organized as *k* sorted subsets of size *n/k* each and given a parameter *h* with 1/*k*≤*h*≤*n/k*, partition *S* into *g*=*O(n/(hk))* subsets *D*_{1}*D*_{2},..., *D*_{ g } of size Θ(*hk*) each, such that for any two indices *i* and *j* with 1≤*i*≤*j*≤*g*, no element in *D*_{1i} is bigger than any element in *D*_{ j }. Note that with various combinations of the values of parameters *h* and *k*, several fundamental problems, such as merging, sorting,and finding an approximate median, can be formulated as or be reduced to this partition problem. The partition problem also finds applications in solving problems of parallel computing and computational geometry. In this paper, we present efficient parallel algorithms for solving the partition problem and its applications. Our parallel partition algorithm runs in *O*(log *n*) time using *O*(min{(*n/h*)*max{log *h* 1},n*max{log(1/*h*),1}}/log *n*) processors in the EREW PRAM model.The complexity bounds of our parallel partition algorithm on the respective special cases match those of the optimal EREW PRAM algorithms for merging, sorting, and finding an approximate median. Using our parallel partition algorithm, we are also able to obtain better complexity bounds (even possibly on a weaker parallel model) than the previously best known parallel algorithms for several important problems, including parallel multi-selection, parallel multi-ranking, and parallel sorting of *k* sorted subsets.

## Keywords

Parallel Algorithm Complexity Bound Partition Problem Consecutive Block Consecutive Element## Preview

Unable to display preview. Download preview PDF.

## References

- [1]M. Ajtai, J. Komlos, and E. Szemeredi. “Sorting in
*c*log*n*parallel steps”,*Combinatorica*,**3**(1983), pp. 1–19.Google Scholar - [2]M.J. Atallah, R. Cole, and M.T. Goodrich. “Cascading divide-and-conquer: A technique for designing parallel algorithms”,
*S1AM J. Computing*, 18 (3) (1989), pp. 499–532.Google Scholar - [3]G. Bilardi and A. Nicolau. “Adaptive bitonic sorting: An optimal parallel algorithm for shared-memory machines”,
*SIAM J. Computing*, 18 (1989), pp. 216–228.Google Scholar - [4]M. Blum, R.W. Floyd, V.R. Pratt, R.L. Rivest, and R.E. Tarjan. “Time bounds for selection”,
*J. of Computer and System Sciences*, 7 (4) (1972), pp. 448–461.Google Scholar - [5]R.P. Brent. “The parallel evaluation of general arithmetic expressions”,
*J. of the ACM*, 21 (1974), pp. 201–206.CrossRefGoogle Scholar - [6]D.Z. Chen. “Efficient parallel binary search on sorted arrays, with applications”,
*IEEE Trans. on Parallel and Distributed Systems*, 6 (4) (1995), pp. 440–445.Google Scholar - [7]W. Chen, K. Wada, and K. Kawaguchi. “A parallel method for finding the convex hull of discs”,
*IEEE 1st International Conf. on Algorithms and Architectures for Parallel Processing*, 1995, pp. 274–281.Google Scholar - [8]R. Cole. “An optimally efficient selection algorithm”,
*Information Processing Letters*, 26 (1987/1988), pp. 295–299.Google Scholar - [9]R. Cole. “Parallel merge sort”,
*SIAM J. Computing*, 17 (1988), pp. 770–785.CrossRefGoogle Scholar - [10]R. Cole and U. Vishkin. “Deterministic coin tossing and accelerating cascades: Micro and macro techniques for designing parallel algorithms”,
*Proc. 18th Annual ACM Symp. Theory of Computing*, 1986, pp. 206–219.Google Scholar - [11]G.N. Frederickson and D.B. Johnson. “The complexity of selection and ranking in
*X + Y*and matrices with sorted columns”,*J. of Computer and System Sciences*, 24 (2) (1982), pp. 197–208.Google Scholar - [12]T. Hagerup and C. Rub. “Optimal merging and sorting on the EREW PRAM”,
*Information Processing Letters*, 33 (1989), pp. 181–185.Google Scholar - [13]J. JáJá.
*An Introduction to Parallel Algorithms*. Addison-Wesley, Reading, Massachusetts, 1992.Google Scholar - [14]D.B. Johnson and T. Mizoguchi. “Selecting the
*K*th element in*X*+*Y*and*X*_{1}+*X*_{2}+...+*X*_{m},*SIAM J. Computing*, 7 (1978), pp. 147–153.Google Scholar - [15]R.M. Karp and V. Ramachandran. “Parallel algorithms for shared-memory machines”,
*Handbook of Theoretical Computer Science*, J. van Leeuwen (eds.), Vol. 1, Elsevier Science Publishers, 1990.Google Scholar - [16]D.E. Knuth.
*The Art of Computer Programming*. Vol. 1,*Fundamental Algorithms*, Second Edition, Addison-Wesley, Reading, Massachusetts, 1973.Google Scholar - [17]C.P. Kruskal. “Searching, merging and sorting in parallel computation”,
*IEEE Trans. on Computers*, C-32 (10) (1983), pp. 942–946.Google Scholar - [18]C.P. Kruskal, L. Rudolph, and M. Snir. “The power of parallel prefix”,
*IEEE Trans. on Computers*, C-34 (10) (1985), pp. 965–968.Google Scholar - [19]R.E. Ladner and M.J. Fischer. “Parallel prefix computation”.
*J. of the ACM*, 27 (1980), pp. 831–838.Google Scholar - [20]T.H. Merrett.
*Relational Information Systems*, AFIPS Press, Reston, Virginia, 1984.Google Scholar - [21]K. Nakano and S. Olariu. Private communication (1996).Google Scholar
- [22]S. Olariu and J.L. Schwing. “A novel deterministic sampling scheme with applications to broadcast efficient sorting on reconfigurable meshes”,
*Journal of Parallel and Distributed Computing*, to appear.Google Scholar - [23]S. Olariu and Z. Wen. “An efficient parallel algorithm for multiselection”,
*Parallel Computing*, 17 (1991), pp. 689–693.Google Scholar - [24]J.H. Reif. “An optimal parallel algorithm of integer sorting”.
*Proc. 26th IEEE Annual Symp. Foundations of Computer Science*, 1985, pp. 496–504.Google Scholar - [25]G. Salton.
*Automatic Text Processing: The Transformation. Analysis, and Retrieval of Information by Computer*, Addison-Wesley, Reading, Massachusetts, 1988.Google Scholar - [26]Z. Wen. “Multi-way merging in parallel”. to appear in
*IEEE Trans. on Parallel and Distributed Systems*.Google Scholar