Hash Table

In computing, a hash table (also hash map) is a data structure used to implement an associative array, a structure that can map keys to values. A hash table uses a hash function to compute an index into an array of buckets, from which the correct value can be found.

Ideally, the hash function should map each possible key to a unique slot index, but this ideal is rarely achievable in practice (unless the hash keys are fixed; i.e. new entries are never added to the table after it is created). Instead, most hash table designs assume that hash collisions—different keys that map to the same hash value—will occur and must be accommodated in some way.

In a well-dimensioned hash table, the average cost (number of instructions) for each lookup is independent of the number of elements stored in the table. Many hash table designs also allow arbitrary insertions and deletions of key-value pairs, at constant average (indeed, amortized) cost per operation.

In many situations, hash tables turn out to be more efficient than search trees or any other table lookup structure. For this reason, they are widely used in many kinds of computer software, particularly for associative arrays, database indexing, caches, and sets.

Read more about Hash Table:  Hashing, Collision Resolution, Dynamic Resizing, Performance Analysis, History

Other articles related to "hash table, hash, hash tables, table":

Geometric Hashing in Computer Vision - Example - Training Phase
... the coordinates Store the basis in a hash table indexed by the features (only transformed coordinates in this case) ... We provide the hash table after two iterations, the pair (P1, P3) is selected for the second one ... Hash Table Vector (, ) basis (P2,P4) (P2,P4) (P2,P4) (P2,P4) (P2,P4) (P1,P3) (P1,P3) (P1,P3) (P1,P3) (P1,P3) ...
Bit Vault - Technology - Architecture
... a logical 160 bit address space, each associated with hash of some data ... The association is maintained in a Distributed Hash Table (DHT) ... The DHT partitions the entire hash table into smaller hash tables ...
SUHA (computer Science) - Example
... A simple example of using SUHA can be seen while observing an arbitrary hash table of size 10 and a data set of 30 unique elements ... If chaining is used to deal with collisions, the average chain length of this hash table may be a desirable value ... be favored over another, the 30 elements should hash into the 10 slots uniformly ...
Linear Hashing
... Linear hashing is a dynamic hash table algorithm invented by Witold Litwin (1980), and later popularized by Paul Larson ... Linear hashing allows for the expansion of the hash table one slot at a time ... The cost of hash table expansion is spread out across each hash table insertion operation, as opposed to being incurred all at once ...
Hash Consing - Examples - Scheme
... but suitable for demonstration of the concept implementation of a memoizer by means of hash table and weak references in Scheme weak hashes (require 'hash-table) (define (make ... args) (apply make-hash-table args)) (define (weak-table-set! table key data) (let ((w (hash-table-ref table key #f))) (if w (vector-set! w 0 data) (let ((w (make-weak-vector 1))) (vector-set ...

Famous quotes containing the word table:

    Life is a thin narrowness of taken-for-granted, a plank over a canyon in a fog. There is something under our feet, the taken-for-granted. A table is a table, food is food, we are we—because we don’t question these things. And science is the enemy because it is the questioner. Faith saves our souls alive by giving us a universe of the taken-for-granted.
    Rose Wilder Lane (1886–1968)