What is Hash?

, , Leave a comment

What is Hash?
Hash is a kind of function wherein a precise method or mathematical function, which translates a sizeable quantity of data into a minute datum. A hash function is typically a single integer that possibly will work as an index or key to an array. Any values or results returned by a hash function are known as hashes, hash values, hash sums, hash codes, or checksums.

Hash functions have a wide range of uses and that includes simplifying tasks. These tasks may include table search for or comparison of data like finding specific data in a record. Hash functions can also be used to find duplicate entries in a sizeable database. Moreover, it can also be used in searching comparable stretches in DNA strings. Without the hash function, these tasks would be very difficult to accomplish.

Hash can use or plot two or additional indices to identical hash values. Hash function is used in many applications. However, in most applications reducing the rate of such colliding keys is advantageous. It simply means that hash function should evenly map the indices as much as possible to the hash values. On the other hand, some applications would want to require other properties as well.

Below are some of the applications of the hash function.

Hash Tables

The primary use of hash function is for a speedy lookup of a data record in hash tables. A simple example is finding a definition for a dictionary. The definition would be easier to locate using a search key or sometimes called the headword or keyword. In the process, the index gives the location where to find the needed record.


By definition, a cache functions to transparently store data for easy retrieval in future use. The next time a user finds similar data, it will easily be retrieved. Hash function can be used to create or build caches. This is ideal for large data sets stored in slow media.

Bloom Filters

Bloom filter was discovered by Burton Howard Bloom in 1970. It is a probabilistic data structure, which is space-efficient and used to test if an element is a member of a set. To make bloom filter work, hash functions are fundamental components.

Searching Duplicate Records

Hash function is useful in retrieving duplicate records. This is ideal when finding duplicate records in a large unsorted file. Hash function fetch and compare found duplicates by scanning every bucket.
Searching Similar Records

Similar record is different from a duplicate record. The difference is that the key is similar but not identical to a single key or several records in a large file. Hash function plays an important role for this kind of purpose. One of the best examples of this application is the MusicBrainz song labeling service.

Searching Similar Substrings

A good example of this application is the Rabin-Karp algorithm. Derived from the names of its creators, Michael Rabin and Richard Karp, the algorithm uses hashing to search any one of the set of pattern strings in a text. The most practical application of this function is the detection of plagiarism.

Geometric Hashing

This application is used in many other disciplines. Geometric hashing solves many proximity problems. These proximity problems may be in either a plane or three-dimensional space. It is practically used in computer graphics and computational geometry.


Leave a Reply