Fusion Tree - Parallel Comparison

Parallel Comparison

The purpose of the compression achieved by sketching is to allow all of the keys to be stored in one w-bit word. Let the node sketch of a node be the bit string

1sketch(x1)1sketch(x2)...1sketch(xk)

We can assume that the sketch function uses exactly br4 bits. Then each block uses 1 + bw4/5 bits, and since kw1/5, the total number of bits in the node sketch is at most w.

A brief notational aside: for a bit string s and nonnegative integer m, let sm denote the concatenation of s to itself m times. If t is also a bit string st denotes the concatenation of t to s.

The node sketch makes it possible to search the keys for any b-bit integer y. Let z = (0y)k, which can be computed in constant time (multiply y by the constant (0b1)k). Note that 1sketch(xi) - 0y is always positive, but preserves its leading 1 iff sketch(xi) ≥ y. We can thus compute the smallest index i such that sketch(xi) ≥ y as follows:

  1. Subtract z from the node sketch.
  2. Take the bitwise AND of the difference and the constant (10b)k. This clears all but the leading bit of each block.
  3. Find the most significant bit of the result.
  4. Compute i, using the fact that the leading bit of the i-th block has index i(b+1).

Read more about this topic:  Fusion Tree

Famous quotes containing the words parallel and/or comparison:

    There isn’t a Parallel of Latitude but thinks it would have been the Equator if it had had its rights.
    Mark Twain [Samuel Langhorne Clemens] (1835–1910)

    What is man in nature? A nothing in comparison with the infinite, an all in comparison with the nothing—a mean between nothing and everything.
    Blaise Pascal (1623–1662)