Skip to main content

On parallel hashing and integer sorting

  • Conference paper
  • First Online:
Automata, Languages and Programming (ICALP 1990)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 443))

Included in the following conference series:

Abstract

The problem of sorting n integers from a restricted range [1..m], where m is superpolynomial in n, is considered. An o(n log n) time randomized algorithm is given. Our algorithm takes O(n log log m) expected time and O(n) space. (Thus, for m=n polylog(n) we have an O(n log log n) time algorithm.) The algorithm is parallelizable. The resulting parallel algorithm achieves optimal speed up. Some features of the algorithm make us believe that it is relevant for practical applications.

A result of independent interest is a parallel hashing technique. The expected construction time is logarithmic using an optimal number of processors, and searching for a value takes O(1) time in the worst case. This technique enables drastic reduction of space requirements for the price of using randomness. Applicability of the technique is demonstrated for the parallel sorting algorithm, and for some parallel string matching algorithms.

The parallel sorting algorithm is designed for a strong and non standard model of parallel computation. Efficient simulations of the strong model on a CRCW PRAM are introduced. One of the simulations even achieves optimal speed up. This is probably a first optimal speed up simulation of a certain kind.

Extended summary

Partially supported by NSF grant CCR-890649 and ONR grant N00014-85-0046.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. A. V. Aho, J. E. Hopcroft, and J. D. Ullman, The design and analysis of computer algorithms. Addison-Wesley Publishing Company, 1974.

    Google Scholar 

  2. [AIL+88] A. Apostolico, C. Iliopoulos, G.M. Landau, B. Schieber, and U. Vishkin, Parallel construction of a suffix tree. Algorithmica, 3:347–365, 1988.

    Google Scholar 

  3. M. Ajtai, J. Komlós, and E. Szemerédi, An O(n log n) sorting network. In Proc. of the 15th Ann. ACM Symp. on Theory of Computing, pages 1–9, 1983.

    Google Scholar 

  4. R.J. Anderson and G.L. Miller, Optimal parallel algorithms for list ranking. In AWOC '88, Springer LNCS 319, pages 81–90, 1988.

    Google Scholar 

  5. A. Apostolico, The myriad virtues of subword trees. in “Combinatorial Algorithms on Words” (A. Apostolico and Z. Galil, Eds.), NATO ASI Series F, Vol. 12, pages 85–96, 1984.

    Google Scholar 

  6. [BDH+89] P.C.P. Bhatt, K. Diks, T. Hagerup, V.C. Prasad, T. Radzik, and S. Saxena, Improved deterministic parallel integer sorting. Technical Report TR 15/1989, Fachbereich Informatik, Universität des Saarlandes, D-6600 Saarbrücken, W. Germany, November 1989.

    Google Scholar 

  7. R.P. Brent, The parallel evaluation of general arithmetic expressions. J. Assoc. Comput. Mach., 21:302–206, 1974.

    Google Scholar 

  8. B.S. Chlebus, K. Diks, T. Hagerup, and T. Radzik, Efficient simulations between concurrent-read concurrent-write PRAM models. In Math. Found. of Comp. Sc. '88, 1988.

    Google Scholar 

  9. R. Cole, Parallel merge sort. In FOCS '86, pages 511–516, 1986.

    Google Scholar 

  10. R. Cole and U. Vishkin, Approximate and exact parallel scheduling with applications to list, tree and graph problems. In FOCS '86, pages 478–491, 1986.

    Google Scholar 

  11. R. Cole and U. Vishkin, Approximate parallel scheduling. Part I: the basic technique with applications to optimal parallel list ranking in logarithmic time. SIAM J. Comput., 17:128–142, 1988.

    Google Scholar 

  12. R. Cole and U. Vishkin, Faster optimal parallel prefix sums and list ranking. Info. and Comp., 81:334–352, 1989.

    Google Scholar 

  13. M. Dietzfelbinger and F. Meyer auf der Heide, An optimal parallel dictionary. In SPAA '89, pages 360–368, 1989.

    Google Scholar 

  14. D. Eppstein and Z. Galil, Parallel algorithmic techniques for combinatorial computation. Ann. Rev. Comput. Sci., 3:233–283, 1988.

    Google Scholar 

  15. M. L. Fredman, J. Komlós, and E. Szemerédi, Storing a sparse table with O(1) worst case access time. J. of the Association for Computing Machinery, 31:538–544, 1984.

    Google Scholar 

  16. Z. Galil, Optimal parallel algorithms for string matching. In STOC '84, pages 240–248, 1984.

    Google Scholar 

  17. Z. Galil and R. Giancarlo, Data structures and algorithms for approximate string matching. J. of Complexity, 4:33–72, 1988.

    Google Scholar 

  18. T. Hagerup, Towards optimal parallel bucket sorting. Info. and Comp., 75:39–51, 1987.

    Google Scholar 

  19. T. Hagerup, On saving space in parallel computation. Info. Proc. Let., 29:327–329, 1988.

    Google Scholar 

  20. J. Illingworth and J. Kittler, A survey of the Hough transform. Computer Vision, Graphics, and Image Processing, 44:87–116, 1988.

    Google Scholar 

  21. D.B. Johnson, A priority queue in which initialization and queue operations take O(log log D) time. Math. Systems Theory, 15:295–309, 1982.

    Google Scholar 

  22. D.E. Knuth, The art of computer programming, volume 3, Sorting and searching. Addison-Wesley, Reading, 1973.

    Google Scholar 

  23. D. Kirkpatrick and S. Reisch, Upper bounds for sorting integers on random access machines. Theo. Comp. Sc., 28:263–276, 1984.

    Google Scholar 

  24. R.M. Karp and V. Ramachandran, A survey of parallel algorithms for shared-memory machines. Technical Report UCB/CSD 88/408, (EECS) U. C. Berkeley, 1988.

    Google Scholar 

  25. C.P. Kruskal, L. Rudolph, and M. Snir, A complexity theory of efficient parallel algorithms. In ICALP '88, Springer LNCS 317, pages 333–346, 1988.

    Google Scholar 

  26. A. Karlin and E. Upfal, Parallel hashing — an efficient implementation of shared memory. In STOC '86, pages 160–168, 1986.

    Google Scholar 

  27. Y. Lamdan and H.J. Wolfson, Geometric hashing: a general and efficient model-based recognition scheme. In Proc. 2nd Intl' Conf. on Comp. Vision, FL, pages 238–249, 1988.

    Google Scholar 

  28. K. Mehlhorn and U. Vishkin, Randomized and deterministic simulations of PRAMs by parallel machines with restricted granularity of parallel memories. Acta Informatica, 21:339–374, 1984.

    Google Scholar 

  29. Y. Matias and U. Vishkin, On parallel hashing and integer sorting. Technical Report TR-158/89, Eskenasy Inst. of Computer Sciences, Tel-Aviv Univ., Dec. 1989. Also in UMIACS-TR-90-13, Inst. for Advanced Computer Studies, Univ. of Maryland, Jan. 1990.

    Google Scholar 

  30. W.J. Paul and J. Simon, Decision trees and random access machines. In Symp. uber Logic und Algorithmik, 1980.

    Google Scholar 

  31. A.G. Ranade, How to emulate shared memory. In FOCS '87, pages 185–194, 1987.

    Google Scholar 

  32. S. Rajasekaran and J.H. Reif, Optimal and sublogarithmic time randomized parallel sorting algorithms. SIAM J. Comput., 18:594–607, 1989.

    Google Scholar 

  33. Y. Shiloach and U. Vishkin, Finding the maximum, merging, and sorting in a parallel computation model. J. Algorithms, 2:88–102, 1981.

    Google Scholar 

  34. U. Vishkin, Synchronous parallel computation — a survey. Technical Report TR 71, Dept. of Computer Science, Courant Institute, New York University, 1983.

    Google Scholar 

  35. P. van Emde Boas, R. Kaas, and E. Zijlstra, Design and implementation of an efficient priority queue. Math. Systems Theory, 10:99–127, 1977.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Michael S. Paterson

Rights and permissions

Reprints and permissions

Copyright information

© 1990 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Matias, Y., Vishkin, U. (1990). On parallel hashing and integer sorting. In: Paterson, M.S. (eds) Automata, Languages and Programming. ICALP 1990. Lecture Notes in Computer Science, vol 443. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0032070

Download citation

  • DOI: https://doi.org/10.1007/BFb0032070

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-52826-5

  • Online ISBN: 978-3-540-47159-2

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics