What is the likelihood of * hash * CRC32b being repeated?

1

What is the likelihood of hashing CRC32b being repeated?

For example, two different strings return the same code:

echo hash('crc32b', 'Teste');
    
asked by anonymous 29.11.2017 / 19:43

1 answer

3

It allows 2 32 different combinations (just over 4 billion), so the probability is this ratio, that is, 1 in ~ 4 billion.

As you get new intensities to compare, the probability is increasing faster and faster, until you reach billions of items, where the probability growth rate decreases and reaches 100% when you have 2 32 +1 used items. The graph:

Retrieved here (has the formula used to get at it).

Remembering that we are talking about probability, everything can happen, the only guarantees are 100% and 0% (only 1 or 0 items).

    
29.11.2017 / 20:06