next up previous
Next: Up: Previous:

Universal Hash Functions

We want to select from a set of hash functions H with reasonable certainty that the above property is true.

Thus, the number of functions $\mid$f$\mid$ in H such that h(x) = h(y) for x,y $\in$ U must satisfy

\begin{displaymath}\frac{\mid f \mid}{\mid H \mid} \;=\; \frac{1}{m} \;\longrightarrow\;
\mid f \mid \;=\; \frac{\mid H \mid}{m}\end{displaymath}



Definition: A universal collection of hash functions H contains exactly |H|/m hash functions such that h(x) = h(y) for x,y $\in$ U.




\begin{displaymath}h_a(x) \;=\; \sum_{i=0}^{r} a_i x_i \; mod \; m\end{displaymath}

where key x = <x0, x1, .., xr> is decomposed into r+1 bytes
a =
<a0, a1, .., ar>, each chosen randomly from {0, 1, .., m-1}.

\(H \;=\; \cup_a \{h_a\}\) is a universal collection of hash functions.

Thus, we want to randomly select ``a'' each time.


next up previous
Next: Up: Previous: