Proving hash function theorem

100 Views Asked by At

Let's say I have some set $X$ such that for any hash function $h$ and random permutation $\pi \in {1,2,..., n}$, we have $$h_\pi(X) = argmin_{x} \pi(x)$$ for $x \in X$.

Equivalently $h_\pi(X)$ is the min element in $X$ over $\pi$. I want to prove the following theorem $$P(h_\pi(X) = h_\pi(Y)) = \frac{|X \cap Y|}{|X \cup Y |}$$ Here, $P(h_\pi(X) = h_\pi(Y))$ is sampled from a uniform random $\pi : [n] \rightarrow [n]$.

Intuitively, I am restating this as the intersection over union of two sets is equal to the joint probability of the min valued element in X and Y equaling each other. But I have no idea why the second portion would ever be true if it's a random permutation. I'm not able to quite wrap my mind around this.

1

There are 1 best solutions below

0
On BEST ANSWER

We can show by a simple argument that $h_{\pi}(X)=h_{\pi}(Y)$ iff $h_{\pi}(X\cup Y)\in X\cap Y.$ This implies that $$P(h_{\pi}(X)=h_{\pi}(Y))=\sum _{z\in X\cap Y}P(h_{\pi}(X\cup Y)=z),$$ but $$P(h_{\pi}(X)=x)=\frac{{\displaystyle {n}\choose {|X|}}(|X|-1)!\cdot (n-|X|)!}{n!}=\frac{1}{|X|},$$ this is because you choose where to send the set $X,$ you permute all but the smallest element(which goes to $x$) and you permute the rest in the complement of $X$ of size $|[n]\setminus X|=n-|X|.$ Notice that this construction does not depend on $x.$

If you replace the later equation in the former, you are done.