Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

What happens if we insert keys 8 , 3 1 , 1 9 , 1 7 , 2 1 , 4 1 , 1 2

What happens if we insert keys 8,31,19,17,21,41,12,15,10 into a hash table where colliam
keys are stored in linked lists (as we did during the lecture - this is called "chaining") with the
hash function
h(k)=kmod11
Let #U=N=2?
u,m=2.
Represent xinU as binary number of length
u
bin(x)inB?
u.
Pick subset of indices in 0:
u-1
bin(x)[jy]z=bin(x)[i-1],dots,bin(x)[0]h(x)=(:z:)hxbin(x)
uzbin(x)p{h|EE(xy),h(x)=h(y)}{x)?,y,xyp{h|h(x)=h(y)}.S#S=np(S)=([N],[n])-1h:U[0:m-1]0j0
Concatenate bits bin(x)[jy]
z=bin(x)[i-1],dots,bin(x)[0]
and interpret as number
h(x)=(:z:)
Show that h distributes keys evenly.
Figure 1.To hash x convert it into a binary number bin(x)of length
u, obtain z
by concatenating a prescribed subsequence of bits of bin(x) and convert back.
Explain why (the proof of Lemma 9, lecture on Universal and Perfect Hashing)
p{h|EE(xy),h(x)=h(y)}{x)?,y,xyp{h|h(x)=h(y)}.
Suppose each set S with #S=nis chosen randomly with probability
p(S)=([N],[n])-1
and h:U[0:m-1] distributes keys evenly.
(1) Give asymptotic bounds for the expected times to perform, insert, delete and find ifwe
resolve conflicts by chaining.
(2) How do these bounds change ifwe use23-trees instead of linked lists? please solve second task
image text in transcribed

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

Database Design And Implementation

Authors: Edward Sciore

2nd Edition

3030338355, 978-3030338350

More Books

Students also viewed these Databases questions

Question

d. What language(s) did they speak?

Answered: 1 week ago