Hash collision is a condition in which a hash function gives the same hash code or hash table location for two different keys.

In practice, this would mean that there might be, for example, two passwords that encrypt to same value - thus there are two passwords that can be used to enter the system.

A more practical example: Suppose you have a lot of forms from different people and you want to sort them to piles by the first letter of their surname. If there are many people that have names that start with same letter (probability approximately 1/26), there will be more than one paper in those piles. Then, your "hashing system" would need to cope with this hash collision, probaby by sorting the piles again by the second letter of the surname: Again there's a 1/26 possibility that there's more than one with same second letter... Now you have 26*26=676 piles labeled 'aa', 'ab' and so on, but at least you get low piles!

For some hash functions, like MD5, hash collisions are extremely unlikely, but nevertheless they do occurr. This is because of the nature of hashing (the idea is to find a short representation for arbitrary-length data).

See: Birthday Paradox

hash bucket = H = hat

hash collision n.

[from the techspeak] (var. `hash clash') When used of people, signifies a confusion in associative memory or imagination, especially a persistent one (see thinko). True story: One of us [ESR] was once on the phone with a friend about to move out to Berkeley. When asked what he expected Berkeley to be like, the friend replied: "Well, I have this mental picture of naked women throwing Molotov cocktails, but I think that's just a collision in my hash tables." Compare hash bucket.

--The Jargon File version 4.3.1, ed. ESR, autonoded by rescdsk.

Log in or register to write something here or to contact authors.