...

/

Discussion on Hash Tables

Discussion on Hash Tables

Discover more aspects regarding hash tables.

We'll cover the following...

Hash tables and hash codes represent an enormous and active field of research that is just touched upon in this chapter. The online Bibliography on HashingBibliography on hashing. URL: http://liinwww.ira.uka.de/ bibliography/Theory/hash.html [cited 2011-07-20]. contains nearly 2000 entries.

A variety of different hash table implementations exist. The one we discussed before in this chapter is known as hashing with chaining (each array entry contains a chain (List) of elements). Hashing with chaining dates back to an internal IBM memorandum authored by H. P. Luhn and dated January 1953. This memorandum also seems to be one of the earliest references to linked lists.

An alternative to hashing with chaining is used by open addressing schemes, where all data is stored directly in an array. These schemes include the LinearHashTable structure. This idea was also proposed, independently, by a group at IBM in the 1950s. Open addressing schemes must deal with the problem of collision resolution: the case where two values hash to the same array location. Different strategies exist for collision resolution; these provide different performance guarantees and often require more sophisticated hash functions than the ones described here.

Yet another category of hash table implementations are the so-called perfect hashing methods. These are methods in which find(x) operations take O(1)O(1) time in the worst-case. For static data sets, this can be accomplished by finding perfect hash functions for the data; these are functions that map each piece of data to a unique array location. For data that changes over time, perfect hashing methods include FKSM. L. Fredman, J. Komlo ́s, and E. Szemere ́di. Storing a sparse table with 0 (1) worst case access time. Journal of the ACM, 31(3):538–544, 1984. two-level hash tablesM. Dietzfelbinger, A. R. Karlin, K. Mehlhorn, F. M. auf der Heide, H. Rohnert, and R. E. Tarjan. Dynamic ...

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy