TCSLib

56 Communication Complexity — Func Hash

56.1 Overview

This module establishes a key probabilistic lemma for Newman’s theorem: a uniformly random hash function \(h : \alpha \to \mathrm{Fin}\, k\) collides on any two distinct inputs with probability at most \(1/k\). The argument proceeds by decomposing the collision event into \(k\) pairwise-disjoint pieces, measuring each piece, and summing.

56.2 Declarations

Definition 56.1 Hash function space
✓

\(\texttt{HashSpace}\, \alpha \, k\) is the type of all functions \(\alpha \to \mathrm{Fin}\, k\), i.e. the space of hash functions on \(\alpha \) with output range \(\{ 0,\dots ,k-1\} \). Equipped with the product probability measure (uniform over each coordinate), it serves as the ambient probability space for the random-hash argument.

Definition 56.2 Collision piece
✓

For \(x, y : \alpha \) and \(a : \mathrm{Fin}\, k\), \(\texttt{collisionPiece}\, k\, x\, y\, a\) is the set of hash functions \(h \in \texttt{HashSpace}\, \alpha \, k\) satisfying \(h(x) = a\) and \(h(y) = a\), i.e. the subset of the product space where both \(x\) and \(y\) are mapped to the fixed value \(a\). These pieces partition the collision event \(\{ h \mid h(x) = h(y)\} \).

Lemma 56.3 Collision event as a union of collision pieces
✓

Let \(\alpha \) be a type, let \(k\) be a natural number, and let \(x, y \in \alpha \). Writing a hash function as a map \(h : \alpha \to \mathrm{Fin}\, k\), the collision event on which \(x\) and \(y\) receive the same hash value decomposes as the union of collision pieces over all possible common values:

\[ \{ \, h : \alpha \to \mathrm{Fin}\, k \mid h(x) = h(y) \, \} \; =\; \bigcup _{a \in \mathrm{Fin}\, k} \{ \, h \mid h(x) = a \text{ and } h(y) = a \, \} . \]
Lemma 56.4 Pairwise disjointness of the collision pieces
✓

Fix a type \(\alpha \), a natural number \(k\), and two elements \(x, y : \alpha \). For each value \(a \in \{ 0, \dots , k-1\} \), let \(C_a\) denote the set of hash functions \(h : \alpha \to \{ 0, \dots , k-1\} \) with \(h(x) = a\) and \(h(y) = a\). Then the family \((C_a)_a\) is pairwise disjoint: whenever \(a \ne b\), the sets \(C_a\) and \(C_b\) have empty intersection.

Lemma 56.5 Volume of a singleton in a finite type
✓

Let \(k \ge 1\) be a natural number and let \(a\) be an element of the finite type \(\mathrm{Fin}\, k = \{ 0, 1, \dots , k-1\} \), equipped with its canonical (uniform) volume measure. Then the measure of the singleton \(\{ a\} \) equals \(1/k\), as an element of the extended nonnegative reals \([0, \infty ]\).

Lemma 56.6 Uniform measure of a singleton in a finite type
✓

Let \(k \ge 1\), and equip the finite set \(\mathrm{Fin}\, k = \{ 0, 1, \dots , k-1\} \) with its uniform probability measure. Then for every element \(a \in \mathrm{Fin}\, k\), the real-valued measure of the singleton \(\{ a\} \) equals \(1/k\).

Lemma 56.7 Measure of a collision piece
✓

Let \(\alpha \) be a finite type and let \(k \ge 1\). Fix two distinct elements \(x \ne y\) of \(\alpha \) and a value \(a \in \mathrm{Fin}\, k\), and equip the space of hash functions \(\alpha \to \mathrm{Fin}\, k\) with the product of the uniform probability measures on the coordinates. Then the collision piece consisting of those hash functions \(h\) with \(h(x) = a\) and \(h(y) = a\) has measure

\[ \left(\frac{1}{k}\right)^2. \]
Theorem 56.8 Collision probability bound for random hashing
✓

Let \(\alpha \) be a finite type and let \(k \ge 1\), so that each hash value lies in \(\{ 0,\dots ,k-1\} \). Consider the space of hash functions \(h \colon \alpha \to \mathrm{Fin}\, k\), equipped with the uniform product probability measure, and fix two distinct points \(x \ne y\) in \(\alpha \). Then the probability that \(x\) and \(y\) collide is at most \(1/k\):

\[ \Pr \bigl[\, h(x) = h(y)\, \bigr] \; \le \; \frac{1}{k}. \]