nextupprevious
Next:3.5.3 Universal HashingUp:3.5 Hashing FunctionsPrevious:3.5.1 Division Method

3.5.2 Multiplication Method

There are two steps:
1.
Multiply the key k by a constant A in the range 0 < A < 1 and extract the fractional part of kA
2.
Multiply this fractional part by m and take the floor. 
          h(k) = $\displaystyle \lfloor$m(kA mod 1)$\displaystyle \rfloor$

where
    kA mod 1 = kA$\displaystyle \lfloor$kA$\displaystyle \rfloor$
    h(k) = $\displaystyle \lfloor$m(kA$\displaystyle \lfloor$kA$\displaystyle \rfloor$)$\displaystyle \rfloor$  

 
 
                                                                                                                                                    m = 2p
nextupprevious
Next:3.5.3 Universal HashingUp:3.5 Hashing FunctionsPrevious:3.5.1 Division Method
eEL,CSA_Dept,IISc,Bangalore