[go: up one dir, main page]

Skip to main content

Rank-Select Indices Without Tears

  • Conference paper
  • First Online:
Algorithms and Data Structures (WADS 2019)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 11646))

Included in the following conference series:

Abstract

A rank-select index for a sequence \(B=(b_1,\ldots ,b_n)\) of n bits, where \(n\in \mathbb {N}=\{1,2,\ldots \}\), is a data structure that, if provided with a constant-time operation to access (the integer whose binary representation is) the subsequence of B in \(\varTheta (\log n)\) specified consecutive positions (thus B is stored outside of the data structure), can compute \(\textit{rank}_B(j)=\sum _{i=1}^j b_i\) for given \(j\in \{0,\ldots ,n\}\) and \(\textit{select}_B(k)=\min \{j\in \mathbb {N}\mid \textit{rank}_B(j)\ge k\}\) for given \(k\in \{1,\ldots ,\sum _{i=1}^n b_i\}\). We describe a new rank-select index that, like previous rank-select indices, occupies \(O({{n\log \log n}/{\log n}})\) bits and executes \(\textit{rank}\) and \(\textit{select}\) queries in constant time. Its derivation is intended to be largely free of tedious low-level detail, its operations are given by straight-line code, and it can be constructed in \(O({n/{\log n}})\) time if B can be accessed as above.

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

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

References

  1. Angluin, D., Valiant, L.G.: Fast probabilistic algorithms for Hamiltonian circuits and matchings. J. Comput. Syst. Sci. 18(2), 155–193 (1979). https://doi.org/10.1016/0022-0000(79)90045-X

    Article  MathSciNet  MATH  Google Scholar 

  2. Clark, D.: Compact pat trees. Ph.D. thesis, University of Waterloo (1996)

    Google Scholar 

  3. Elias, P.: Efficient storage and retrieval by content and address of static files. J. ACM 21(2), 246–260 (1974). https://doi.org/10.1145/321812.321820

    Article  MathSciNet  MATH  Google Scholar 

  4. Fano, R.M.: On the number of bits required to implement an associative memory. Computation Structures Group Memo 61, MIT Project MAC, August 1971

    Google Scholar 

  5. Golynski, A.: Optimal lower bounds for rank and select indexes. Theor. Comput. Sci. 387(3), 348–359 (2007). https://doi.org/10.1016/j.tcs.2007.07.041

    Article  MathSciNet  MATH  Google Scholar 

  6. Grossi, R., Gupta, A., Vitter, J.S.: High-order entropy-compressed text indexes. In: Proceedings of the 14th Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 841–850. SIAM (2003)

    Google Scholar 

  7. Hagerup, T.: Sorting and searching on the word RAM. In: Proceedings of the 15th Annual Symposium on Theoretical Aspects of Computer Science (STACS 1998). LNCS, vol. 1373, pp. 366–398. Springer, Heidelberg (1998). https://doi.org/10.1007/BFb0028575

    Chapter  Google Scholar 

  8. Hagerup, T., Kammer, F., Laudahn, M.: Space-efficient Euler partition and bipartite edge coloring. Theor. Comput. Sci. 754, 16–34 (2019). https://doi.org/10.1016/j.tcs.2018.01.008

    Article  MathSciNet  MATH  Google Scholar 

  9. Jacobson, G.: Succinct static data structures. Ph.D. thesis, Carnegie Mellon University (1988)

    Google Scholar 

  10. Jacobson, G.: Space-efficient static trees and graphs. In: Proceedings of the 30th Annual IEEE Symposium on Foundations of Computer Science (FOCS 1989), pp. 549–554. IEEE Computer Society (1989). https://doi.org/10.1109/SFCS.1989.63533

  11. Mäkinen, V., Navarro, G.: Rank and select revisited and extended. Theor. Comput. Sci. 387(3), 332–347 (2007). https://doi.org/10.1016/j.tcs.2007.07.013

    Article  MathSciNet  MATH  Google Scholar 

  12. Pǎtraşcu, M.: Succincter. In: Proceedings of the 49th Annual IEEE Symposium on Foundations of Computer Science (FOCS 2008), pp. 305–313. IEEE Computer Society (2008). https://doi.org/10.1109/FOCS.2008.83

  13. Raman, R., Raman, V., Satti, S.R.: Succinct indexable dictionaries with applications to encoding \(k\)-ary trees, prefix sums and multisets. ACM Trans. Algorithms 3(4), 43 (2007). https://doi.org/10.1145/1290672.1290680

    Article  MathSciNet  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Torben Hagerup .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Baumann, T., Hagerup, T. (2019). Rank-Select Indices Without Tears. In: Friggstad, Z., Sack, JR., Salavatipour, M. (eds) Algorithms and Data Structures. WADS 2019. Lecture Notes in Computer Science(), vol 11646. Springer, Cham. https://doi.org/10.1007/978-3-030-24766-9_7

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-24766-9_7

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-24765-2

  • Online ISBN: 978-3-030-24766-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics