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

Related Discussions:- Division-remainder hashing, Assignment Help, Ask Question on Division-remainder hashing, Get Answer, Expert's Help, Division-remainder hashing Discussions

Write discussion on Division-remainder hashing
Your posts are moderated
Related Questions
Program: Creation of a Circular linked list ALGORITHM (Insertion of an element into a Circular Linked List) Step 1        Begin Step 2      if the list is empty or new

Q. Explain the complexity of an algorithm?  What are the worst case analysis and best case analysis explain with an example.

Question 1 Discuss the advantages of implementation checks preconditions Question 2 Write a ‘C' program to search for an item using binary search Question 3 Show that To

Limitation of Binary Search: - (i)  The complexity of Binary search is O (log2 n). The complexity is similar irrespective of the position of the element, even if it is not pres

A common person's faith is that a computer can do anything. It is far from truth. In realism computer can carry out only definite predefined instructions. The formal illustration o

Enumerate the Types in Ruby Ruby is a pure object-oriented language, meaning that all types in Ruby are classes, and each value in a Ruby program is an instance of a class. Thi

What do you mean by hashing? Hashing gives the direct access of record from the file no matter where the record is in the file. This is possible with the help of a hashing func

Acyclic Graphs In a directed graph a path is said to form a cycle is there exists a path (A,B,C,.....P) such that A = P. A graph is called acyclic graph if there is no cycle in

In this unit, we will describe a data structure called Graph. Actually, graph is a general tree along no parent-child relationship. In computer science, Graphs have several applica