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

Placement algorithm - process allocation, Placement algorithm - computer ar...

Placement algorithm - computer architecture: Different strategies can be taken as to how space is allocated to processes: First fit : Allocate the first hole that is la

Conjunctive normal form -artificial intelligence , Conjunctive Normal Form ...

Conjunctive Normal Form -artificial intelligence : For the resolution law to determine two sentences, they should both be in a normalized format known as conjunctive normal fo

The advantages of specifying parameters during instantiation, The advantage...

The advantages of specifying parameters during instantiation method are: -  All values to all the parameters do not need to be specified. Only those parameters that are assigne

Explain step by step switching system with neat diagram, With the help of a...

With the help of a neat diagram explain a step by step switching system. Configuration of a step by step switching system: A step by step switching system may be constr

What are two reasons for using layered protocol, What are two reasons for u...

What are two reasons for using layered protocol? Layered protocol implies protocols used into each layer are the layer's own business that is they don't influence protocol of a

What do you meant by hosts, Q. What do you meant by Hosts? Hosts are in...

Q. What do you meant by Hosts? Hosts are in general, individual machines at a specific location. Resources of a host machine is generally shared and can be utilized by any user

Computer Architecture, As an advocate of CISC architecture to RISC architec...

As an advocate of CISC architecture to RISC architecture, what are the merits and demerits of CISC to RISC architecture

#title.sequential circuit, design modulo 12 up synchronous counter using t ...

design modulo 12 up synchronous counter using t flip flop

Define thread cancellation and target thread, Define thread cancellation & ...

Define thread cancellation & target thread.  The thread cancellation is the task of terminating a thread before it has done. A thread that is to be cancelled is often referred

Interpreter, difference between pure and impute inter preter

difference between pure and impute inter preter

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