## Abstract

For positive integers U, n, and \sigma , given a set S of n (distinct) keys from key space [U], each associated with a value from [\sigma ], the static dictionary problem asks one to preprocess these (key, value) pairs into a data structure, supporting value-retrieval queries: for any given x \in [U], valRet(x) must return the value associated with x if x \in S, or return \bot if x \in / S. The special case where \sigma = 1 is called the membership problem. The ``textbook"" solution is to use a hash table, which occupies linear space and answers each query in constant time. On the other hand, the minimum possible space to encode all (key, value) pairs is only OPT:= \lceil lg_{2}^{\bigl(U}_{n}^{\bigr)} +n lg_{2} \sigma \rceil bits, which could be much smaller than a hash table. In this paper, we design a randomized dictionary data structure using OPT+poly lg n+ O(lg^{(}\ell ^{)} U) bits of space, and it has expected constant query time, assuming the query algorithm can access an external lookup table of size n^{\epsilon} for any constant \ell and \epsilon . The lookup table depends only on U, n, and \sigma , and not the input. Previously, even for membership queries and U \leq n^{O}^{(1)}, the best known data structure with constant query time requires OPT+n/poly lg n bits of space (Pagh [SIAM J. Comput., 31 (2001), pp. 353-363] and P\v atra\c scu [FOCS, IEEE Computer Society, Los Alamitos, CA, 2008, pp. 305-313]); the best known using OPT + n^{1 - \epsilon} space has query time O(lg n). Our new data structure answers open questions by P\v atra\c scu and Thorup [FOCS, IEEE Computer Society, Los Alamitos, CA, 2008, pp. 305-313; Bull. Eur. Assoc. Theor. Comput. Sci. EATCS, 109 (2013), pp. 7-13]. We also present a scheme that compresses a sequence X \in [\sigma ]^{n} to its zeroth order (empirical) entropy up to \sigma \cdot poly lg n extra bits, supporting decoding each Xi in O(lg \sigma ) expected time.

Original language | American English |
---|---|

Pages (from-to) | 174-249 |

Number of pages | 76 |

Journal | SIAM Journal on Computing |

Volume | 51 |

Issue number | 3 |

DOIs | |

State | Published - 2022 |

## ASJC Scopus subject areas

- General Computer Science
- General Mathematics

## Keywords

- dictionary
- perfect hashing
- succinct data structure