encyclopegia.org

Retrieval Data Structure

In computer science, a retrieval data structure, also known as static function, is a space-efficient dictionary-like data type composed of a collection of (key, value) pairs that allows the following operations: * Construction from a collection of (key, value) pairs * Retrieve the value associated with the given key or anything if the key is not contained in the collection * Update the value associated with a key (optional) They can also be thought of as a function b \colon \, \mathcal{U} \to \{0, 1\}^r for a universe \mathcal{U} and the set of keys S \subseteq \mathcal{U} where retrieve has to return b(x) for any value x \in S and an arbitrary value from \{0, 1\}^r otherwise.[src] In contrast to static functions, AMQ-filters support (probabilistic) membership queries and dictionaries additionally allow operations like listing keys or looking up the value associated with a key and returning some other symbol if the key is not contained.[src] As can be derived from the operations, this data structure does not need to store the keys at all and may actually use less space than would be needed for a simple list of the key value pairs.[src] This makes it attractive in situations where the associated data is small (e.g.[src] a few bits) compared to the keys because we can save a lot by reducing the space used by keys.…[src]

In computer science, a retrieval data structure, also known as static function, is a space-efficient dictionary-like data type composed of a collection of (key, value) pairs that allows the following operations: Construction from a collection of (key, value) pairs Retrieve the value associated with the given key or anything if the key is not contained in the collection Update the value associated with a key (optional) They can also be thought of as a function b \colon \, \mathcal{U} \to \{0, 1\}^r for a universe \mathcal{U} and the set of keys S \subseteq \mathcal{U} where retrieve has to return b(x) for any value x \in S and an arbitrary value from \{0, 1\}^r otherwise.[src] In contrast to static functions, AMQ-filters support (probabilistic) membership queries and dictionaries additionally allow operations like listing keys or looking up the value associated with a key and returning some other symbol if the key is not contained.[src] As can be derived from the operations, this data structure does not need to store the keys at all and may actually use less space than would be needed for a simple list of the key value pairs.[src] This makes it attractive in situations where the associated data is small (e.g.[src] a few bits) compared to the keys because we can save a lot by reducing the space used by keys.[src] To give a simple example suppose n video game names annotated with a boolean indicating whether the game contains a dog that can be petted are given.[src] A static function built from this database can reproduce the associated flag for all names contained in the original set and an arbitrary one for other names.[src] The size of this static function can be made to be only (1 + \epsilon) n bits for a small \epsilon which is obviously much less than any pair based representation.[src] In the static setting, where the only operations are Construct and Retrieve, it is possible to construct solutions with redundancy k = o(n) .[src] However, depending on the parameter regime, it is not always possible to achieve such a small redundancy while also supporting constant-time retrieval.[src] For example, if r = \Theta(\log n) and assuming machine words of length w = \Theta(\log n) bits, any solution with constant-time retrieval queries must incur redundancy k = \Omega(n) .[src] The optimal redundancy changes significantly if one considers non-static versions of the problem.[src] In the value-dynamic retrieval problem, where the data structure must support an Update operation, the optimal redundancy is k = \Theta(n) no matter the value of r and regardless of time efficiency.[src] Moreover, when r = \omega(1) , it is believed that the optimal redundancy, up to low order terms, is achieved by a minimal perfect hash function.[src] In the dynamic retrieval problem, the data structure must support Insert and Delete operations on the set of key-value pairs, with a maximum capacity n on the size of the set at any given moment.[src] Assuming keys from a large polynomial-size universe, the optimal redundancy for this version of the problem is k = \Theta(n \log \log n) bits, even if r = 1 .[src] Moreover, if the capacity constraint of n is removed, then it is still possible to achieve redundancy k = \Theta(n_{\text{max}} \log \log n_{\text{max}}) , where n_{\text{max}} is the largest size the set has had so far.[src] In the incremental retrieval problem, the data structure must support Insert operations on the set of key-value pairs, with a maximum capacity n on the size of the set.[src] In this setting, the optimal redundancy is k = o(n) bits, as in the static setting.[src] ==Examples== A trivial example of a static function is a sorted list of the keys and values which implements all the above operations and many more.[src] However, the retrieve on a list is slow and we implement many unneeded operations that can be removed to allow optimizations.[src] Furthermore, we are even allowed to return junk if the queried key is not contained which we did not use at all.[src] ===Perfect hash functions=== Another simple example to build a static function is using a perfect hash function: After building the PHF for our keys, store the corresponding values at the correct position for the key.[src] As can be seen, this approach also allows updating the associated values, the keys have to be static.[src] The correctness follows from the correctness of the perfect hash function.[src] Using a minimum perfect hash function gives a big space improvement if the associated values are relatively small.[src] ===XOR-retrieval=== Hashed filters can be categorized by their queries into OR, AND and XOR-filters.[src] For example, the bloom filter is an AND-filter since it returns true for a membership query if all probed locations match.[src] XOR filters work only for static retrievals and are the most promising for building them space efficiently.[src] They are built by solving a linear system which ensures that a query for every key returns true.[src] ====Construction==== Given a hash function h that maps each key to a bitvector of length m \geq \left\vert S \right\vert = n where all (h(x))_{x \in S} are linearly independent the following system of linear equations has a solution Z \in \{ 0, 1 \}^{m \times r} : (h(x) \cdot Z = b(x))_{x \in S} Therefore, the static function is given by h and Z and the space usage is dominated by Z which is roughly (1 + \epsilon) n bits per key for m = (1 + \epsilon) n , the hash function is assumed to be small.[src] A retrieval for x \in \mathcal{U} can be expressed as the bitwise XOR of the rows Z_i for all set bits i of h(x) .[src] Furthermore, fast queries require sparse h(x) , thus the problems that need to be solved for this method are finding a suitable hash function and still being able to solve the system of linear equations efficiently.[src] Using a sparse random matrix h makes retrievals cache inefficient because they access most of Z in a random non local pattern.[src] Ribbon retrieval improves on this by giving each h(x) a consecutive "ribbon" of width w = \mathcal{O}(\log n / \epsilon) in which bits are set at random.[src] Using the properties of (h(x))_{x \in S} the matrix Z can be computed in \mathcal{O}(n/\epsilon^2) expected time: Ribbon solving works by first sorting the rows by their starting position (e.g.[src] counting sort).[src] Then, a REM form can be constructed iteratively by performing row operations on rows strictly below the current row, eliminating all 1-entries in all columns below the first 1-entry of this row.[src] Row operations do not produce any values outside of the ribbon and are very cheap since they only require an XOR of \mathcal{O}(\log n/\epsilon) bits which can be done in \mathcal{O}(1/\epsilon) time on a RAM.[src] It can be shown that the expected amount of row operations is \mathcal{O}(n/\epsilon) .[src] Finally, the solution is obtained by backsubstitution.[src] ==Applications== ===Approximate membership=== To build an approximate membership data structure use a fingerprinting function h \colon\, \mathcal{U} \to \{ 0, 1 \}^r .[src] Then build a static function D_{h_S} on h_S restricted to the domain of our keys S .[src] Checking the membership of an element x \in \mathcal{U} is done by evaluating D_{h_S} with x and returning true if the returned value equals h(x) .[src] If x \in S , D_{h_S} returns the correct value h(x) and we return true.[src] Otherwise, D_{h_S} returns a random value and we might give a wrong answer.[src] The length r of the hash allows controlling the false positive rate f = 2^r .[src] The performance of this data structure is exactly the performance of the underlying static function.[src] ===Perfect hash functions=== A retrieval data structure can be used to construct a perfect hash function: First insert the keys into a cuckoo hash table with H=2^r hash functions h_i and buckets of size 1.[src] Then, for every key store the index of the hash function that lead to a key's insertion into the hash table in a r -bit retrieval data structure D .[src] The perfect hash function is given by h_{D(x)}(x) .[src] ==References==[src]

57 sentences · 57 cited inline · 0 references stored

References

No reference rows published for this article.

Cite this article

MLA

"Retrieval Data Structure." encyclopegia.org, 2026, https://encyclopegia.org/wiki/retrieval-data-structure. Accessed 28 November 2026.

Chicago

"Retrieval Data Structure." encyclopegia.org. Accessed November 28, 2026. https://encyclopegia.org/wiki/retrieval-data-structure.

APA

encyclopegia.org. (2026). Retrieval Data Structure. Retrieved November 28, 2026, from https://encyclopegia.org/wiki/retrieval-data-structure

Accessed November 28, 2026 · CC BY-SA 4.0 · citation page · JSON

CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1365856350 · 0.5 · snapshot enwiki-001365856350

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools
  • Careers — open roles: frontier engineers and sales partners
  • Index — every corpus, paper and record
  • Estate guide — what a public data estate is
  • Founder — Lois-Kleinner Alpasan
  • Records — DOIs and external deposits
  • Documents — one-pagers, PDFs and QR codes
  • Brand kit — logos and share images
  • Papers — plain-language briefs with citations
  • Browser — search engine, PWA and bookmarklet
  • Anticloud — the operator and its projects

As seen in Business Insider · 336 outlets · evidence DOIs · plain-language papers

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.