Documentation

Complexity.Algorithms.Streaming.CountMin.LinearHash

Binary-matrix hashes for Count-Min tables #

The existing binary linear hash family sends an n-bit item to m bits. Numbering that output with BitString.equivFin m gives a concrete universal family into Fin (2 ^ m), suitable for the stored counters of a Count-Min table. The numbering is injective, so it does not change any collision event or require a stronger randomness assumption.

A row seed consists of m * n bits. Sampling a tuple of these seeds uniformly gives the independent row seeds used by the Count-Min accuracy theorem. The seed-size statement below counts the seed space; hash evaluation and machine running times are separate obligations.

Main definitions #

Main results #

References #

def Cslib.CountMin.indexedHash {n m : ℕ} (rows : Fin m → BitString n) (input : BitString n) :
Fin (2 ^ m)

Hash an n-bit item to one of 2 ^ m numbered buckets using a binary m × n matrix.

Instances For
    @[simp]

    Numbering the output bits leaves every collision event unchanged.

    Uniform binary matrices give a universal family of Count-Min bucket indices.

    A binary-matrix row seed has m * n Boolean coordinates.