Improved address-calculation coding of integer arrays

  • Authors:
  • Amr Elmasry;Jyrki Katajainen;Jukka Teuhola

  • Affiliations:
  • Department of Computer Science, University of Copenhagen, Denmark,Computer and Systems Engineering Department, Alexandria University, Egypt;Department of Computer Science, University of Copenhagen, Denmark;Department of Information Technology, University of Turku, Finland

  • Venue:
  • SPIRE'12 Proceedings of the 19th international conference on String Processing and Information Retrieval
  • Year:
  • 2012

Quantified Score

Hi-index 0.00

Visualization

Abstract

In this paper we deal with compressed integer arrays that are equipped with fast random access. Our treatment improves over an earlier approach that used address-calculation coding to locate the elements and supported access and search operations in $O(\lg (n+s))$ time for a sequence of n non-negative integers summing up to s. The idea is to complement the address-calculation method with index structures that considerably decrease access times and also enable updates. For all our structures the memory usage is $n \lg(1 + s/n) + O(n)$ bits. First a read-only version is introduced that supports rank-based accesses to elements and retrievals of prefix sums in $O(\lg \lg (n+s)$) time, as well as prefix-sum searches in $O(\lg n+ \lg \lg s)$ time, using the word RAM as the model of computation. The second version of the data structure supports accesses in $O(\lg\lg U)$ time and changes of element values in $O(\lg^2 U)$ time, where U is the universe size. Both versions performed quite well in practical experiments. A third extension to dynamic arrays is also described, supporting accesses and prefix-sum searches in $O(\lg n + \lg\lg U)$ time, and insertions and deletions in $O(\lg^2 U)$ time.