Sloping-and-shaking

Most traditional merging and merging-based sorting algorithms are based on 2 sorters or 2 comparators. A new merging technique is developed, namely sloping-and-shaking multiway merging, and a corresponding multiway sorting method based only onk-sorters is proposed. The sloping-and-shaking merging algorithm mergesk sorted lists into one, wherek can be any prime number. The merging process is not a series of recursive applications of 2-way merging. It sorts the keys on them×k plane in vertical and horizontal directions, then along sloping lines with various slope rates step by step. Onlyk-sorters are needed in the merging or sorting process. The time needed to mergek sorted lists, withm of each, is (k+┌log2(m/k)┐)tk, and the time for sortingN keys is (1+(p−1)k+1/2(p−1)(p−2)┌log2k┐)tk, wherep=logkN, andtk is the time to sortk keys. The proposed algorithms can be implemented either by hardwared sorting networks, or on general purpose parallel and vector machines. The traditional odd-even merging can be viewed as a special case of the multiway merging proposed (whenk is 2). While theoretically the proposed algorithms provide a new understanding of parallel merging and sorting processes, they may be used in practice to construct sorting circuits faster than 2-sorter based sorting methods.

[1]  Robert Michael Owens,et al.  VLSI Sorting with Reduced Hardware , 1984, IEEE Transactions on Computers.

[2]  Kevin Wilkinson,et al.  Sorting Large Files on a Backend Multiprocessor , 1988, IEEE Trans. Computers.

[3]  Peter J. Varman,et al.  Percentile Finding Algorithm for Multiple Sorted Runs , 1989, VLDB.

[4]  Frank Thomson Leighton,et al.  Tight Bounds on the Complexity of Parallel Sorting , 1985, IEEE Trans. Computers.

[5]  Kenneth E. Batcher On Bitonic Sorting Networks , 1990, ICPP.

[6]  Shing-Tsaan Huang,et al.  K-Way Bitonic Sort , 1989, IEEE Trans. Computers.

[7]  Viktor K. Prasanna,et al.  Optimal VLSI Sorting with Reduced Number of Processors , 1991, IEEE Trans. Computers.

[8]  Harold S. Stone,et al.  Parallel Processing with the Perfect Shuffle , 1971, IEEE Transactions on Computers.

[9]  Donald E. Knuth,et al.  The Art of Computer Programming: Volume 3: Sorting and Searching , 1998 .

[10]  Kenneth E. Batcher,et al.  A Multiway Merge Sorting Network , 1995, IEEE Trans. Parallel Distributed Syst..

[11]  Kenneth E. Batcher,et al.  A Generalized Bitonic Sorting Network , 1993, 1993 International Conference on Parallel Processing - ICPP'93.

[12]  Ian Parberry,et al.  Constructing Sorting Networks from k-Sorters , 1989, Inf. Process. Lett..

[13]  H. T. Kung,et al.  Sorting on a mesh-connected parallel computer , 1977, CACM.

[14]  Nicola Santoro,et al.  Distributed Sorting , 1985, IEEE Transactions on Computers.

[15]  Kenneth E. Batcher,et al.  Sorting networks and their applications , 1968, AFIPS Spring Joint Computing Conference.

[16]  Kenneth E. Batcher,et al.  A modulo merge sorting network , 1992, [Proceedings 1992] The Fourth Symposium on the Frontiers of Massively Parallel Computation.

[17]  Peter J. Varman,et al.  A Multiprocessor Algorithm for Merging Multiple Sorted Lists , 1990, ICPP.

[18]  Michael A. Langston,et al.  Time-Space Optimal Parallel Merging and Sorting , 1991, IEEE Trans. Computers.