Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please answer all parts of the question. #4. Open Addressing Strategies (8 points) (a) (2 pts): Show the table that results when 9, 32,1,66, 40,

Please answer all parts of the question.

image text in transcribed

#4. Open Addressing Strategies (8 points) (a) (2 pts): Show the table that results when 9, 32,1,66, 40, 20,51,10 are cumulatively inserted in that order into an initially empty hash table of size 11 with linear probing and h'(k) - k mod 11 h(k,i) - (h'(k) + i) mod 11, where the first probe is probe i-0 Draw this and the next result as horizontal arrays indexed from 0 to 10 as shown below. (You can fill in the Google Doc table.) Show your work in part (b) to justify your answer! 2 4 10 (b) (1 pt): How many re-hashes after collision are required for this set of keys? Show your work here so we can give partial credit or feedback if warranted (c) (2 pts): Show the table that results when 9, 32, 1, 66, 40, 20, 51, 10 are cumulatively inserted in that order into an initially empty hash table of size m= 11 with double hashing and h(k,f)- (h,(k) + ih2(k)) mod 11 h,(k) - k mod 11 h2(k)- 1 +(k mod 7) Refer to the code in the book for how i is incremented. Show your work in part (d) to justify your answer! 10 (d) (1 pt): How many re-hashes after collision are required for this set of keys? Show your work here so we can give partial credit or feedback if warranted (e) (2 pts): Open addressing insertion is like an unsuccessful search, as you need to find arn empty cell, i.e., to not find the key you are looking for! If the open addressing hash functions above were uniform hashing, what is the expected number of probes at the time that the last key (10) was inserted? Use the theorem for unsuccessful search in open addressing and show your work. Answer with a specific number, not O or Theta

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

Concepts Of Database Management

Authors: Joy L. Starks, Philip J. Pratt, Mary Z. Last

9th Edition

1337093424, 978-1337093422

More Books

Students also viewed these Databases questions

Question

73 Adult learning processes.

Answered: 1 week ago

Question

Explain the causes of indiscipline.

Answered: 1 week ago