List the properties which a hashing function should possess, Computer Engineering

Assignment Help:

List the properties which a hashing function should possess to ensure a good search performance. What approaches are adopted to handle collision?

A hashing function h must possess the subsequent properties to make sure good search performance:

1. The hashing function must not be sensitive to the symbols utilized in some source program. That is it must perform uniformly well for various source programs.

2. The hashing function h must execute reasonably fast.

The subsequent approaches are adopted to handle collision are: 

Chaining: One easy scheme is to chain all collisions in lists attached to the suitable slot. This allows an unlimited no. of collisions to be handled and doesn't need a priori knowledge of how many components are contained in the collection. The tradeoff is similar as with linked lists versus array implementations of collections: linked list overhead into space and to a lesser extent, in instance.

Rehashing: It schemes utilizes a second hashing operation while there is a collision. If there is a further collision, we re-hash till an empty "slot" in the table is determined. The re-hashing function may either be an original function or a re-application of the new one. As long as the functions are applied to a key in similar order, then a sought key can all the time be located.

1661_hashing function.png

h(j) = h(k), so the subsequent hash function, h1 is used, a second collision is arise, so h2 is used

Overflow chaining: The other scheme will divide the pre-allocated table in two sections: the primary area  to that keys  are mapped  and  an  area  for  collisions, usually termed the overflow area. While a collision happens, a slot in the overflow area is utilized for the new component and a link from the primary slot established as into a chained system. It is essentially similar as chaining, except the overflow area that is pre-allocated and therefore possibly faster to access. Along with re-hashing, the maximum number of components must be identified in advance, but in this case, two parameters should be estimated: the optimum size of overflow and the primary areas.

899_Rehashing.png


Related Discussions:- List the properties which a hashing function should possess

What are the necessary elements of an e-banking site, What are the necessar...

What are the necessary elements of an e-banking site? E-banking systems rely upon a number of common elements or processes. The given list comprises many of the potential elem

Explain the accuracy of an ADC, Explain the Accuracy o f an ADC. Ans...

Explain the Accuracy o f an ADC. Ans Accuracy- The accuracy of D to A converter is the difference among actual output voltage and the expected output voltage in D to A c

Database system, What are the three data anomalise that are likely to occur...

What are the three data anomalise that are likely to occur as a result of data redundancy?

What is a word line, What is a word line? In a memory cell, all the cel...

What is a word line? In a memory cell, all the cells of a row are linked to a common line called as word line

Priority interrupt and synchronous bus, What is a Priority Interrupt? A...

What is a Priority Interrupt? Ans: A priority interrupt is a type of interrupt that establishes a priority over the many sources to determine which condition is to be serviced

Define intranet, Intranet : An Intranet is a type of information system...

Intranet : An Intranet is a type of information system that facilitates communication within the organizations between widely dispersed departments, divisions, and regional loc

Define user space, Define user space? The system space is divided from ...

Define user space? The system space is divided from virtual address space in which the user application programs reside. The letter space is known as user space.

Program for encoding ASCII alpha numeric, Q. Program for encoding ASCII Alp...

Q. Program for encoding ASCII Alpha numeric? ; A program for encoding ASCII Alpha numeric. ; ALGORITHM:             ; create the code table             ; read an input

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd