Skip to main content

Tables should be sorted (on random access machines)

  • Invited Presentation
  • Conference paper
  • First Online:

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

Abstract

We consider the problem of storing an n element subset S of a universe of size m, so that membership queries (is x ∈ S?) can be answered efficiently. The model of computation is a random access machine with the standard instruction set (direct and indirect adressing, conditional branching, addition, subtraction, and multiplication). We show that if s memory registers are used to store S, where nsm/n , then query time Ω(log n) is necessary in the worst case. That is, under these conditions, the solution consisting of storing S as a sorted table and doing binary search is optimal. The condition sm/n is essentially optimal; we show that if n+m/n o(1) registers may be used, query time o(log n) is possible.

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

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. A. Aho, J. Hopcroft, and J. Ullman, The Design and Analysis of Computer Algorithms, Addison-Wesley, Reading, MA, 1974.

    Google Scholar 

  2. A.M. Ben-Amram and Z. Galil, Lower bounds for data structure problems on RAMs. In Proc. 32th IEEE Symposium on Foundations of Computer Science, 1991, pages 622–631.

    Google Scholar 

  3. J.L. Bentley, Programming Pearls. Addison-Wesley, Reading, MA, 1986.

    Google Scholar 

  4. A. Brodnik and J. Ian Munro, Membership in constant time and minimum space. In Proc. 2nd European Symposium on Algorithms 1994, pages 72–81.

    Google Scholar 

  5. S.A. Cook and R.A. Reckhow, Time bounded random access machines. JCSS, vol. 7, 1973, pages 354–375.

    Google Scholar 

  6. A. Fiat and M. Naor, Implicit O(1) probe search. SIAM J. Computing vol. 22, 1993, pages 1–10.

    Article  Google Scholar 

  7. A. Fiat, M. Naor, J.P. Schmidt, and A. Seigel, Nonoblivious hashing. J. ACM vol. 39, 1992, pages 764–782.

    Article  Google Scholar 

  8. M.L. Fredman, J. Komlòs, and E. Szemerédi, Storing a sparse table with O(1) worst case access time. J. ACM, vol. 31, 1984, pages 538–544.

    Article  Google Scholar 

  9. M.L. Fredman and M.E. Saks, The cell probe complexity of dynamic data structures. In Proc. 21st Ann. ACM Symp. on Theory of Computing, 1989, pages 345–354.

    Google Scholar 

  10. D.E. Knuth, The Art of Computer Programming. Addison-Wesley, Reading, MA, 1973.

    Google Scholar 

  11. W. Maass, On the use of inaccessible numbers and order indiscernibles in lower bound arguments for random access machines. J. Symbolic Logic, vol. 53, 1988, pages 1098–1109.

    Google Scholar 

  12. P.B. Miltersen, N. Nisan, S. Safra, and A. Wigderson, On data structures and asymmetric communication complexity. In Proc. 27th ACM Symposium on Theory of Computing, 1995, to appear.

    Google Scholar 

  13. W. Paul and J. Simon, Decision trees and random access machines. In Logic and Algorithmic, monograph no. 30 de l'enseignement mathématique, Univeristé de Genève, 1982.

    Google Scholar 

  14. D.D. Sleator and R.E. Tarjan, Self-Adjusting Binary Search Trees. J. ACM, vol. 32, 1985, pages 652–686.

    Article  Google Scholar 

  15. R.E. Tarjan and A.C. Yao, Storing a sparse table. C. ACM, vol. 22, 1979, pages 606–611.

    Article  Google Scholar 

  16. A.C. Yao, Should tables be sorted? J. ACM, vol. 28, 1981, pages 615–628.

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Selim G. Akl Frank Dehne Jörg-Rüdiger Sack Nicola Santoro

Rights and permissions

Reprints and permissions

Copyright information

© 1995 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Fich, F., Miltersen, P.B. (1995). Tables should be sorted (on random access machines). In: Akl, S.G., Dehne, F., Sack, JR., Santoro, N. (eds) Algorithms and Data Structures. WADS 1995. Lecture Notes in Computer Science, vol 955. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-60220-8_87

Download citation

  • DOI: https://doi.org/10.1007/3-540-60220-8_87

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-60220-0

  • Online ISBN: 978-3-540-44747-4

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics