Hash Table - Collision Resolution

Collision Resolution

Hash collisions are practically unavoidable when hashing a random subset of a large set of possible keys. For example, if 2,500 keys are hashed into a million buckets, even with a perfectly uniform random distribution, according to the birthday problem there is a 95% chance of at least two of the keys being hashed to the same slot.

Therefore, most hash table implementations have some collision resolution strategy to handle such events. Some common strategies are described below. All these methods require that the keys (or pointers to them) be stored in the table, together with the associated values.

Read more about this topic:  Hash Table

Famous quotes containing the words collision and/or resolution:

    When the wind carries a cry which is meaningful to human ears, it is simpler to believe the wind shares with us some part of the emotion of Being than that the mysteries of a hurricane’s rising murmur reduce to no more than the random collision of insensate molecules.
    Norman Mailer (b. 1923)

    Some hours seem not to be occasion for any deed, but for resolves to draw breath in. We do not directly go about the execution of the purpose that thrills us, but shut our doors behind us and ramble with prepared mind, as if the half were already done. Our resolution is taking root or hold on the earth then, as seeds first send a shoot downward which is fed by their own albumen, ere they send one upward to the light.
    Henry David Thoreau (1817–1862)