Abstract
The predecessor problem is a key component of the fundamental sorting-and-searching core of algorithmic problems. While binary search is the optimal solution in the comparison model, more realistic machine models on integer sets open the door to a rich universe of data structures, algorithms, and lower bounds. In this article, we review the evolution of the solutions to the predecessor problem, focusing on the important algorithmic ideas, from the famous data structure of van Emde Boas to the optimal results of Patrascu and Thorup. We also consider lower bounds, variants, and special cases, as well as the remaining open questions.
Supplemental Material
Available for Download
Supplemental movie, appendix, image and software files for, Predecessor Search
- Peyman Afshani, Cheng Sheng, Yufei Tao, and Bryan T. Wilkinson. 2014. Concurrent range reporting in two-dimensional space. In Proceedings of the 25th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA’14), Chandra Chekuri (Ed.). SIAM, 983--994.Google Scholar
- Alok Aggarwal and Jeffrey Scott Vitter. 1988. The input/output complexity of sorting and related problems. Commun. ACM 31, 9 (1988), 1116--1127.Google ScholarDigital Library
- Alfred V. Aho, John E. Hopcroft, and Jeffrey D. Ullman. 1976. On finding lowest common ancestors in trees. SIAM J. Comput. 5, 1 (1976), 115--132.Google ScholarDigital Library
- Miklós Ajtai. 1988. A lower bound for finding predecessors in Yao’s cell probe model. Combinatorica 8, 3 (1988), 235--247.Google ScholarCross Ref
- Miklós Ajtai, Michael L. Fredman, and János Komlós. 1984. Hash functions for priority queues. Info. Control 63, 3 (1984), 217--225.Google ScholarDigital Library
- Stephen Alstrup, Gerth Stølting Brodal, and Theis Rauhe. 2001. Optimal static range reporting in one dimension. In Proceedings of the 33rd Annual ACM Symposium on Theory of Computing (STOC’01). 476--482.Google ScholarDigital Library
- Stephen Alstrup, Thore Husfeldt, and Theis Rauhe. 1998. Marked ancestor problems. In Proceedings of the 39th Annual Symposium on Foundations of Computer Science (FOCS’98). 534--544.Google ScholarCross Ref
- Arne Andersson. 1995. Sublogarithmic searching without multiplications. In Proceedings of the 36th Annual Symposium on Foundations of Computer Science (FOCS’95). 655--663.Google ScholarDigital Library
- Arne Andersson. 1996. Faster deterministic sorting and searching in linear space. In Proceedings of the 37th Annual Symposium on Foundations of Computer Science (FOCS’96). 135--141.Google ScholarDigital Library
- Arne Andersson, Torben Hagerup, Stefan Nilsson, and Rajeev Raman. 1998. Sorting in linear time? J. Comput. Syst. Sci. 57, 1 (1998), 74--93.Google ScholarDigital Library
- Arne Andersson and Christer Mattsson. 1993. Dynamic interpolation search in o(log log n) time. In Proceedings of the 20th International Colloquium on Automata, Languages and Programming (ICALP’93). 15--27.Google ScholarDigital Library
- Arne Andersson and Mikkel Thorup. 2007. Dynamic ordered sets with exponential search trees. Journal of the ACM 54, 3 (2007), 13.Google ScholarDigital Library
- Lars Arge, Paolo Ferragina, Roberto Grossi, and Jeffrey Scott Vitter. 1997. On sorting strings in external memory. In Proceedings of the 29th Annual ACM Symposium on the Theory of Computing (STOC’97), Frank Thomson Leighton and Peter W. Shor (Eds.). ACM, 540--548.Google Scholar
- Paul Beame and Faith E. Fich. 2002. Optimal bounds for the predecessor problem and related problems. J. Comput. Syst. Sci. 65, 1 (2002), 38--72.Google ScholarDigital Library
- Djamal Belazzougui. 2012. Worst-case efficient single and multiple string matching on packed texts in the word-RAM model. J. Discrete Algor. 14 (2012), 91--106.Google ScholarDigital Library
- Djamal Belazzougui. 2016. Predecessor search, string algorithms and data structures. In Encyclopedia of Algorithms. 1605--1611.Google Scholar
- Djamal Belazzougui, Paolo Boldi, Rasmus Pagh, and Sebastiano Vigna. 2009. Monotone minimal perfect hashing: Searching a sorted table with O(1) accesses. In Proceedings of the 20th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA’09). 785--794.Google ScholarDigital Library
- Djamal Belazzougui, Paolo Boldi, Rasmus Pagh, and Sebastiano Vigna. 2010. Fast prefix search in little space, with applications. In Proceedings of the 18th Annual European Symposium on Algorithms (ESA’10). 427--438.Google ScholarCross Ref
- Djamal Belazzougui, Paolo Boldi, and Sebastiano Vigna. 2010. Dynamic z-fast tries. In Proceedings of the 17th International Symposium on String Processing and Information Retrieval (SPIRE’10). 159--172.Google ScholarCross Ref
- Djamal Belazzougui, Paolo Boldi, and Sebastiano Vigna. 2012. Predecessor search with distance-sensitive query time. CoRR abs/1209.5441.Google Scholar
- Djamal Belazzougui, Alexis C. Kaporis, and Paul G. Spirakis. 2018. Random input helps searching predecessors. In Proceedings of the 11th International Conference on Random and Exhaustive Generation of Combinatorial Structures (GASCom’18). 106--115.Google Scholar
- Djamal Belazzougui and Gonzalo Navarro. 2015. Optimal lower and upper bounds for representing sequences. ACM Trans. Algor. 11, 4 (2015), 31:1--31:21.Google Scholar
- Michael A. Bender, Martin Farach-Colton, Mayank Goswami, Dzejla Medjedovic, Pablo Montes, and Meng-Tsung Tsai. 2014. The batched predecessor problem in external memory. In Proceedings of the 22th Annual European Symposium on Algorithms (ESA’14). 112--124.Google ScholarCross Ref
- Michael A. Bender, Martin Farach-Colton, and Bradley C. Kuszmaul. 2006. Cache-oblivious string B-trees. In Proceedings of the 25th ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems (PODS’06), Stijn Vansummeren (Ed.). ACM, 233--242.Google Scholar
- Michael A. Bender, Mayank Goswami, Dzejla Medjedovic, Pablo Montes, and Kostas Tsichlas. 2020. Batched predecessor and sorting with size-priced information in external memory. CoRR abs/2004.13197. arxiv:2004.13197.Google Scholar
- Samuel W. Bent, Daniel Dominic Sleator, and Robert Endre Tarjan. 1985. Biased search trees. SIAM J. Comput. 14, 3 (1985), 545--568.Google ScholarCross Ref
- Philip Bille, Mikko Berggren Ettienne, Inge Li Gørtz, and Hjalte Wedel Vildhøj. 2017. Time-space trade-offs for Lempel-Ziv compressed indexing. In Proceedings of the 28th Annual Symposium on Combinatorial Pattern Matching (CPM’17). 16:1--16:17.Google Scholar
- Philip Bille, Pawel Gawrychowski, Inge Li Gørtz, Gad M. Landau, and Oren Weimann. 2016. Longest common extensions in trees. Theor. Comput. Sci. 638 (2016), 98--107.Google ScholarDigital Library
- Philip Bille, Inge Li Gørtz, and Frederik Rye Skjoldjensen. 2017. Deterministic indexing for packed strings. In Proceedings of the 28th Annual Symposium on Combinatorial Pattern Matching (CPM’17). 6:1--6:11.Google Scholar
- Philip Bille, Gad M. Landau, Rajeev Raman, Kunihiko Sadakane, Srinivasa Rao Satti, and Oren Weimann. 2015. Random access to grammar-compressed strings and trees. SIAM J. Comput. 44, 3 (2015), 513--539.Google ScholarDigital Library
- Prosenjit Bose, Karim Douïeb, Vida Dujmovic, John Howat, and Pat Morin. 2013. Fast local searches and updates in bounded universes. Comput. Geom. 46, 2 (2013), 181--189.Google ScholarDigital Library
- Prosenjit Bose, Rolf Fagerberg, John Howat, and Pat Morin. 2016. Biased predecessor search. Algorithmica 76, 4 (2016), 1097--1105.Google ScholarDigital Library
- Gerth Stølting Brodal. 1997. Predecessor queries in dynamic integer sets. In Proceedings of the 14th Annual Symposium on Theoretical Aspects of Computer Science (STACS’97). 21--32.Google ScholarCross Ref
- Amit Chakrabarti and Oded Regev. 2004. An optimal randomised cell probe lower bound for approximate nearest neighbour searching. In Proceedings of the 45th Symposium on Foundations of Computer Science (FOCS’04). 473--482.Google ScholarDigital Library
- Timothy M. Chan. 2013. Persistent predecessor search and orthogonal point location on the word RAM. ACM Trans. Algorithms 9, 3 (2013), 22:1--22:22.Google ScholarDigital Library
- Timothy M. Chan, Kasper Green Larsen, and Mihai Patrascu. 2011. Orthogonal range searching on the RAM, revisited. In Proceedings of the 27th ACM Symposium on Computational Geometry (SoCG’11). 1--10.Google ScholarDigital Library
- Timothy M. Chan, Yakov Nekrich, Saladi Rahul, and Konstantinos Tsakalidis. 2018. Orthogonal point location and rectangle stabbing queries in 3D. In Proceedings of the 45th International Colloquium on Automata, Languages, and Programming (ICALP’18). 31:1--31:14.Google Scholar
- Timothy M. Chan and Mihai Patrascu. 2009. Transdichotomous results in computational geometry, I: Point location in sublogarithmic time. SIAM J. Comput. 39, 2 (2009), 703--729.Google ScholarDigital Library
- Timothy M. Chan and Konstantinos Tsakalidis. 2017. Dynamic orthogonal range searching on the RAM, revisited. In Proceedings of the 33rd International Symposium on Computational Geometry (SoCG’17). 28:1--28:13.Google Scholar
- Bernard Chazelle and Leonidas J. Guibas. 1986. Fractional cascading: I. A data structuring technique. Algorithmica 1, 2 (1986), 133--162.Google ScholarDigital Library
- David R. Clark. 1996. Compact PAT Trees. Ph.D. Dissertation. University of Waterloo, Canada.Google ScholarDigital Library
- Sarel Cohen, Amos Fiat, Moshik Hershcovitch, and Haim Kaplan. 2015. Minimal indices for predecessor search. Info. Comput. 240 (2015), 12--30.Google ScholarDigital Library
- Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein. 2009. Introduction to Algorithms (3rd ed.). MIT Press.Google ScholarDigital Library
- Roman Dementiev, Lutz Kettner, Jens Mehnert, and Peter Sanders. 2004. Engineering a sorted list data structure for 32 bit key. In Proceedings of the 6th Workshop on Algorithm Engineering and Experiments (ALENEX’04). 142--151.Google Scholar
- Marcel Ehrhardt and Wolfgang Mulzer. 2017. Delta-fast tries: Local searches in bounded universes with linear space. In Proceedings of the 15th International Symposium on Algorithms and Data Structures (WADS’17). 361--372.Google ScholarCross Ref
- Peter Elias. 1974. Efficient storage and retrieval by content and address of static files. J. ACM 21, 2 (1974), 246--260.Google ScholarDigital Library
- Robert Mario Fano. 1971. On the Number of Bits Required to Implement an Associative Memory. Massachusetts Institute of Technology, Project MAC.Google Scholar
- Martin Farach. 1997. Optimal suffix tree construction with large alphabets. In Proceedings of the 38th Symposium on Foundations of Computer Science (FOCS’97). IEEE Computer Society, 137--143.Google ScholarCross Ref
- Johannes Fischer and Pawel Gawrychowski. 2015. Alphabet-dependent string searching with wexponential search trees. In Proceedings of the 26th Annual Symposium on Combinatorial Pattern Matching (CPM’15). 160--171.Google ScholarCross Ref
- M. L. Fredman, J. Komlós, and E. Szemerédi. 1984. Storing a sparse table with O(1) worst case access time. J. ACM 31, 3 (1984), 538--544.Google ScholarDigital Library
- Michael L. Fredman and Dan E. Willard. 1993. Surpassing the information theoretic bound with fusion trees. J. Comput. Syst. Sci. 47, 3 (1993), 424--436.Google ScholarDigital Library
- Michael L. Fredman and Dan E. Willard. 1994. Trans-dichotomous algorithms for minimum spanning trees and shortest paths. J. Comput. Syst. Sci. 48, 3 (1994), 533--551.Google ScholarDigital Library
- Anna Gál and Peter Bro Miltersen. 2007. The cell probe complexity of succinct data structures. Theor. Comput. Sci. 379, 3 (2007), 405--417.Google ScholarDigital Library
- Roberto Grossi, Alessio Orlandi, Rajeev Raman, and S. Srinivasa Rao. 2009. More haste, less waste: Lowering the redundancy in fully indexable dictionaries. In Proceedings of the 26th International Symposium on Theoretical Aspects of Computer Science (STACS’09). 517--528.Google Scholar
- Torben Hagerup. 1998. Sorting and searching on the word RAM. In Proceedings of the 15th Annual Symposium on Theoretical Aspects of Computer Science (STACS’98). 366--398.Google ScholarDigital Library
- Yijie Han. 2001. Improved fast integer sorting in linear space. Info. Comput. 170, 1 (2001), 81--94.Google ScholarDigital Library
- Yijie Han. 2004. Deterministic sorting in O(n log log n) time and linear space. J. Algor. 50, 1 (2004), 96--105.Google ScholarDigital Library
- Yijie Han. 2020. Sorting real numbers in O(n &sqrt;log n) time and linear space. Algorithmica 82, 4 (2020), 966--978.Google ScholarCross Ref
- Yijie Han and Mikkel Thorup. 2002. Integer sorting in O(n &sqrt;log log n) expected time and linear space. In Proceedings of the 43rd Symposium on Foundations of Computer Science (FOCS’02). 135--144.Google ScholarDigital Library
- Steffen Heinz, Justin Zobel, and Hugh E. Williams. 2002. Burst tries: A fast, efficient data structure for string keys. ACM Trans. Info. Syst. 20, 2 (2002), 192--223.Google ScholarDigital Library
- Wing-Kai Hon, Tak Wah Lam, Rahul Shah, Siu-Lung Tam, and Jeffrey Scott Vitter. 2011. Cache-oblivious index for approximate string matching. Theor. Comput. Sci. 412, 29 (2011), 3579--3588.Google ScholarDigital Library
- Marek Karpinski and Yakov Nekrich. 2005. Predecessor queries in constant time? In Proceedings of the 13th Annual European Symposium on Algorithms (ESA’05). 238--248.Google ScholarDigital Library
- David G. Kirkpatrick and Stefan Reisch. 1984. Upper bounds for sorting integers on random access machines. Theor. Comput. Sci. 28 (1984), 263--276.Google ScholarCross Ref
- Donald E. Knuth. 1973. The Art of Computer Programming, Volume III: Sorting and Searching. Addison-Wesley.Google Scholar
- Donald E. Knuth. 1977. Notes on the van Emde Boas Construction of Priority Deques: An Instructive Use of Recursion. Classroom notes. Stanford University.Google Scholar
- Tsvi Kopelowitz. 2012. On-line indexing for general alphabets via predecessor queries on subsets of an ordered list. In Proceedings of the 53rd Annual IEEE Symposium on Foundations of Computer Science (FOCS’12). 283--292.Google ScholarDigital Library
- A. Levitin. 2007. Introduction to the Design and Analysis of Algorithms (2nd ed.). Addison-Wesley.Google Scholar
- Mingmou Liu and Huacheng Yu. 2020. Lower bound for succinct range minimum query. CoRR abs/2004.05738.Google Scholar
- Kurt Mehlhorn and Stefan Näher. 1990. Bounded ordered dictionaries in O(log log N) time and O(n) space. Info. Process. Lett. 35, 4 (1990), 183--189.Google ScholarDigital Library
- Kurt Mehlhorn and Athanasios K. Tsakalidis. 1993. Dynamic interpolation search. J. ACM 40, 3 (1993), 621--634.Google ScholarDigital Library
- Peter Bro Miltersen. 1994. Lower bounds for union-split-find related problems on random access machines. In Proceedings of the 26th Annual ACM Symposium on Theory of Computing (STOC’94). 625--634.Google ScholarDigital Library
- Peter Bro Miltersen, Noam Nisan, Shmuel Safra, and Avi Wigderson. 1998. On data structures and asymmetric communication complexity. J. Comput. Syst. Sci. 57, 1 (1998), 37--49.Google ScholarDigital Library
- Christian Worm Mortensen. 2006. Fully dynamic orthogonal range reporting on RAM. SIAM J. Comput. 35, 6 (2006), 1494--1525.Google ScholarDigital Library
- Christian Worm Mortensen, Rasmus Pagh, and Mihai Patrascu. 2005. On dynamic range reporting in one dimension. In Proceedings of the 37th Annual ACM Symposium on Theory of Computing (STOC’05). 104--111.Google ScholarDigital Library
- J. Ian Munro. 1996. Tables. In Proceedings of the 16th Conference on Foundations of Software Technology and Theoretical Computer Science (FSTTCS’96). 37--42.Google Scholar
- Nicholas Nash and David Gregg. 2010. Comparing integer data structures for 32- and 64-bit keys. ACM J. Exper. Algor. 15 (2010).Google Scholar
- Mihai Patrascu. 2008. Lower Bound Techniques for Data Structures. Ph.D. Dissertation. Massachusetts Institute of Technology, USA.Google Scholar
- Mihai Patrascu. 2008. Succincter. In Proceedings of the 49th Annual IEEE Symposium on Foundations of Computer Science (FOCS’08). 305--313.Google Scholar
- Mihai Patrascu and Erik D. Demaine. 2004. Tight bounds for the partial-sums problem. In Proceedings of the 15th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA’04), J. Ian Munro (Ed.). SIAM, 20--29.Google Scholar
- Mihai Patrascu and Erik D. Demaine. 2006. Logarithmic lower bounds in the cell-probe model. SIAM J. Comput. 35, 4 (2006), 932--963.Google ScholarDigital Library
- Mihai Patrascu and Mikkel Thorup. 2006. Time-space trade-offs for predecessor search. In Proceedings of the 38th Annual ACM Symposium on Theory of Computing (STOC’06). 232--240.Google Scholar
- Mihai Patrascu and Mikkel Thorup. 2007. Randomization does not help searching predecessors. In Proceedings of the 18th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA’07). 555--564.Google Scholar
- Mihai Patrascu and Mikkel Thorup. 2014. Dynamic integer sets with optimal rank, select, and predecessor search. In Proceedings of the 55th IEEE Annual Symposium on Foundations of Computer Science (FOCS’14). 166--175.Google ScholarDigital Library
- Mihai Patrascu and Emanuele Viola. 2010. Cell-probe lower bounds for succinct partial sums. In Proceedings of the 21st Annual ACM-SIAM Symposium on Discrete Algorithms (SODA’10). 117--122.Google Scholar
- David A. Patterson and John L. Hennessy. 2012. Computer Organization and Design—The Hardware/Software Interface (5th ed.). Academic Press.Google Scholar
- W. Paul and Janos Simon. 1980. Decision trees and random access machines. Logic Algor. 30 (1980), 331--340.Google Scholar
- Giulio Ermanno Pibiri and Rossano Venturini. 2017. Dynamic Elias-Fano representation. In Proceedings of the 28th Annual Symposium on Combinatorial Pattern Matching (CPM’17). 30:1--30:14.Google Scholar
- William Pugh. 1990. Skip lists: A probabilistic alternative to balanced trees. Commun. ACM 33, 6 (1990), 668--676.Google ScholarDigital Library
- Naila Rahman, Richard Cole, and Rajeev Raman. 2001. Optimised predecessor data structures for internal memory. In Proceedings of the 5th International Workshop on Algorithm Engineering (WAE’01). 67--78.Google ScholarDigital Library
- Rajeev Raman, Venkatesh Raman, and Srinivasa Rao Satti. 2007. Succinct indexable dictionaries with applications to encoding k-ary trees, prefix sums and multisets. ACM Trans. Algor. 3, 4 (2007), 43.Google ScholarDigital Library
- Milan Ruzic. 2008. Constructing efficient dictionaries in close to sorting time. In Proceedings of the 35th International Colloquium on Automata, Languages and Programming (ICALP’08). 84--95.Google Scholar
- Milan Ruzic. 2009. Making deterministic signatures quickly. ACM Trans. Algor. 5, 3 (2009), 26:1--26:26.Google Scholar
- Pranab Sen and Srinivasan Venkatesh. 2008. Lower bounds for predecessor searching in the cell probe model. J. Comput. Syst. Sci. 74, 3 (2008), 364--385.Google ScholarDigital Library
- Qingmin Shi and Joseph JaJa. 2003. Fast Fractional Cascading and Its Applications. Technical Report. University of Maryland, College Park, MD.Google Scholar
- Daniel Dominic Sleator and Robert Endre Tarjan. 1983. Self-adjusting binary trees. In Proceedings of the 15th Annual ACM Symposium on Theory of Computing (STOC’83). 235--245.Google ScholarDigital Library
- Mikkel Thorup. 1998. Faster deterministic sorting and priority queues in linear space. In Proceedings of the 9th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA’98). 550--555.Google Scholar
- Mikkel Thorup. 2003. On AC0 implementations of fusion trees and atomic heaps. In Proceedings of the 14th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA’03). 699--707.Google Scholar
- Mikkel Thorup. 2007. Equivalence between priority queues and sorting. J. ACM 54, 6 (2007), 28.Google ScholarDigital Library
- Peter van Emde Boas. 1977. Preserving order in a forest in less than logarithmic time and linear space. Info. Process. Lett. 6, 3 (1977), 80--82.Google ScholarCross Ref
- Peter van Emde Boas. 2013. Thirty nine years of stratified trees. In Proceedings of the 2nd International Symposium on Computing in Informatics and Mathematics (ICSIM’13). 1--14.Google Scholar
- Peter van Emde Boas, R. Kaas, and E. Zijlstra. 1977. Design and implementation of an efficient priority queue. Math. Syst. Theory 10 (1977), 99--127.Google ScholarCross Ref
- Dan E. Willard. 1983. Log-logarithmic worst-case range queries are possible in space Θ(N). Info. Process. Lett. 17, 2 (1983), 81--84.Google ScholarCross Ref
- Dan E. Willard. 2000. Examining computational geometry, van Emde Boas trees, and hashing from the perspective of the fusion tree. SIAM J. Comput. 29, 3 (2000), 1030--1049.Google ScholarDigital Library
- Paolo Ferragina and Giorgio Vinciguerra. 2020. The PGM-index: A fully-dynamic compressed learned index with provable worst-case bounds. Proc. of the VLDB Endowment 13, 8 (2020), 1162--1175.Google ScholarDigital Library
Index Terms
- Predecessor Search
Recommendations
Time-space trade-offs for predecessor search
STOC '06: Proceedings of the thirty-eighth annual ACM symposium on Theory of ComputingWe develop a new technique for proving cell-probe lower bounds for static data structures. Previous lower bounds used a reduction to communication games, which was known not to be tight by counting arguments. We give the first lower bound for an ...
Dynamic Integer Sets with Optimal Rank, Select, and Predecessor Search
FOCS '14: Proceedings of the 2014 IEEE 55th Annual Symposium on Foundations of Computer ScienceWe present a data structure representing a dynamic set S of w-bit integers on a w-bit word RAM. With |S| = n and w ≥ log n and space O(n), we support the following standard operations in O(log n/log w) time: insert(x) sets S = S + {x}. delete(x) sets S =...
Randomized Approximate Nearest Neighbor Search with Limited Adaptivity
SPAA '16: Proceedings of the 28th ACM Symposium on Parallelism in Algorithms and ArchitecturesWe study the problem of approximate nearest neighbor search in $d$-dimensional Hamming space {0,1}d. We study the complexity of the problem in the famous cell-probe model, a classic model for data structures. We consider algorithms in the cell-probe ...
Comments