Submitted by: Wajeha Sultan
Final Project
Hashing: Open and Closed Hashing
Definition:
Hashing index is used to retrieve data. We can find, insert and delete data by using the hashing index and the idea is to map keys of a given file. A hash means a 1 to 1 relationship between data. This is a common data type in languages. A hash algorithm is a way to take an input and always have the same output, otherwise known as a 1 to 1 function. An ideal hash function is when this same process always yields a unique output.
Hash Function
Choosing a hash function that minimizes the number of collisions and also hashes uniformly is another critical issue. It is also used in many encryption algorithms.
Main formula for hashing index is:
H(k)=k mod m
H(k) means that where is the location of that key or data.
K mod m, content is the result of that index
Explanation:
So far, to find something in a tree, or in a list, we have searched. However, there is another technique called hashing. Assume we are looking for some element e in a set S, where S may be implemented as a vector. We apply some function to e, hash (e), and this delivers the position of e in S, and we can then go directly to that location to get e or information on e. For example, e might be the key to a record, such as someone's name, and we wish to extract details/info on that person. e might be a telephone number and we want to know address, or e might be address and we want telephone number.
A hashing algorithm takes a variable length data message and creates a fixed size message digest. The hashing algorithm is called the hash function-- probably the term is derived from the idea that the resulting hash value can be thought of as a "mixed up" version of the represented value. When a one-way hashing algorithm is used to generate the message digest the input cannot be determined from the output.
Hashing is basically used to bloom filters, finding