Question

In: Computer Science

what is collision resolution technique? by giving an example explain in file processing

what is collision resolution technique? by giving an example explain in file processing

Solutions

Expert Solution

In hashing a hash function is used to calculate the hash value for a key. The hash value is then used as an index to store the key in the hash table. A range of a hash function is usually finite and over a range but the input the funciton is practically infinite. So a hash function may reurn the same hash value for two or more keys. This is called as collision.

Collision Resolution Techniques are the techniques used for resolving or handling the collision. Collisions can be reduced with a selection of a good hash function. They are classified as:

  • Separate Chaining: Collisions can be resolved by creating a list of keys that map to the same value
  • Open Addressing: All elements are stored in the hash table itself. If the required slot is found occupied, the program will check the subsequent slots in turn until an available slot is located. It is further of three types: Linear Probing, Quadratic Probing and Double Hashing
  • In linear probing, we linearly probe for next slot.
  • In quadratic probing, we look for i2‘th slot in i’th iteration.
  • In double hasing we use two hash functions.

In file processing when inserting records use of hashing techniques provide very efficient and quick access to records based on certain search conditions. A function h, called a hash function is applied to the hash field value of a record and computes the address of the disk block in which the record is stored. Suppose K is a hash key value, the hash function h will map this value to a block address in the following way : h(K) = address of the block containing the record with the key value K. A collision occurs when the hash field value of a new record that is being inserted hashes to an address that already contains a different record. In this situation,we must insert the new record in some other position. The process of finding another position is called collision resolution.

Hope this helped. Please do upvote and if there are any queries please ask in comments section.


Related Solutions

The majority of metals processing starts with what type of processing technique? What is the difference...
The majority of metals processing starts with what type of processing technique? What is the difference between a wrought and a cast product? Describe the Disamatic casting process. What is the advantage to this method over traditional sand casting?(Materials Engineering)
In C#. Explain the technique of fusing loop.Give example.
In C#. Explain the technique of fusing loop.Give example.
Explain the role of background illumination in sense of vision by giving an example. What fundamental...
Explain the role of background illumination in sense of vision by giving an example. What fundamental characteristic property of sensory systems can be deduced from this example? (Explain in brief)
What is the difference between function and relation? Explain by giving example. Find the domain and...
What is the difference between function and relation? Explain by giving example. Find the domain and range of these functions. the function that assigns to each pair of positive integers the first integer of the pair             b) the function that assigns to each positive integer its largest decimal digit c) the function that assigns to a bit string the number of ones minus the number of zeros in the string d) the function that assigns to each positive integer...
whats Conflict Resolution Provide one example where conflict resolution was critical and explain why. Describe the...
whats Conflict Resolution Provide one example where conflict resolution was critical and explain why. Describe the supporting biblical scripture.
Suppose you have a collision resolution scheme that jumps ahead three positions after each collision rather...
Suppose you have a collision resolution scheme that jumps ahead three positions after each collision rather than one position as you do with linear probing. What would be a poor choice, in general terms, for the size of the hash table? Justify your answer with an example.
Physiology Give example explain the giving example in one paragraph Appeal to ignorance
Physiology Give example explain the giving example in one paragraph Appeal to ignorance
'High Resolution Melt ' - technique Q1.What are the key scientific principles which form the basis...
'High Resolution Melt ' - technique Q1.What are the key scientific principles which form the basis of this technique: Q2.What are the necessary controls, standards, and data processing. (Describe and state the purpose of these.) 1. Controls: 2. Standards: 3. Data processing (e.g. cleaning/trimming, normalisation, etc): Q3.Interpretation: What are the possible outcomes (list 3 outcomes) for this technique and how each of these outcomes should be interpreted with the 'controls/standards' stated above? A B Q4.For each of the possible outcomes...
20, This picture is an example of ____________ Elastic Collision Inelastic collision 21, This picture is...
20, This picture is an example of ____________ Elastic Collision Inelastic collision 21, This picture is an example of ____________ Elastic Collision Inelastic collision 22, The law of conservation of momentum states that the total momentum of all objects interacting with each other will ________________________ no matter of the nature of the forces between the object. increase decrease remain constant fluctuate 23, This is an example of what kind of collision? Elastic Inelastic 24, What is Newton's Law of Conservation...
Explain dispute resolution and the methods of dispute resolution
Explain dispute resolution and the methods of dispute resolution
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT