Changing base without losing space

  • Authors:
  • Yevgeniy Dodis;Mihai Patrascu;Mikkel Thorup

  • Affiliations:
  • New York University, New York, NY, USA;AT&T Labs, Florham Park, NJ, USA;AT&T Labs, Florham Park, NJ, USA

  • Venue:
  • Proceedings of the forty-second ACM symposium on Theory of computing
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

We describe a simple, but powerful local encoding technique, implying two surprising results: 1. We show how to represent a vector of n values from some alphabet S using ceiling(n * log2 |S|) bits, such that reading or writing any entry takes O(1) time. This demonstrates, for instance, an "equivalence" between decimal and binary computers, and has been a central toy problem in the field of succinct data structures. Previous solutions required space of n * log2 |S| + n/logO(1) n bits for constant access. 2. Given a stream of n bits arriving online (for any n, not known in advance), we can output a *prefix-free* encoding that uses n + log2 n + O(loglog n) bits. The encoding and decoding algorithms only require O(log n) bits of memory, and run in constant time per word. This result is interesting in cryptographic applications, as prefix-free codes are the simplest counter-measure to extensions attacks on hash functions, message authentication codes and pseudorandom functions. Our result refutes a conjecture of [Maurer, Sjodin 2005] on the hardness of online prefix-free encodings.