使用32位散列时发生碰撞的概率 [英] Probability of collision when using a 32 bit hash

查看:220
本文介绍了使用32位散列时发生碰撞的概率的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一个数据库中的10个字符的字符串键字段。我用CRC32哈希这一领域,但我担心重复。可能有人告诉我发生碰撞的概率在这种情况下?

I have a 10 character string key field in a database. I've used CRC32 to hash this field but I'm worry about duplicates. Could somebody show me the probability of collision in this situation?

P.S。我的字符串字段在数据库中是唯一的。如果串的字段数为100万,什么是碰撞的概率是多少?

p.s. my string field is unique in the database. If the number of string fields is 1 million, what is probability of collision ?

推荐答案

的重复期望值碰撞完美的32位CRC

引用这篇文章的答案:<一href="http://arstechnica.com/civis/viewtopic.php?f=20&t=149670">http://arstechnica.com/civis/viewtopic.php?f=20&t=149670

从找到的图片如下:<一href="http://$p$pshing.com/20110504/hash-collision-probabilities">http://$p$pshing.com/20110504/hash-collision-probabilities

这篇关于使用32位散列时发生碰撞的概率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆