问题6: 上面的讨论与实际的Hashing有什么差别? In feasible size Very large,but only a E[0] small part is used in an ·Index distribution application at a certain E耳1] Collision handling time Hash Function Key Space E[k] H(x)=k Value of a A calculated specific key array index for E[m-1] the key 选择好的Hashing函数很重要!
Key Space Hash Function E[0] E[1] E[m-1] Value of a specific key A calculated array index for the key Very large, but only a small part is used in an application at a certain time In feasible size • Index distribution • Collision handling E[k] x H(x)=k 选择好的Hashing函数很重要!
两种设计ashing函数的简单方法 In the division metod for creating hash functions,we map a key k into one of m slots by taking the remainder ofk divided by m.That is,the hash function is h(k)=k mod m. The muiplication mthod for creating hash functions operates in two steps.First we multiply the key k by a constant A in the range 0<A <I and extract the fractional part ofkA.Then,we multiply this value by mand take the floor of the result.In short.the hash function is h(k)=m(kA mod 1)]
两种设计Hashing函数的简单方法