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 n ≤ s ≤ m/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 s ≤ m/n ∈ is essentially optimal; we show that if n+m/n o(1) registers may be used, query time o(log n) is possible.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
A. Aho, J. Hopcroft, and J. Ullman, The Design and Analysis of Computer Algorithms, Addison-Wesley, Reading, MA, 1974.
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.
J.L. Bentley, Programming Pearls. Addison-Wesley, Reading, MA, 1986.
A. Brodnik and J. Ian Munro, Membership in constant time and minimum space. In Proc. 2nd European Symposium on Algorithms 1994, pages 72–81.
S.A. Cook and R.A. Reckhow, Time bounded random access machines. JCSS, vol. 7, 1973, pages 354–375.
A. Fiat and M. Naor, Implicit O(1) probe search. SIAM J. Computing vol. 22, 1993, pages 1–10.
A. Fiat, M. Naor, J.P. Schmidt, and A. Seigel, Nonoblivious hashing. J. ACM vol. 39, 1992, pages 764–782.
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.
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.
D.E. Knuth, The Art of Computer Programming. Addison-Wesley, Reading, MA, 1973.
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.
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.
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.
D.D. Sleator and R.E. Tarjan, Self-Adjusting Binary Search Trees. J. ACM, vol. 32, 1985, pages 652–686.
R.E. Tarjan and A.C. Yao, Storing a sparse table. C. ACM, vol. 22, 1979, pages 606–611.
A.C. Yao, Should tables be sorted? J. ACM, vol. 28, 1981, pages 615–628.
Author information
Authors and Affiliations
Editor information
Rights 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