Papers
Topics
Authors
Recent
Search
2000 character limit reached

Tiny Pointers

Published 24 Nov 2021 in cs.DS | (2111.12800v1)

Abstract: This paper introduces a new data-structural object that we call the tiny pointer. In many applications, traditional $\log n $-bit pointers can be replaced with $o (\log n )$-bit tiny pointers at the cost of only a constant-factor time overhead. We develop a comprehensive theory of tiny pointers, and give optimal constructions for both fixed-size tiny pointers (i.e., settings in which all of the tiny pointers must be the same size) and variable-size tiny pointers (i.e., settings in which the average tiny-pointer size must be small, but some tiny pointers can be larger). If a tiny pointer references an element in an array filled to load factor $1 - 1 / k$, then the optimal tiny-pointer size is $\Theta(\log \log \log n + \log k) $ bits in the fixed-size case, and $ \Theta (\log k) $ expected bits in the variable-size case. Our tiny-pointer constructions also require us to revisit several classic problems having to do with balls and bins; these results may be of independent interest. Using tiny pointers, we revisit five classic data-structure problems: the data-retrieval problem, succinct dynamic binary search trees, space-efficient stable dictionaries, space-efficient dictionaries with variable-size keys, and the internal-memory stash problem. These are all well-studied problems, and in each case tiny pointers allow for us to take a natural space-inefficient solution that uses pointers and make it space-efficient for free.

Citations (10)

Summary

  • The paper introduces "tiny pointers," a data structure technique compressing traditional $\log n$-bit pointers to $o(\log n)$ bits with constant-factor time overhead by leveraging prior information via a dereference table.
  • It establishes tight asymptotic bounds showing fixed-size tiny pointers require $\Omega(\log\log\log n + \log \delta^{-1})$ bits, while variable-size ones achieve an optimal expected size of $O(1 + \log\delta^{-1})$ for load factor $1-\delta$.
  • Tiny pointers enable significant improvements in data structures, offering applications like succinct binary search trees, space-efficient dictionaries supporting variable sizes or stable configurations, and optimized internal-memory stashes for external data.

This paper introduces the concept of a "tiny pointer," a novel data-structural object designed to compress traditional logn\log n-bit pointers into o(logn)o(\log n) bits, incurring only a constant-factor time overhead. The paper establishes a comprehensive theory of tiny pointers and presents optimal constructions for both fixed-size and variable-size tiny pointers. It also revisits classic problems related to balls and bins.

The core idea behind tiny pointers is to exploit prior information about a pointer, such as the identity of its owner, to circumvent the information-theoretic logn\log n lower bound. The paper introduces the concept of a dereference table, comprising algorithms for allocation, dereferencing, and freeing tiny pointers, along with an array AA and associated metadata MM. The dereference table stores bb-bit values in an array of nbnb bits and utilizes O(n)O(n) bits of metadata. It is said to support a load factor of 1δ1 - \delta if it can store (1δ)n(1 - \delta)n values simultaneously.

The paper presents tradeoffs between the load factor o(logn)o(\log n)0 and the tiny-pointer size o(logn)o(\log n)1. For fixed-size tiny pointers, the optimal size is o(logn)o(\log n)2 bits when the array is filled to a load factor of o(logn)o(\log n)3. For variable-size tiny pointers, the expected size is o(logn)o(\log n)4 bits under the same load factor.

The paper outlines five applications of tiny pointers to classic data-structure problems:

  • Storing o(logn)o(\log n)5 o(logn)o(\log n)6-bit values for o(logn)o(\log n)7 keys with constant-time modifications/queries in o(logn)o(\log n)8 bits, for any constant o(logn)o(\log n)9, by storing a tiny pointer of expected size logn\log n0 with each key. Here, logn\log n1 represents the logn\log n2-th iterated logarithm.
  • Making any binary search tree succinct with constant-factor time overhead, achieving logn\log n3 bits of optimal space with logn\log n4-time modifications, even for rotation-based trees like splay trees and red-black trees.
  • Creating stable fixed-capacity key-value dictionaries (where items do not move after insertion) with constant-time overhead and logn\log n5 space overhead.
  • Enabling key-value dictionaries with uniform-size values to support arbitrary-size values with constant-time overhead, consuming an additional logn\log n6 bits per logn\log n7-bit value for any constant logn\log n8.
  • Maintaining an internal-memory stash of size logn\log n9 bits for an external-memory array AA0 of size AA1 containing up to AA2 key-value pairs, allowing constant-time computation of any key-value pair's location in AA3 without I/O operations.

Constructing Optimal Tiny Pointers

The paper establishes tight asymptotic bounds for the relationship between tiny-pointer size AA4 and the dereference-table load factor AA5.

For fixed-size tiny pointers, a lower bound of AA6 exists on the tiny-pointer size AA7 for any load factor AA8. Conversely, a fixed tiny-pointer size of AA9 is achievable, and a lower bound confirms the tightness of this tradeoff curve.

For variable-size tiny pointers, the MM0 barrier can be overcome. The paper demonstrates that for any load factor MM1, an average tiny-pointer size of MM2 is attainable, and this tradeoff curve is tight for all MM3. The construction provides a strong concentration bound on each tiny pointer's size: for an expected size of MM4, the probability of a tiny pointer exceeding MM5 for any MM6 diminishes doubly exponentially in MM7. The dereference-table constructions guarantee constant-time operations with high probability (w.h.p.), specifically MM8.

Relationship to Balls and Bins

The paper reinterprets the tiny-pointer results in the context of balls and bins, improving bounds for dynamic load balancing under specific parameter conditions.

In this context, keys are viewed as balls assigned to distinct bins. Each ball MM9 has a probe sequence bb0 of bins where it can be placed. Supporting tiny pointers of size bb1 is equivalent to maintaining a dynamic balls-to-bins assignment such that each ball bb2 is in some bin bb3 satisfying bb4.

The dynamic aspect of the problem arises from the repeated insertion, removal, and reinsertion of balls over time. The paper introduces techniques that allow for small probe complexity (and thus small tiny pointers) for an arbitrary sequence of ball insertions and removals.

Applications to Data Structures

The paper outlines five applications of tiny pointers in more detail. The applications include the classic data-structural problem of storing a dynamic set of values associated with keys, black-box transformations that remove space inefficiency from large classes of data structures, and a new data structure for a classic problem in external-memory storage.

Overcoming the bb5-bit Lower Bound for the Cost of Data Retrieval

The first application revisits the classic data-retrieval problem, where a data structure stores a bb6-bit value for each of the bb7-bit keys in some set bb8 and answers queries to retrieve the value associated with a given key. By modifying the specification of the retrieval problem, the bb9-wasted-bits-per-item lower bound can be dissolved. The paper introduces the relaxed retrieval problem, in which, when the user inserts a key/value pair nbnb0, they are given back a small hint nbnb1 (tiny retriever) that they are responsible for storing. Later, when the user wishes to recover the value nbnb2 for nbnb3, they present both the key nbnb4 and the hint nbnb5 to the retrieval data structure. Tiny retrievers of expected size nbnb6 are constructed, supporting queries in constant time (with high probability). Using time nbnb7 for insertions/deletions, the size of the data structure becomes nbnb8 bits.

Succinct Rotation-Based Binary Search Trees

The paper gives a randomized black-box approach for transforming dynamic binary search trees into succinct data structures. For nbnb9 keys in the succinct search tree, each of which is O(n)O(n)0 bits long, the size of the succinct search tree will be O(n)O(n)1 bits. The transformation induces only a constant-factor time overhead on query operations, and only an O(n)O(n)2-factor time overhead on tree modifications.

Space-Efficient Stable Dictionaries

The paper introduces a black-box approach for transforming any fixed-capacity key-value dictionary into a stable dictionary with the same operation set and only a constant-factor time overhead. If the original dictionary stores O(n)O(n)3-bit values, the new stable dictionary stores O(n)O(n)4-bit values, and uses an additive O(n)O(n)5-bit space overhead per value.

Space-Efficient Dictionaries with Variable-Size Values

The paper introduces a black-box approach for transforming any key-value dictionary (designed to store fixed-size values) into a dictionary that can store different-sized values for different keys. The resulting data structure induces a constant-factor time overhead and offers a space overhead of only O(n)O(n)6 bits for each value O(n)O(n)7, where O(n)O(n)8 is the O(n)O(n)9-th iterated logarithm and 1δ1 - \delta0 is an arbitrary constant.

An Optimal Internal-Memory Stash

The paper revisits one of the oldest problems in external-memory data structures: maintaining a small internal-memory stash that allows direct location of elements in a large external-memory array. By combining tiny pointers with modern techniques for constructing space-efficient filters, the paper constructs a stash of size 1δ1 - \delta1 bits that supports constant-time operations in the RAM model (with high probability) and supports arbitrary sequences of insertions/deletions/queries.

Preliminaries

A dereference table with 1δ1 - \delta2-bit-values is a data structure that supports the following operations:

  • 1δ1 - \delta3: Creates a new dereference table, and returns a pointer to an array with 1δ1 - \delta4 slots, each of size 1δ1 - \delta5 bits. This array is called the store.
  • 1δ1 - \delta6: Given a key 1δ1 - \delta7, allocates a slot in the store to 1δ1 - \delta8, and returns a bit string 1δ1 - \delta9, called a tiny pointer.
  • (1δ)n(1 - \delta)n0: Given a key (1δ)n(1 - \delta)n1 and a tiny pointer (1δ)n(1 - \delta)n2, returns the index of the slot allocated to (1δ)n(1 - \delta)n3 in the store.
  • (1δ)n(1 - \delta)n4: Given a key (1δ)n(1 - \delta)n5 and a tiny pointer (1δ)n(1 - \delta)n6, deallocates slot (1δ)n(1 - \delta)n7 from (1δ)n(1 - \delta)n8.

The dereference table may store metadata in order to perform updates efficiently. Metadata can either be stored as part of the store, or in an auxiliary data structure that is permitted to consume up to (1δ)n(1 - \delta)n9 bits.

Any implementation of a dereference table must also specify an additional parameter o(logn)o(\log n)00 dictating how full the table is allowed to be. The dereference table can support up to o(logn)o(\log n)01 allocations at a time.

Upper Bound for Fixed-Size Pointers

The paper proves that for every o(logn)o(\log n)02 there is a dereference table that succeeds on each allocation w.h.p., has load factor at least o(logn)o(\log n)03, has constant-time updates w.h.p., and has tiny pointers of size o(logn)o(\log n)04.

Upper Bounds for Variable-Sized Pointers

The paper proves that for every o(logn)o(\log n)05, there exists a dereference table that succeeds on each allocation w.h.p., has load factor at least o(logn)o(\log n)06, has constant-time updates w.h.p., and has tiny pointer size o(logn)o(\log n)07, where o(logn)o(\log n)08 is a random variable such that o(logn)o(\log n)09 for all o(logn)o(\log n)10.

Lower Bounds

The paper proves that the bounds in the upper-bound theorems are tight. Specifically, if a dereference table supports variable-sized tiny pointers of expected size o(logn)o(\log n)11 and load factor o(logn)o(\log n)12, then o(logn)o(\log n)13. Additionally, if a dereference table supports fixed-sized tiny pointers of size o(logn)o(\log n)14 and load factor o(logn)o(\log n)15, then o(logn)o(\log n)16.

Dynamic Balls and Bins

The paper improves the state of the art for the classic dynamic load balancing problem. It introduces a bin-selection rule with o(logn)o(\log n)17 hash functions that achieves maximum load o(logn)o(\log n)18. The construction can be reinterpreted as a result about probe-complexity of balls-and-bins schemes with bins of capacity o(logn)o(\log n)19, giving the first dynamic ball-allocation scheme to offer o(logn)o(\log n)20 average probe complexity in the setting where there are up to o(logn)o(\log n)21 balls present in the system at a time.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Continue Learning

We haven't generated follow-up questions for this paper yet.

Collections

Sign up for free to add this paper to one or more collections.

Tweets

Sign up for free to view the 13 tweets with 417 likes about this paper.

HackerNews

  1. Tiny Pointers (163 points, 35 comments) 
  2. Tiny Pointers (4 points, 0 comments) 
  3. Tiny Pointers (2 points, 0 comments) 

Reddit

  1. The optimal tiny-pointer size is Θ(logloglogn+logk) bits in the fixed-size case (26 points, 5 comments) 
  2. Tiny Pointers (10 points, 11 comments) 
  3. Tiny Pointers (2 points, 1 comment)