Division-remainder hashing, Data Structure & Algorithms

According to this, key value is divided by any fitting number, generally a prime number, and the division of remainder is utilized as the address for the record.

The choice of suitable divisor may not be so simple. If it is known that the file is to have n records, then we has to, assuming that only one record can be stored at a given address, have divisor n.

Also we might have a very large key space as compared to the address space. Key space refers to every possible key value. The address space possibly may not match in fact for the key values in the file. So, calculated address may not be unique. It is called Collision, that means

R(K1) = R(K2), where K1 = K2.

Two unequal keys have been calculated to have the simialr address. The keys are called as synonyms.

There are several approaches to handle the problem of collisions. One of these is to hash to buckets. A bucket is a space that can suggest multiple records.

Posted Date: 4/11/2013 6:23:25 AM | Location : United States






Your posts are moderated
Related Questions
the deference between insertion,selection and bubble sort

What do you understand by term structured programming? Explain the structured programming as well.                                 Ans. S tructured Programming is expla

Best - Fit Method: - This method obtains the smallest free block whose  size is greater than or equal to get such a block by traversing the whole free list follows.

Q. Using the following given inorder and preorder traversal reconstruct a binary tree Inorder sequence is D, G, B, H, E, A, F, I, C

for (i = 0; i sequence of statements } Here, the loop executes n times. Thus, the sequence of statements also executes n times. Since we suppose the time complexity of th

how to implement prims algorithm dynamically

Graph terminologies : Adjacent vertices: Two vertices a & b are said to be adjacent if there is an edge connecting a & b. For instance, in given Figure, vertices 5 & 4 are adj

When writing a code for a program that basically answers Relative Velocity questions how do you go at it? How many conditions should you go through?

Q. The reason bubble sort algorithm is inefficient is that it continues execution even after an array is sorted by performing unnecessary comparisons. Therefore, the number of comp

create aset of ten numbers.then you must divide it into two sets numbers which are set of odd numbers and set of even numbers.