Abstract

Given a set SS of nn (distinct) keys from key space [U][U], each associated with a value from ΣΣ, the \emph{static dictionary} problem asks to preprocess these (key, value) pairs into a data structure, supporting value-retrieval queries: for any given x∈[U]x\in [U], valRet(x)\mathtt{valRet}(x) must return the value associated with xx if x∈Sx\in S, or return ⊥\bot if x∉Sx\notin S. The special case where ∣Σ∣=1|Σ|=1 is called the \emph{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:=⌈lg⁡2(Un)+nlg⁡2∣Σ∣⌉\mathtt{OPT}:= \lceil\lg_2\binom{U}{n}+n\lg_2|Σ|\rceil bits, which could be much less. In this paper, we design a randomized dictionary data structure using OPT+polylg⁡n+O(lg⁡lg⁡lg⁡lg⁡lg⁡U)\mathtt{OPT}+\mathrm{poly}\lg n+O(\lg\lg\lg\lg\lg U) bits of space, and it has \emph{expected constant} query time, assuming the query algorithm can access an external lookup table of size n0.001n^{0.001}. The lookup table depends only on UU, nn and ∣Σ∣|Σ|, and not the input. Previously, even for membership queries and U≤nO(1)U\leq n^{O(1)}, the best known data structure with constant query time requires OPT+n/polylg⁡n\mathtt{OPT}+n/\mathrm{poly}\lg n bits of space (Pagh [Pag01] and Pǎtraşcu [Pat08]); the best-known using OPT+n0.999\mathtt{OPT}+n^{0.999} space has query time O(lg⁡n)O(\lg n); the only known non-trivial data structure with OPT+n0.001\mathtt{OPT}+n^{0.001} space has O(lg⁡n)O(\lg n) query time and requires a lookup table of size ≥n2.99\geq n^{2.99} (!). Our new data structure answers open questions by Pǎtraşcu and Thorup [Pat08,Tho13]. We also present a scheme that compresses a sequence X∈ΣnX\inΣ^n to its zeroth order (empirical) entropy up to ∣Σ∣⋅polylg⁡n|Σ|\cdot\mathrm{poly}\lg n extra bits, supporting decoding each XiX_i in O(lg⁡∣Σ∣)O(\lg |Σ|) expected time.

Explore this paper’s authors, topics and related work.

Building this map preview

BZPEER is loading the nearby papers, people, topics and institutions for this page.

Reviews 0

Write a reviewWrite

No reviews yet.

Discussion 0

Add a commentWrite

No comments yet.