You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
第二个, x1, x2 属于 U 的情况下,
(x1 * a + b) mod p == (x2 * a + b) mod p 吗?
如果相等, 则
(x1 * a) == (x2 *a) modp
a(x1 - x2) == 0 modp
cybernagle
changed the title
universal hashing prime numbers
universal hashing prime numbers 质数的基本引用: universal hashing
Nov 25, 2023
cybernagle
changed the title
universal hashing prime numbers 质数的基本引用: universal hashing
universal hashing prime numbers 质数的基本应用: universal hashing
Nov 25, 2023
universal hash 就是随机选择 hash function , 从而让碰撞几率变为 1/m , 也就是不碰撞.
比如说我的 slot 的位置是 100 , 我碰撞的几率是 1/100. 那么基本上每个人都会有自己的 slot ;
而实现这个 feature 的函数为:
((a*k + b) mod p) mod m
p 是一个 prime number
这个里面的 a = {1, 2, 3, 4 ... p-1}
这里的 b = {0, 1, 2, 3, 4 ... p-1}
然后 mod p 的目的就是将其带回到 p 的领域
然后再 mod m 就是将其带回到 m 的领域.
The text was updated successfully, but these errors were encountered: