This Article 
   
 Share 
   
 Bibliographic References 
   
 Add to: 
 
Digg
Furl
Spurl
Blink
Simpy
Google
Del.icio.us
Y!MyWeb
 
 Search 
   
Work-Time Optimal k-Merge Algorithms on the PRAM
March 1998 (vol. 9 no. 3)
pp. 275-282

Abstract—For 2 ≤kn, the k-merge problem is to merge a collection of k sorted sequences of total length n into a new sorted sequence. The k-merge problem is fundamental as it provides a common generalization of both merging and sorting. The main contribution of this work is to give simple and intuitive work-time optimal algorithms for the k-merge problem on three PRAM models, thus settling the status of the k-merge problem. We first prove that Ω(n log k) work is required to solve the k-merge problem on the PRAM models. We then show that the EREW-PRAM and both the CREW-PRAM and the CRCW require Ω(log n) time and Ω(log log n + log k) time, respectively, provided that the amount of work is bounded by O(n log k). Our first k-merge algorithm runs in Θ(log n) time and performs Θ(n log k) work on the EREW-PRAM. Finally, we design a work-time optimal CREW-PRAM k-merge algorithm that runs in Θ(log log n + log k) time and performs Θ(n log k) work. This latter algorithm is also work-time optimal on the CRCW-PRAM model. Our algorithms completely settle the status of the k-merge problem on the three main PRAM models.

[1] A. Aho, J. Hopcroft, and J. Ullman, Data Structures and Algorithms.Reading, Mass: Addison-Wesley, 1983.
[2] S.G. Akl, Parallel Computation: Models and Methods. Upper Saddle River, N.J.: Prentice Hall, 1997.
[3] S.G. Akl and N. Santoro,"Optimal parallel merging and sorting without memory conflict," IEEE Trans. Computers, vol. 36, no. 11, pp. 1,367-1,369, 1987.
[4] Y. Azar and U. Vishkin, "Tight Comparison Bounds on the Complexity of Parallel Sorting," SIAM J. Computing, vol. 16, pp. 458-464, 1987.
[5] D. Bitton,D.J. Dewitt,D.K. Hsiao, and J. Menon,"A taxonomy of parallel sorting," ACM Computing Surveys, vol. 16, pp. 287-318, 1984.
[6] A. Borodin and J.E. Hopcroft,"Routing, merging and sorting on parallel models of comparison," J. Computer and System Science, vol. 30, pp. 130-145, 1985.
[7] R.P. Brent, "The Parallel Evaluation of General Arithmetic Expressions," J. ACM, vol. 21, pp. 201-206, 1974.
[8] D.Z. Chen, W. Chen, K. Wada, and K. Kawaguchi, "Parallel Algorithms for Partitioning Sorted Sets and Related Problems," Proc. Fourth European Symp. Algorithms, ESA '96 (LNCS 1136), pp. 234-235, 1996.
[9] R.J. Cole, “An Optimally Efficient Selection Algorithm,” Information Processing Letters 26, pp. 295-299, 1987/1988.
[10] R. Cole, "Parallel Merge Sort," SIAM J. Computing, vol. 17, pp. 770-785, 1988.
[11] R. Cole and U. Vishkin, "Approximate Parallel Scheduling. Part 1: The Basic Technique with Applications to Optimal Parallel List Ranking in Logarithmic Time," SIAM J. Computing, vol. 18, pp. 128-142, 1988.
[12] E. Dekel and I. Ozsvath,"Parallel external sorting," J. Parallel and Distributed Computing, vol. 6, pp. 623-635, 1989.
[13] J.Y. Fu and F.C. Lin, "Optimal Parallel External Merging Under Hardware Contstraints," Proc. Int'l Conf. Parallel Processing, vol. III, pp. 70-74,St. Charles, Ill., Aug. 1991.
[14] T. Hagerup and R. Raman, "Fast Deterministic Approximate and Exact Parallel Sorting," Proc. ACM Symp. Parallel Algorithms and Architectures, pp. 346-355, 1993.
[15] T. Hagerup and C. Rub,"Optimal merging and sorting on the EREW PRAM," Information Processing Letters, vol. 33, pp. 181-185, 1989.
[16] J. JáJá, An Introduction to Parallel Algorithms.Reading, Mass.: Addison-Wesley, 1991.
[17] R.M. Karp and V. Ramachandran, "Parallel Algorithms for Shared-Memory Machines," Handbook of Theoretical Computer Science, J. van Leeuwen, ed., vol. A, pp. 869-941.Amsterdam: NorthHolland, 1990.
[18] D.E. Knuth, The Art of Computer Programming, vol. 1,Addison Wesley, second ed. 1973.
[19] C. Kruskal, "Searching, Merging, and Sorting in Parallel Computation," IEEE Trans. Computers, vol. 32, pp. 942-946, 1983.
[20] R.E. Ladner and M.J. Fischer, "Parallel Prefix Computation," J. ACM, vol. 27, no. 4, pp. 831-838, Oct. 1980.
[21] F.T. Leighton,Introduction to Parallel Algorithms and Architectures: Arrays, Trees, Hypercubes.San Mateo, Calif.: Morgan Kaufmann, 1992.
[22] T.H. Merrett, Relational Information Systems.Reston, Va: Reston Publishing Co., 1983.
[23] S. Olariu, C.M. Overstreet, and Z. Wen, "Reconstructing Binary Trees in Doubly Logarithmic CREW Time," J. Parallel and Distributed Computing, vol. 27, pp. 100-105, 1995.
[24] S. Olariu and J. Schwing, "A New Deterministic Sampling Scheme with Applications to Broadcast-Efficient Sorting on the Reconfigurable Mesh," J. Parallel and Distributed Computing, vol. 32, pp. 215-222, 1996.
[25] S. Olariu and Z. Wen, "An Efficient Parallel Algorithm for Multiselection," Parallel Computing, vol. 17, pp. 689-693, 1991.
[26] M.J. Quinn, Parallel Computing: Theory and Practice.New York: McGraw-Hill, 1994.
[27] M. Snir, "On Parallel Searching," SIAM J. Computing, vol. 14, pp. 688-708, 1985.
[28] Y. Shiloach and U. Vishkin, "Finding the Maximum, Merging and Sorting in Parallel Computation," J. Algorithms, vol. 2, pp. 88-102, 1981.
[29] P. Valduriez and G. Gardarin,“Join and semijoin algorithms for a multiprocessor database machine,” ACM Trans. on Database Systems, vol. 9, no. 1, pp. 133-161, Mar. 1984.
[30] L. G. Valiant, "Parallelism in Comparison Problems," SIAM J. Computing, vol. 4, pp. 348-355, 1975.
[31] P.J. Varman,S.D. Scheufler,B.R. Iyer, and G.R. Ricard,"Merging multiple lists on hierarchical-memory multiprocessors," J. Parallel and Distributed Computing, vol. 12, pp. 171-177, 1991.
[32] Z. Wen, "Multi-Way Merging in Parallel," IEEE Trans. Parallel and Distributed Systems, vol. 7, no. 1, pp. 11-17, Jan. 1996.

Index Terms:
Merging, sorting, parallel algorithms, work-time optimal algorithms, information retrieval, databases, query processing.
Citation:
Tatsuya Hayashi, Koji Nakano, Stephan Olariu, "Work-Time Optimal k-Merge Algorithms on the PRAM," IEEE Transactions on Parallel and Distributed Systems, vol. 9, no. 3, pp. 275-282, March 1998, doi:10.1109/71.674319
Usage of this product signifies your acceptance of the Terms of Use.