Jeremy Ting edited p6.tex  about 10 years ago

Commit id: ca90944a46a723c623d4d4dccfc7360b2e7c6330

deletions | additions      

       

So the first bit is determined by multiplying the first row of M with the vector x and then taking that value mod 2. When we create the random M matrix we need the probability of a 0 showing up to be $7/24$ and the probability of 1 to be $17/24$. The reason for this is because 0*0,0*1 and 1*0 get you the value 0 and only $1*1$ get you 1. So if 1 and 0 have an equal chance of occurring then 0s will show up more likely than 1s. With this new probability distribution for the 1s and 0s we can be sure that 0s and 1s can show up equally after the multiplication. (Clarification: more 1s will be int he M matrix but after the multiplication with vector x the 8 bit number will have an equal distribution of 1s and 0s). Since we are multiplying two 32bit numbers and then taking mod2 we have an equal chance of getting a 0 or 1.  Then if you use this reasoning for the other 7 bits you can see each spot has .5 chance of being 1 and .5 chance of being 0. So that means any unique 8 bit number has a $\frac{1}{2}^8$ $\frac{1}{2} ^8$  chance of occurring which is equal to 1/256. $1/256$.  So in summary for any vector x the probability of it going into any single bucket is 1/256 $1/256$  because the probability of (M*x)mod2 $(M*x)mod2$  being equal to any particular number is (1/2)^8=1/256. $(1/2)^8=1/256$.  This shows that this hashing function is random.  \item   $256$ bits under above reasoning  \end{itemize}