This Article 
   
 Share 
   
 Bibliographic References 
   
 Add to: 
 
Digg
Furl
Spurl
Blink
Simpy
Google
Del.icio.us
Y!MyWeb
 
 Search 
   
Generalized Algorithm for Parallel Sorting on Product Networks
December 1997 (vol. 8 no. 12)
pp. 1211-1225

Abstract—We generalize the well-known odd-even merge sorting algorithm, originally due to Batcher [2], and show how this generalized algorithm can be applied to sorting on product networks.

If G is an arbitrary factor graph with N nodes, its r-dimensional product contains $N^r$ nodes. Our algorithm sorts $N^r$ keys stored in the r-dimensional product of G in $O(r^2F(N))$ time, where F(N) depends on G. We show that, for any factor graph G, F(N) is, at most, O(N), establishing an upper bound of $O(r^2\,N)$ for the time complexity of sorting $N^r$ keys on any product network.

For product networks with bounded r (e.g., for grids), this leads to the asymptotic complexity of O(N) to sort $N^r$ keys, which is optimal for several instances of product networks. There are factor graphs for which $F(N)=O({\rm log}^2\,N),$ which leads to the asymptotic running time of $O({\rm log}^2\,N)$ to sort $N^r$ keys. For networks with bounded N (e.g., in the hypercube N = 2, fixed), the asymptotic complexity becomes $O(r^2).$

We show how to apply the algorithm to several cases of well-known product networks, as well as others introduced recently. We compare the performance of our algorithm to well-known algorithms developed specifically for these networks, as well as others. The result of these comparisons led us to conjecture that the proposed algorithm is probably the best deterministic algorithm that can be found in terms of the low asymptotic complexity with a small constant.

[1] A. Aggarwal and M.-D.A. Huang, "Network Complexity of Sorting and Graph Problems and Simulating CRCW PRAMS by Interconnection Networks," Proc. Third Aegean Workshop Computing, AWOC '88: VLSI Algorithms and Architectures, J.H. Reif, ed., Lecture Notes in Computer Science, vol. 319, pp. 339-350,Corfu, Greece. Springer-Verlag, July 1988.
[2] K. Batcher, "Sorting Networks and their Applications," Proc. AFIPS Spring JointComputing Conf., vol. 32, pp. 307-314, 1968.
[3] K.E. Batcher, "On Bitonic Sorting Networks," Proc. 1990 Int'l Conf. Parallel Processing, vol. I, pp. 376-379, 1990.
[4] M. Baumslag and F. Annexstein, "A Unified Framework for Off-Line Permutation Routing in Parallel Networks," Math. Systems Theory, vol. 24, no. 4, pp. 233-251, 1991.
[5] G.E. Blelloch, C.E. Leiserson, B.M. Maggs, C.G. Plaxton, S. Smith, and M. Zagha, "A Comparison of Sorting Algorithms for the Connection Machine CM-2," Proc. Third Ann. ACM Symp. Parallel Algorithms and Architectures, pp. 3-16, July 1991.
[6] R. Cypher and C.G. Plaxton, "Deterministic Sorting in Nearly Logarithmic Time on the Hypercube and Related Computers," J. Computer and System Sciences, vol. 47, pp. 501-548, Dec. 1993.
[7] R.L.S. Drysdale III and F.H. Young, "Improved Divide/Sort/Merge Sorting Network," SIAM J. Computing, vol. 4, pp. 264-270, Sept. 1975.
[8] K. Efe and A. Fernández, "Mesh-Connected Trees: A Bridge Between Grids and Meshes of Trees," IEEE Trans. Parallel and Distributed Systems, vol. 7, no. 12, pp. 1,281-1,291, Dec. 1996.
[9] K. Efe and A. Fernández, "Products of Networks with Logarithmic Diameter and Fixed Degree," IEEE Trans. Parallel and Distributed Systems, vol. 6, pp. 963-975, Sept. 1995.
[10] A. Fernández and K. Efe, "Efficient VLSI Layouts for Homogeneous Product Networks," IEEE Trans. Computers, vol. 46, no. 10, pp. 1,070-1,082, Oct. 1997.
[11] A. Fernández, K. Efe, A.L. Broadwater, M.A. Lorenzo, and D. Calzada, "A Unified Approach to Algorithm Development for Product Networks," Math. Modelling and Scientific Computing, to appear, vol. 8, 1997.
[12] T. El-Ghazawi and A. Youssef, "A General Framework for Developing Adaptive Fault-Tolerant Routing Algorithms," IEEE Trans. Reliability, vol. 42, pp. 250-258, June 1993.
[13] A. Fernández, "Homogeneous Product Networks for Processor Interconnection," PhD thesis, Univ. of Southwestern Louisiana, Lafayette, Oct. 1994.
[14] M.W. Green, "Some Improvements in Non-Adaptative Sorting Algorithms," Proc. Sixth Princeton Conf. Information Sciences and Systems, pp. 387-391, 1972.
[15] D. Knuth, The Art of Computer Programming, vol. 3: Sorting and Searching. Addison-Wesley, 1973.
[16] M. Kunde,“Optimal sorting on multi-dimensionally mesh connected computers,”inProc. 4th Symp. Theoretical Aspects on Comput. Lecture Notes in Comput. Sci. 247, 1987, pp. 408–419.
[17] D.-L. Lee and K.E. Batcher, "A Multiway Merge Sorting Network," IEEE Trans. Parallel and Distributed Systems, vol. 6, no. 2, pp. 211-215, Feb. 1995.
[18] D.-L. Lee and K.E. Batcher, "On Sorting Multiple Bitonic Sequences," Proc. 1994 Int'l Conf. Parallel Processing, vol. I, pp. 121-125, Aug. 1994.
[19] F.T. Leighton,Introduction to Parallel Algorithms and Architectures: Arrays, Trees, Hypercubes.San Mateo, Calif.: Morgan Kaufmann, 1992.
[20] T. Leighton, "Tight Bounds on the Complexity of Parallel Sorting," IEEE Trans. Computers, vol. 34, no. 4, pp. 344-354, Apr. 1985.
[21] K.J. Liszka and K.E. Batcher, "A Modulo Merge Sorting Network," Proc. Fourth Symp. Frontiers of Massively Parallel Computation,McLean, Va., pp. 164-169, Oct. 1992.
[22] K.J. Liszka and K.E. Batcher, "A Generalized Bitonic Sorting Network," Proc. 1993 Int'l Conf. Parallel Processing, vol. I, pp. 105-108, 1993.
[23] D. Nassimi and S. Sahni, "Bitonic Sort on a Mesh-Connected Parallel Computer," IEEE Trans. Computers, vol. 27, no. 1, pp. 2-7, Jan. 1979.
[24] T. Nakatani, S.-T. Huang, B.W. Arden, and S.K. Tripathi, "K-Way Bitonic Sort," IEEE Trans. Computers, vol. 38, no. 2, pp. 283-288, Feb. 1989.
[25] D. Nath, S.N. Maheshwari, and P.C.P. Bhatt, "Efficient VLSI Networks for Parallel Processing Based on Orthogonal Trees," IEEE Trans. Computers, vol. 32, no. 6, pp. 569-581, June 1983.
[26] S.R. Öhring and S.K. Das, "The Folded Petersen Cube Network: New Competitors for the Hypercubes," IEEE Trans. Parallel and Distributed Systems, vol. 7, no. 2, pp. 151-168, Feb. 1996.
[27] B. Parker and I. Parberry, "Constructing Sorting Networks fromk-Sorters," Information Processing Letters, vol. 33, pp. 157-162, Nov. 1989.
[28] F.P. Preparata and J. Vuillemin, “The Cube-Connected Cycles: A Versatile Network for Parallel Computation,” Comm ACM, vol. 24, no. 5, pp. 300-309, 1981.
[29] A.L. Rosenberg,“Product-shuffle networks: Toward reconciling shuffles and butterflies,” Discrete Applied Mathematics, vol. 37/38, pp. 465-488, July 1992.
[30] C. Schnorr and A. Shamir,“An optimal sorting algorithm for mesh connected computers,”inProc. 18th ACM Symp. on Theory of Comput., 1986, pp. 263–271.
[31] H. Stone, "Parallel Processing with the Perfect Shuffle," IEEE Trans. Computers, vol. 20, no. 2, pp. 153-161, Feb. 1971.
[32] C. Thompson and H. Kung,“Sorting on a mesh connected parallel computer,”Commun. ACM, vol. 20, pp. 263–271, 1977.
[33] S.S. Tseng and R.C.T. Lee, "A Parallel Sorting Scheme whose Basic Operation Sorts n Elements," Int'l J. Computer and Information Sciences, vol. 14, no. 6, pp. 455-467, 1985.
[34] D.C. van Voorhis, "An Economical Construction for Sorting Networks," Proc. AFIPS Nat'l Computer Conf., vol. 43, pp. 921-927, 1974.

Index Terms:
Sorting, interconnection networks, product networks, algorithms, odd-even merge.
Citation:
Antonio Fernández, Kemal Efe, "Generalized Algorithm for Parallel Sorting on Product Networks," IEEE Transactions on Parallel and Distributed Systems, vol. 8, no. 12, pp. 1211-1225, Dec. 1997, doi:10.1109/71.640013
Usage of this product signifies your acceptance of the Terms of Use.