Universal Is Not Perfect

The universal family from 6.006 is

ha,b(k)=((ak+b) mod p) mod mh_{a,b}(k) = \big(\left(a k + b\right) \bmod p\big) \bmod m

with pp a prime larger than the key universe, and a∈{1,…,p−1}a \in {1, \dots, p-1}, b∈{0,…,p−1}b \in {0, \dots, p-1} chosen at random when the table is built. Take p=101p = 101, m=8m = 8, and suppose this run drew a=37a = 37, b=19b = 19.

Compute h(45)h(45) and h(78)h(78), and pick the statement about the guarantee that is also correct.

A

h(45)=68h(45) = 68, h(78)=77h(78) = 77; the outer  mod  m\bmod\ m applies only when the inner result is at least pp

B

h(45)=4h(45) = 4, h(78)=5h(78) = 5; for any two distinct keys, the probability over the random choice of aa and bb that they collide is at most 1/81/8

C

h(45)=4h(45) = 4, h(78)=5h(78) = 5; the family guarantees that no two distinct keys in {0,…,100}{0, \dots, 100} ever collide

D

h(45)=4h(45) = 4, h(78)=5h(78) = 5; the 1/81/8 bound holds only when the keys themselves are drawn uniformly at random