Question: 2. For the exercises below, assume the closed hash table HI0 6 uses the hash function h(k)-k mod 7 and, for (b) and (c), linear

 2. For the exercises below, assume the closed hash table HI0

2. For the exercises below, assume the closed hash table HI0 6 uses the hash function h(k)-k mod 7 and, for (b) and (c), linear probing for collision resolution. (a) What are the approximate expected number of keys that must be inserted into H so that there is a 50% chance of at least one collision and what is the expected number of keys that must be inserted in H so that each slot has at least one key?[10 points] (b) Assuming H is empty, draw the hash table after the insertion of the keys 2, 11, 55, 23, 53, 9 and 61 in the order listed. What is the average number of collisions per key? Give the probe sequence for the insertion of 61 and the number of collisions that occur during its insertion. [10 points] (c) Suppose H is empty and double-hashing is used for collision resolution with the function j(k)k mod 5 used to determine the step size when a collision occurs. Explain why j(k) is a poor choice by giving two integer keys between 1 and 15 inclusive, whose insertion leads to a failure for the second key. [5 points]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!