Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Hash table (20 pts) You have a hash table of size m and two hash functions hl and h2: h1(x)-(sum of the values of

image text in transcribed
1. Hash table (20 pts) You have a hash table of size m and two hash functions hl and h2: h1(x)-(sum of the values of all the letters in x) % 1 1 h2(x)-5-(value of the first letter in x) % 5, where the value of a letter is its position in the alphabet (e.g., value(a) 0, value(b) 1, .., valuelz) 25) For each of the following techniques, Linear probing with h as the hash function. Quadratic rehashing with hI as the hash function. Double hashing with hl as 1st hash function and h2 as 2nd hash function. - Separate chaining with hI as the hash function. Draw a picture of the resulting hash table after inserting, in order, the following words: koala, dog, carp, ape, mud, stork, hare, ibex, bat, bird Record the number of collisions for linear probing, quadratic probing, and double hashing. Highlight cells that are looked at when trying to find "bird". a) b) c) 2. Collision avoidance (9 pts) (3 pts) One problem with linear probing is "primary clustering." Please explain what this problem is. (3 pts) Quadratic probing was proposed to overcome the disadvantage of primary clustering. However, it may create a new problem called "secondary clustering." Please explain what this problem is. a) b) c) (3 pts) In double hashing, if we choose the second hash function hash2(x) R-(x mod R) to resolve the collision, why we would like to make R a prime number? 3. Online questions (please logon to Blackboard). (5 pts)

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_2

Step: 3

blur-text-image_3

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

Database Management System MCQs Multiple Choice Questions And Answers

Authors: Arshad Iqbal

1st Edition

1073328554, 978-1073328550

More Books

Students also viewed these Databases questions

Question

Suppose that an+3 = an and let

Answered: 1 week ago