Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Joe Celkos Data And Databases Concepts In Practice

Authors: Joe Celko

1st Edition

1558604324, 978-1558604322

More Books

Students also viewed these Databases questions

Question

13-15. How can Samsung localize this campaign in emerging markets?

Answered: 1 week ago

Question

What is the difference between Needs and GAP Analyses?

Answered: 1 week ago

Question

What are ERP suites? Are HCMSs part of ERPs?

Answered: 1 week ago