A hash with few collisions #
Pairwise independence and exact finite averaging give a seed with at most
pairs.card / 2 ^ rangeWidth collisions among any specified distinct pairs.
def
Complexity.CircuitSparseSynthesis.Internal.hashCollisions
{n m seedWidth : ℕ}
(hash : PairwiseIndependentHash n m seedWidth)
(pairs : Finset (BitString n × BitString n))
(seed : BitString seedWidth)
:
Specified ordered pairs whose endpoints hash to the same value.
Equations
- Complexity.CircuitSparseSynthesis.Internal.hashCollisions hash pairs seed = {xy ∈ pairs | hash.eval seed xy.1 = hash.eval seed xy.2}
Instances For
theorem
Complexity.CircuitSparseSynthesis.Internal.sum_hashCollisions
{n m seedWidth : ℕ}
(hash : PairwiseIndependentHash n m seedWidth)
(pairs : Finset (BitString n × BitString n))
(different : ∀ xy ∈ pairs, xy.1 ≠ xy.2)
:
theorem
Complexity.CircuitSparseSynthesis.Internal.exists_few_hashCollisions
{n m seedWidth : ℕ}
(hash : PairwiseIndependentHash n m seedWidth)
(pairs : Finset (BitString n × BitString n))
(different : ∀ xy ∈ pairs, xy.1 ≠ xy.2)
: