19-11-2012, 03:40 PM
Algorithms & Data Structures - Hashing
Algorithms.docx (Size: 574.23 KB / Downloads: 25)
Hashed List Searches
The goal of a hashed search is to find the target data in only one test. After discussing some basic hashed list concepts, we discuss eight hashing methods.
Direct Method
In direct hashing the key is the address without any algorithmic manipulation.
Direct hashing is limited, but it can be very powerful because it guarantees that there are no synonyms and therefore no collision.
Modulo-division Method
• This is also known as division remainder method.
• This algorithm works with any list size, but a list size that is a prime number produces fewer collisions than other list sizes.
• The formula to calculate the address is:
Address = key MODULO listsize + 1