Sorting in One and Two Rounds Using t-Comparators

Authors Ran Gelles , Zvi Lotker , Frederik Mallmann-Trenn



PDF
Thumbnail PDF

File

LIPIcs.DISC.2024.27.pdf
  • Filesize: 0.9 MB
  • 20 pages

Document Identifiers

Author Details

Ran Gelles
  • Bar-Ilan University, Ramat Gan, Israel
Zvi Lotker
  • Bar-Ilan University, Ramat Gan, Israel
Frederik Mallmann-Trenn
  • King’s College London, UK

Acknowledgements

R. Gelles would like to thank Paderborn University and CISPA - Helmholtz Center for Information Security for hosting him while part of this research was done. The authors would also like to thank the anonymous reviewers for multiple helpful comments.

Cite AsGet BibTex

Ran Gelles, Zvi Lotker, and Frederik Mallmann-Trenn. Sorting in One and Two Rounds Using t-Comparators. In 38th International Symposium on Distributed Computing (DISC 2024). Leibniz International Proceedings in Informatics (LIPIcs), Volume 319, pp. 27:1-27:20, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2024)
https://doi.org/10.4230/LIPIcs.DISC.2024.27

Abstract

We examine sorting algorithms for n elements whose basic operation is comparing t elements simultaneously (a t-comparator). We focus on algorithms that use only a single round or two rounds - comparisons performed in the second round depend on the outcomes of the first round comparators. Algorithms with a small number of rounds are well-suited to distributed settings in which communication rounds are costly. We design deterministic and randomized algorithms. In the deterministic case, we show an interesting relation to design theory (namely, to 2-Steiner systems), which yields a single-round optimal algorithm for n = t^{2^k} with any k ≥ 1 and a variety of possible values of t. For some values of t, however, no algorithm can reach the optimal (information-theoretic) bound on the number of comparators. For this case (and any other n and t), we show an algorithm that uses at most three times as many comparators as the theoretical bound. We also design a randomized Las-Vegas two-round sorting algorithm for any n and t. Our algorithm uses an asymptotically optimal number of O(max(n^{3/2}/t²,n/t)) comparators, with high probability, i.e., with probability at least 1-1/n. The analysis of this algorithm involves the gradual unveiling of randomness, using a novel technique which we coin the binary tree of deferred randomness.

Subject Classification

ACM Subject Classification
  • Theory of computation → Sorting and searching
  • Mathematics of computing → Probabilistic algorithms
  • Theory of computation → Distributed algorithms
Keywords
  • Sorting
  • Steiner-System
  • Round Complexity
  • Deferred Randomness

Metrics

  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    0
    PDF Downloads

References

  1. M. Ajtai, J. Komlós, and E. Szemerédi. An O(n log n) sorting network. In Proceedings of the Fifteenth Annual ACM Symposium on Theory of Computing, STOC '83, pages 1-9, 1983. URL: https://doi.org/10.1145/800061.808726.
  2. Selim G Akl. Parallel sorting algorithms, volume 12. Academic press, 1985. Google Scholar
  3. N. Alon and Y. Azar. The average complexity of deterministic and randomized parallel comparison sorting algorithms. In 28th Annual Symposium on Foundations of Computer Science (SFCS 1987), pages 489-498, 1987. URL: https://doi.org/10.1109/SFCS.1987.54.
  4. Noga Alon and Yossi Azar. Sorting, approximate sorting, and searching in rounds. SIAM Journal on Discrete Mathematics, 1(3):269-280, 1988. URL: https://doi.org/10.1137/0401028.
  5. Noga Alon, Yossi Azar, and Uzi Vishkin. Tight complexity bounds for parallel comparison sorting. In 27th Annual Symposium on Foundations of Computer Science (SFCS 1986), pages 502-510, 1986. URL: https://doi.org/10.1109/SFCS.1986.57.
  6. Mikhail J. Atallah, Greg N. Frederickson, and S.Rao Kosaraju. Sorting with efficient use of special-purpose sorters. Information Processing Letters, 27(1):13-15, 1988. URL: https://doi.org/10.1016/0020-0190(88)90075-0.
  7. K. E. Batcher. Sorting networks and their applications. In Proceedings of the April 30-May 2, 1968, Spring Joint Computer Conference, AFIPS '68 (Spring), pages 307-314, 1968. URL: https://doi.org/10.1145/1468075.1468121.
  8. Richard Beigel and John Gill. Sorting n objects with a k-sorter. IEEE Transactions on Computers, 39(5):714-716, 1990. URL: https://doi.org/10.1109/12.53587.
  9. Mark Braverman, Jieming Mao, and Yuval Peres. Sorted top-k in rounds. In Proceedings of the Thirty-Second Conference on Learning Theory, volume 99 of PMLR, pages 342-382, 2019. URL: https://proceedings.mlr.press/v99/braverman19a.html.
  10. Mark Braverman, Jieming Mao, and S. Matthew Weinberg. Parallel algorithms for select and partition with noisy comparisons. In Proceedings of the Forty-Eighth Annual ACM Symposium on Theory of Computing, STOC '16, pages 851-862, 2016. URL: https://doi.org/10.1145/2897518.2897642.
  11. Richard H. Bruck and Herbert J. Ryser. The nonexistence of certain finite projective planes. Canadian Journal of Mathematics, 1(1):88-93, 1949. URL: https://doi.org/10.4153/CJM-1949-009-2.
  12. YB Chiang. Sorting networks using k-comparators. PhD thesis, University of Cape Town, 2001. URL: http://hdl.handle.net/11427/4871.
  13. Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein. Introduction to algorithms. MIT press, 4th edition, 2022. Google Scholar
  14. Robert Cypher and Jorge L.C. Sanz. Cubesort: A parallel algorithm for sorting n data items with s-sorters. Journal of Algorithms, 13(2):211-234, 1992. URL: https://doi.org/10.1016/0196-6774(92)90016-6.
  15. Natalia Dobrokhotova-Maikova, Alexander Kozachinskiy, and Vladimir Podolskii. Constant-Depth Sorting Networks. In 14th Innovations in Theoretical Computer Science Conference (ITCS 2023), volume 251 of LIPIcs, pages 43:1-43:19, 2023. URL: https://doi.org/10.4230/LIPIcs.ITCS.2023.43.
  16. Vladmir Estivill-Castro and Derick Wood. A survey of adaptive sorting algorithms. ACM Comput. Surv., 24(4):441-476, December 1992. URL: https://doi.org/10.1145/146370.146381.
  17. Leonhard Euler. Recherches sur un nouvelle espéce de quarrés magiques. Verhandelingen uitgegeven door het zeeuwsch Genootschap der Wetenschappen te Vlissingen, pages 85-239, 1782. Google Scholar
  18. Ran Gelles, Zvi Lotker, and Frederik Mallmann-Trenn. Sorting in one and two rounds using t-comparators. CoRR, abs/2405.12678, 2024. https://arxiv.org/abs/2405.12678, URL: https://doi.org/10.48550/arXiv.2405.12678.
  19. Mike Grannell and Terry Griggs. An introduction to steiner systems. Mathematical Spectrum, 26(3):74-80, 1994. Google Scholar
  20. Roland Häggkvist and Pavol Hell. Parallel sorting with constant time for comparisons. SIAM Journal on Computing, 10(3):465-472, 1981. URL: https://doi.org/10.1137/0210034.
  21. C. A. R. Hoare. Quicksort. The Computer Journal, 5(1):10-16, January 1962. URL: https://doi.org/10.1093/comjnl/5.1.10.
  22. D. R. Hughes and F. Piper. Design Theory. Cambridge University Press, 1985. Google Scholar
  23. Christos Kaklamanis and Danny Krizanc. Optimal sorting on mesh-connected processor arrays. In Proceedings of the Fourth Annual ACM Symposium on Parallel Algorithms and Architectures, SPAA '92, pages 50-59, 1992. URL: https://doi.org/10.1145/140901.140907.
  24. Donald E. Knuth. Art of computer programming, volume 3: Sorting and Searching. Addison-Wesley Professional, 2nd edition, April 1998. Google Scholar
  25. Tom Leighton. Tight bounds on the complexity of parallel sorting. IEEE Transactions on Computers, C-34(4):344-354, 1985. URL: https://doi.org/10.1109/TC.1985.5009385.
  26. Christoph Lenzen and Roger Wattenhofer. Tight bounds for parallel randomized load balancing: extended abstract. In Proceedings of the Forty-Third Annual ACM Symposium on Theory of Computing, STOC '11, pages 11-20, 2011. URL: https://doi.org/10.1145/1993636.1993639.
  27. W. A. Martin. Sorting. ACM Comput. Surv., 3(4):147-174, December 1971. URL: https://doi.org/10.1145/356593.356594.
  28. Heinrich Müller. Sorting numbers using limited systolic coprocessors. Information Processing Letters, 24(6):351-354, 1987. URL: https://doi.org/10.1016/0020-0190(87)90109-8.
  29. S. Olarin and S.Q. Zheng. Sorting n items using a p-sorter in optimal time. In Proceedings of SPDP '96: 8th IEEE Symposium on Parallel and Distributed Processing, pages 264-272, 1996. URL: https://doi.org/10.1109/SPDP.1996.570343.
  30. Bruce Parker and Ian Parberry. Constructing sorting networks from k-sorters. Information Processing Letters, 33(3):157-162, 1989. URL: https://doi.org/10.1016/0020-0190(89)90196-8.
  31. Abraham Pascoe. Affine and projective planes. Master’s thesis, Missouri State University, 2018. MSU Graduate Theses. 3233. URL: https://bearworks.missouristate.edu/theses/3233.
  32. Boaz Patt-Shamir and Marat Teplitsky. The round complexity of distributed sorting: extended abstract. In Proceedings of the 30th Annual ACM SIGACT-SIGOPS Symposium on Principles of Distributed Computing, PODC '11, pages 249-256, 2011. URL: https://doi.org/10.1145/1993806.1993851.
  33. Colin Reid and Alex Rosa. Steiner systems s (2, 4, v)-a survey. The Electronic Journal of Combinatorics, pages DS18-Feb, 2012. Google Scholar
  34. Doron Rotem, Nicola Santoro, and Jeffrey B. Sidney. Distributed sorting. IEEE Transactions on Computers, C-34(4):372-376, 1985. URL: https://doi.org/10.1109/TC.1985.5009389.
  35. Isaac D. Scherson, Sandeep Sen, and Adi Shamir. Shear sort: a true two-dimensional sorting technique for VLSI networks. In International Conference on Parallel Processing, pages 903-908, 1986. Google Scholar
  36. Claus-Peter Schnorr and Adi Shamir. An optimal sorting algorithm for mesh connected computers. In Proceedings of the eighteenth annual ACM symposium on Theory of computing, pages 255-263, 1986. URL: https://doi.org/10.1145/12130.12156.
  37. Feng Shi, Zhiyuan Yan, and Meghanad Wagh. An enhanced multiway sorting network based on n-sorters. In 2014 IEEE Global Conference on Signal and Information Processing (GlobalSIP), pages 60-64, 2014. URL: https://doi.org/10.1109/GlobalSIP.2014.7032078.
  38. Dhirendra Pratap Singh, Ishan Joshi, and Jaytrilok Choudhary. Survey of gpu based sorting algorithms. International Journal of Parallel Programming, 46:1017-1034, 2018. URL: https://doi.org/10.1007/S10766-017-0502-5.
  39. G. Tarry. Le problème de 36 officiers. Compte Rendu de l'Association Française pour l'Avancement de Science Naturel, 1900. vol. 1 (1900), 122-123; vol. 2 (1901), 170-203. Google Scholar
  40. C. D. Thompson and H. T. Kung. Sorting on a mesh-connected parallel computer. Commun. ACM, 20(4):263-271, April 1977. URL: https://doi.org/10.1145/359461.359481.
  41. Lutz M. Wegner. Sorting a distributed file in a network. Computer Networks (1976), 8(5):451-461, 1984. URL: https://doi.org/10.1016/0376-5075(84)90007-2.
  42. Richard M. Wilson. An existence theory for pairwise balanced designs, III: Proof of the existence conjectures. Journal of Combinatorial Theory, Series A, 18(1):71-79, 1975. URL: https://doi.org/10.1016/0097-3165(75)90067-9.
Questions / Remarks / Feedback
X

Feedback for Dagstuhl Publishing


Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail