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

Explain physical characteristics of magnetic disk, Q. Explain Physical Char...

Q. Explain Physical Characteristics of magnetic disk? Figure below lists main features that differentiate among different types of magnetic disks. First head may either be fixe

Describe distributed object model, Question 1 Give a brief explanation on m...

Question 1 Give a brief explanation on message oriented middleware Question 2 Describe Distributed object model Question 3 Explain File systems in a distributed computing Env

Find simplified function f and implement, Q. Find simplified function F and...

Q. Find simplified function F and implement that function using only NAND gates. 1. F(A,B,C) = (A+B) (A'+B+C') (A'+B'+C') 2. F (A,B,C) = A'B'C'+B'CD'+A'BCD'+AB'C' 3. F(X,Y

Mapping, what is transform mapping and transaction mapping?

what is transform mapping and transaction mapping?

Write a short note on structure chart, Write a short note on structure char...

Write a short note on structure chart.    Structure Chart is an significant program design method and it shows all components of code in a hierarchical format

C++, luminous jewels polishing game

luminous jewels polishing game

How is an instruction represented, Q. How is an instruction represented? ...

Q. How is an instruction represented? Instruction is signified as a sequence of bits. A layout of an instruction is called as instruction format. Instruction formats are princi

Computer organisation, How many 32K X 1 RAM chips are needed to provide a m...

How many 32K X 1 RAM chips are needed to provide a memory capacity 256 kilobytes?

Data packets - universal serial bus, Data packets: A data packet consi...

Data packets: A data packet consists of the PID which is followed a 16-bit CRC and by 0-1023 bytes of data payload (up to 1024 in high speed and at most 8 at low speed) The

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