Question: Some hash functions do not work as well as theoretically possible. Suppose that we use the hash function on integer keys i defined by

Some hash functions do not work as well as theoretically possible. Suppose   

Some hash functions do not work as well as theoretically possible. Suppose that we use the hash function on integer keys i defined by h(i) = i mod B, where B is the number of buckets. a) What is wrong with this hash function if B = 10? b) How good is this hash function if B = 16? c) Are there values of B for which this hash function is useful?

Step by Step Solution

3.48 Rating (151 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The hash function described hi i2 mod B is a straightforward hash function where you take the square of the input integer i and find the remainder whe... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!